Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Parent
- has_one :child
- accepts_nested_attributes_for :child
- end
- class Child
- belongs_to :parent
- validate :name, :presence => true
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement