Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- p = Parent.new # with a missing required attribute
- c = Child.new
- c.parent = p # or c.parents << p, this isn't important
- p.valid? # false
- c.valid? # true
- c.save # true
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement