This project is archived and is in readonly mode.
Validations on nested attributes fail on nil foreign key on object creation
-
Santiago Pastorino
- Tag set to bugmash
-
Subba
- Importance changed from to Low
Daniele try this it will fix above problem.
class Tag belongs_to :post,:inverse_of => :post_tags validates_presence_of :post end class Post has_many :post_tags, :inverse_of => :post accepts_nested_attribute_for :post_tags end -
Subba
- Assigned user set to Neeraj Singh
-
Neeraj Singh
- State changed from new to resolved
Solution proposed by Subba works for me. Marking it as resolved. If it is still an issue then let's discuss.