If you notice I only pass a section of the params has designed
specifically to build the appropriate query, not the entire hash.

On Dec 7, 5:22 pm, Leonardo <[EMAIL PROTECTED]> wrote:
> You're passing unnecessary knowledge to your model.
> It definitely doesn't need to know the controller and/or the action
> it's being called from. And this information is by default in the
> params hash of any given controller action.
> Thus, it's considered a bad practice - bad design. Your objects should
> assume as little as possible about any other structure on your
> application.
>
> --
> Leonardo Borgeswww.leonardoborges.com
>
> On Dec 5, 4:09 pm, "blinking bear" <[EMAIL PROTECTED]> wrote:
>
> > I want to pass the params collection from the controller to the model to
> > parse filtering and sorting conditions.  Does having a method in the model
> > that takes the params from the controller break MVC?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to