Module: Iry::Patch
- Defined in:
- lib/iry/patch.rb
Overview
Overrides private API method ActiveRecord#create_or_update to handle constraints and attach errors to the including model
Instance Method Summary collapse
-
#create_or_update ⇒ Boolean
Takes attributes as named arguments.
Instance Method Details
#create_or_update ⇒ Boolean
Takes attributes as named arguments
7 8 9 10 11 |
# File 'lib/iry/patch.rb', line 7 def create_or_update(...) result = false TransformConstraints.nested_constraints!(self) { result = super } result end |