Skip to content

Instantly share code, notes, and snippets.

@MaryKuz
Created March 28, 2019 12:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MaryKuz/398f06d3e420ea8c3255f12aef12fb06 to your computer and use it in GitHub Desktop.
Save MaryKuz/398f06d3e420ea8c3255f12aef12fb06 to your computer and use it in GitHub Desktop.
Add the error ActiveModel::StrictValidationFailed in rescue_from
rescue_from ActiveRecord::RecordInvalid, ActiveModel::StrictValidationFailed do
render :errors, status: :unprocessable_entity
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment