This is the case: when you call save() on an activerecord::base object
it goes through all the attrs[:] and saves them. But I have a lot of
write_attribute(:name, 'This is just a silly example!')
t = Tester.new
But when I do save() it doesn't get saved to the database if I haven't
called the name() method.
When I add a validation, the method somewhere gets called and it is
added to the attrs instance variable.
Is there a way, without adding validations for every attribute, to call
the attribute methods before save?
I thought about using a before_save filter, but maybe someone would new
a better/other way.
I'm just curious if it's possible. Maybe I'm on the wrong track and
there may be better ways to override the attribute getters?
Thanks in advance!