Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Halting page with 404, if record is not found, by default #871
I usually do something like this in my app.rb file for a given application:
error ActiveRecord::RecordNotFound do halt 404 render('errors/404') end
Then I just put a view in place to handle the error and it all works out great. Much more DRY than putting a halt in each action.