On 3 jul, 22:43, Pat Nakajima <[email protected]> wrote: > > Could you explain why the first part would go entirely into the > > Machine model? > > Because it's better to encapsulate > model logic in the models (and custom finders are model logic). > Controllers should only be responsible for receiving a request, > calling the appropriate model methods, > then returning a response. > > - Pat
Thank you, that's very clear! I've decided to try and go with this solution as this actually does what I inteded to do. I just had some trouble understanding why in most examples this piece of code is put into the controller and you don't. --~--~---------~--~----~------------~-------~--~----~ 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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

