Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Catch error in ApplicationController
class ApplicationController < ActionController::Base
...
rescue_from ActiveRecord::RecordInvalid do
render :errors, status: :unprocessable_entity
end
...
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment