404 in rails

If you need to show a 404 error page from your controller without using an exception, this could help:

render :file => "#{RAILS_ROOT}/public/404.html",  :status => 404 and return

Leave a Reply


linkboost