Method: Iry.save!

Defined in:
lib/iry.rb

.save!(model) ⇒ true

Similar to ActiveRecord::Base#save! but in case of constraint violations, it raises ConstraintViolation and ‘errors` are populated. Aside from `model`, it takes the same arguments as ActiveRecord::Base#save!

Parameters:

Returns:

  • (true)

Raises:

  • (ConstraintViolation)

    ConstraintViolation inherits from ActiveRecord::RecordInvalid but it’s triggered only when a constraint violation happens

  • (ActiveRecord::RecordInvalid)

    triggered when a validation error is raised, but not a constraint violation



145
146
147
# File 'lib/iry.rb', line 145

def self.save!(model, ...)
  TransformConstraints.save!(model, ...)
end