Module: Devise::Orm::DataMapper::ActiveModelCompatibility

Defined in:
lib/devise/orm/data_mapper/validations/active_model.rb

Instance Method Summary collapse

Instance Method Details

#save(*args) ⇒ Object

include ActiveModel::Validations does not make save check valid?. This may not be the best solution, but it seems to work. Note that Compatibility is included after this module; its #save method handles the :validate => false option.



9
10
11
12
13
# File 'lib/devise/orm/data_mapper/validations/active_model.rb', line 9

def save(*args)
  retval = valid? && super(*args)
  assert_save_successful(:save, retval)
  retval
end