Sha256: 5d60fa6fa8dc35f7e33c6e73f0cce419d991ea292e5931e0b909cf20d3f8c693
Contents?: true
Size: 691 Bytes
Versions: 8
Compression:
Stored size: 691 Bytes
Contents
require 'shared_user' class User include DataMapper::Resource property :id, Serial property :username, String property :facebook_token, String timestamps :at include SharedUser 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
8 entries across 8 versions & 1 rubygems