我有一个名为 Business 的模型,我对其进行了电子邮件唯一性验证。ajax 请求被发送到 url
http://localhost.com/validators/uniqueness?case_sensitive=true&business%5Bemail%5D=mabid.mah%40gmail.com
但这给了我一个奇怪的错误
uninitialized constant Busines
s 不见了,它去哪儿了?这是堆栈跟踪
activesupport (3.2.3) lib/active_support/inflector/methods.rb:229:in `block in constantize'
activesupport (3.2.3) lib/active_support/inflector/methods.rb:228:in `each'
activesupport (3.2.3) lib/active_support/inflector/methods.rb:228:in `constantize'
activesupport (3.2.3) lib/active_support/core_ext/string/inflections.rb:54:in `constantize'
client_side_validations (3.1.4) lib/client_side_validations/middleware.rb:59:in `is_unique?'
client_side_validations (3.1.4) lib/client_side_validations/middleware.rb:45:in `response'
client_side_validations (3.1.4) lib/client_side_validations/middleware.rb:16:in `call'