You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A failed active record validation (ex: validates :names, presence: true) produces a 422 (Unprocessable Entity) error response which will be handled by Gaffe.
Is there a way to circumvent this so as to deal with failed validations in the original controller without having to resort to a rescue clause in every create/update method?
Thanks for this handy gem by the way!
The text was updated successfully, but these errors were encountered:
As far as I know, .create, .update and #save don’t raise exceptions — .create!, .update! and #save! do. So if you want to handle errors in the original controller:
A failed active record validation (ex:
validates :names, presence: true
) produces a 422 (Unprocessable Entity) error response which will be handled by Gaffe.Is there a way to circumvent this so as to deal with failed validations in the original controller without having to resort to a
rescue
clause in everycreate/update
method?Thanks for this handy gem by the way!
The text was updated successfully, but these errors were encountered: