0
查看此處的完整錯誤:http://notesapp.heroku.com/奇怪的DataMapper(0.10.2)錯誤。請幫忙!
我正在使用DataMapper和dm-validations 0.10.2。無論我調整模型多少,我都會得到相同的錯誤或其他錯誤。以下是我的模型的樣子:
class User
include DataMapper::Resource
attr_accessor :password, :password_confirmation
property :id, Serial, :required => true
property :email, String, :required => true, :format => :email_address, :unique => true
property :hashed_password, String
property :salt, String, :required => true
property :created_at, DateTime, :default => Time.now
property :permission_level, Integer, :default => 1
validates_present :password_confirmation, :unless => Proc.new { |t| t.hashed_password }
validates_present :password, :unless => Proc.new { |t| t.hashed_password }
validates_is_confirmed :password
不直接解決問題,而是以正確的方式引導我。謝謝。 – 2010-04-10 19:30:56