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? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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 <euphemize-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > 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? > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I like this blog post: http://www.robbyonrails.com/articles/2007/04/28/q-a-activerecord-observers-and-you Regards, Craig --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---