
[PATCH] Cant change an attribute of an existing record to nil and save it
Reported by Daniel Neighman (hassox) | November 29th, 2007 @ 06:59 AM
When changing the value to nil of an existing record and saving, the nil does not get persisted in the database.
Failing Spec
it "should allow a value to be set to nil" do
x = Person.create(:name => 'a')
x.name = nil
x.save
x.reload!
x.name.should be_nil
end
Comments and changes to this ticket
-
Luke Sutton December 1st, 2007 @ 04:52 AM
- State changed from new to resolved
Closed in revision 524
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.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »