Skip to content

Instantly share code, notes, and snippets.

@ajsharp
Created April 9, 2013 22:15
Show Gist options
  • Select an option

  • Save ajsharp/5349904 to your computer and use it in GitHub Desktop.

Select an option

Save ajsharp/5349904 to your computer and use it in GitHub Desktop.
rescue_from(ActiveRecord::RecordNotFound) do |not_found_exception|
render :json => {status: 404, error_code: "not found", message: not_found_exception.message}, :status => 404
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment