I don't think this code worked on Rails 3. Are you certain about this? Because if you do this, you override the setter method created by ActiveRecord (which is responsible for storing data to DB). Does your custom version of method look exactly like shown? What's the point of it?
Try calling super
.
def foo=(foo)
@foo = foo
super
end
P.S.: I checked and it does not work in Rails 3 (works with super
).