Guest User

Untitled

a guest
Jul 21st, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. class ApplicationController < ActionController::Base
  2.  
  3. rescue_from ActiveRecord::RecordNotFound, :with => :not_found
  4.  
  5. private
  6.  
  7. def not_found
  8. respond_to do |format|
  9. format.html { render not_found_action, :status => :not_found }
  10. format.all { head :not_found }
  11. end
  12. end
  13.  
  14. def not_found_action
  15. "shared/404"
  16. end
  17.  
  18. end
Add Comment
Please, Sign In to add comment