Re: Using before_save to update a record only once.

MenDAKE
2007-02-28T21:17:29Z

Philip Hallstrom wrote:
>> What the above does is perform the action when "completed" is
set to
>>
>> How would I go about this? Obviously, I could add code outside the
>> model, but before_save seems like the nicest, cleanest place to for
this
>> code to be. I searched this forum and found a post that kind of helps
>> answer my question, but it''s not super clear and I''m
still not sure what
>> the best solution is. It sounds like I have to do an external find just
>> to do this check, and that just doesn''t seem right to me. Is
that really
>> the only way?
>
> Don''t have a specific answer for you, but the acts_as_changed
plugin
> might come in handy for you...
>
> http://agilewebdevelopment.com/plugins/acts_as_changed
>
> -philip

Thanks, Philip. I''m having a difficult time understanding exactly what
it does. The one line explanation isn''t 100% clear to me. It sort of
looks like a speed related plug-in that simply updates fields that been
changed, rather than going through each field in the entire table, but I
could be wrong about that.