Sha256: f9804db0d362bea44f3dc6907a014191b9d566704d8c2124158714a8eb192381
Contents?: true
Size: 834 Bytes
Versions: 3
Compression:
Stored size: 834 Bytes
Contents
class User include DataMapper::Resource property :id, Serial property :username, String property :facebook_token, String timestamps :at devise :database_authenticatable, :confirmable, :lockable, :recoverable, :registerable, :rememberable, :timeoutable, :token_authenticatable, :trackable, :validatable include Shim before :valid?, :update_password_confirmation # DM's validates_confirmation_of requires the confirmation field to be present, # while ActiveModel by default skips the confirmation test if the confirmation # value is nil. This test takes advantage of AM's behavior, so just add the # :password_confirmation value. def update_password_confirmation if self.password && self.password_confirmation.nil? self.password_confirmation = self.password end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
dm-devise-1.1.8 | test/rails_app/app/data_mapper/user.rb |
dm-devise-1.1.6 | test/rails_app/app/data_mapper/user.rb |
dm-devise-1.1.5 | test/rails_app/app/data_mapper/user.rb |