-
Type: Task
-
Resolution: Done
-
Affects Version/s: None
-
Component/s: None
-
None
having this model:
belongs_to :contact, autosave: true
validates_presence_of :contact
In theory, because it has autosave: true it should validate associated models before save. But I am forced to add this line if I want this nested validation:
validates_associated :contact
Better explanation here:
http://stackoverflow.com/questions/31469886/having-a-rails-model-with-autosave-should-i-validate-associated