Imagine a simple model.
class Service
belongs_to :user
validates_associated :user
accepts_nested_attributes_for :user
end
Nothing special right? The validations on the associated User model trigger correctly in development mode. But don't do anything in production. I've added a validates_on_presence :user just like the docs say. This triggers when there's no User associated with the Service,开发者_如何学编程 but fill in one thing on the User model and nothing happens! It's driving me up the walls. Am I overlooking something?
More info about the MVC: I use formtastic for the forms.
Thanks!
It might be something simple like
- Did you restart your server after deploying?
- Do you need to run any migrations on the production db?
精彩评论