Skip to content

Instantly share code, notes, and snippets.

@duduribeiro
Last active September 3, 2015 01:39
Show Gist options
  • Save duduribeiro/63078de1c7495dd4aaf3 to your computer and use it in GitHub Desktop.
Save duduribeiro/63078de1c7495dd4aaf3 to your computer and use it in GitHub Desktop.
class ApplicationController < ActionController::Base
rescue_from ActiveRecord::RecordNotFound, with: :render_not_found
def render_not_found
respond_to do |format|
format.html { render action: "errors/not_found.html.erb", status: 404 }
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment