Module: Devise::Orm::DataMapper::Compatibility

Extended by:
ActiveSupport::Concern
Defined in:
lib/devise/orm/data_mapper/compatibility.rb

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#changed?Boolean

Returns:

  • (Boolean)


46
47
48
# File 'lib/devise/orm/data_mapper/compatibility.rb', line 46

def changed?
  dirty?
end

#invalid?Boolean

Returns:

  • (Boolean)


66
67
68
# File 'lib/devise/orm/data_mapper/compatibility.rb', line 66

def invalid?
  !valid?
end

#save(options = nil) ⇒ Object



50
51
52
53
54
55
56
# File 'lib/devise/orm/data_mapper/compatibility.rb', line 50

def save(options=nil)
  if options.is_a?(Hash) && options[:validate] == false
    save!
  else
    super()
  end
end

#update_attribute(name, value) ⇒ Object



58
59
60
# File 'lib/devise/orm/data_mapper/compatibility.rb', line 58

def update_attribute(name, value)
  update(name => value)
end

#update_attributes(*args) ⇒ Object



62
63
64
# File 'lib/devise/orm/data_mapper/compatibility.rb', line 62

def update_attributes(*args)
  update(*args)
end