Question on Model v Observer

I’ll throw this out to people and get your opinions.

Should callbacks when used in the model be used for manipulating that
model only and use observers to do external model manipulation or are
the callbacks within the model acceptable for external model
modification?

I’ve got a rather complex model of the electricity distribution system
and I need to update “upstream” data (cached information effectively)
on changes downstream.

Thoughts?

Unless it breaks something I typically just make it a one-liner, to
make the ‘real’ code less intense.
-R

On Tue, Apr 29, 2008 at 11:04 PM, jufemaiz: joel courtney

I like this blog post:

http://www.robbyonrails.com/articles/2007/04/28/q-a-activerecord-observers-and-you

Regards,
Craig

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs