我已将我的应用程序从 Rails 2.3.5 迁移到 Rails 3。
我在模型中存在验证,例如
validates :name, :presence => {:message => "Please enter the name"}
我收到错误。错误指向我添加验证的行。错误日志如下
activemodel (3.2.2) lib/active_model/validations/with.rb:85:in `block in validates_with'
activemodel (3.2.2) lib/active_model/validations/with.rb:83:in `each'
activemodel (3.2.2) lib/active_model/validations/with.rb:83:in `validates_with'
activemodel (3.2.2) lib/active_model/validations/validates.rb:99:in `block in validates'
activemodel (3.2.2) lib/active_model/validations/validates.rb:90:in `each'
activemodel (3.2.2) lib/active_model/validations/validates.rb:90:in `validates'
app/models/business.rb:19:in `<class:Business>'
app/models/business.rb:1:in `<top (required)>'
请帮帮我。