On 2008-09-27 04:41, Jon wrote: > In my main controller have: > > def index > @albums=Album.find(:all) > @cart=find_cart > end > > since find_cart is also used by another controller, I decided to move > it from to the application_helper.rb file too reduce redundancy. > Rails is throwing an error saying that there is no method find_cart. > Any insight?
You'll want to put the shared method in app/controllers/application.rb instead. application_helper.rb is for shared code you use in views, not controllers. -- Greg Donald http://destiney.com/ --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

