[Rails] Re: Observers and outside methods

2009-03-16 Thread Mike C
Oh, ok. Thanks for the replies! On Mar 16, 8:17 am, Craig Demyanovich wrote: > If what I want to accomplish affects only the model with which I'm working, > I put the behavior in a callback on the model. If it affects other related > models, I put it in an observer. Otherwise, I put it in the co

[Rails] Re: Observers and outside methods

2009-03-16 Thread Craig Demyanovich
If what I want to accomplish affects only the model with which I'm working, I put the behavior in a callback on the model. If it affects other related models, I put it in an observer. Otherwise, I put it in the controller or some other non-ActiveRecord library code. In those cases where I've needed

[Rails] Re: Observers and outside methods

2009-03-16 Thread "Wolas!"
you can include them in the model if you want. Mybe i get some screaming for this as models and views should be completely separate and independent (so if you change the routes, for example, you would have to change this method, for you its not a problem because you worte it, but in a project with