Module: MassiveRecord::ORM::Validations

Extended by:
ActiveSupport::Concern
Includes:
ActiveModel::Validations
Defined in:
lib/massive_record/orm/validations.rb

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#save(options = {}) ⇒ Object



35
36
37
# File 'lib/massive_record/orm/validations.rb', line 35

def save(options = {})
  perform_validation(options) ? super : false
end

#save!(options = {}) ⇒ Object



39
40
41
# File 'lib/massive_record/orm/validations.rb', line 39

def save!(options = {})
  perform_validation(options) ? super : raise(RecordInvalid.new(self))
end