#1179 confirmed
Martin Emde

save with invalid child still saves parent (and appears valid)

Reported by Martin Emde | January 12th, 2010 @ 02:35 PM

Here's what I'm seeing:

  obj = Obj.new(attrs)
  child = obj.children.new(invalid_attrs)
  obj.valid? # => true
  obj.save   # => false
  obj.new?   # => false
  child.new? # => true

I would expect the obj to be rolled back if the child does not save. Is this the intended behavior?

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »