Skip to content

Instantly share code, notes, and snippets.

@dimasjt
Created November 17, 2015 09:44
Show Gist options
  • Save dimasjt/26c13d219133467adc6d to your computer and use it in GitHub Desktop.
Save dimasjt/26c13d219133467adc6d to your computer and use it in GitHub Desktop.
rescue from routing error
# routes.rb
match "*path", to: "application#record_not_found", via: :all
# application_controller#record_not_found
def record_not_found
render 'public/404'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment