Hi Andrew, On Wed, Nov 24, 2010 at 11:59 AM, Andrew Davis <[email protected]> wrote: > Hello, > > Rails Best Practices is telling me to move some code from one of my > helper views into the controller. I was hoping to get some assistance as > I'm unsure how to do this and still have the application work. > > The helper: http://pastie.org/private/pfub9iklus5ajuu1iwvfza > > The report says I need to move the second and third lines into the > controller, but if I do that, how does the rest of the code know how to > work?
Do your finds in the controller, assigning the results to instance variables, and then access the instance variables in the view. HTH, Bill -- 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.

