Thanks Fredrick. The tip on nested routes was just what I needed.
On Apr 7, 4:32 pm, Frederick Cheung <frederick.che...@gmail.com> wrote: > On Apr 7, 8:24 pm,elliottg<x...@simplecircle.net> wrote:> In order for the > products_controller actions to operate they all need > > access to params[:category]. Currently I am passing that attribute > > around thru a combination of hidden for_for fields and stuff like > > this: > > link_to 'Edit', edit_product_path(product, :category =>params > > [:category]) > > > I am running into a lot of issues keeping track of passing this info > > around through the various views and actions that are in play. It > > feels sloppy and prone to problems. It's like I'm working in PHP > > again. > > You might want to read up on nested resources > > > Should I use global varibles or sessions to solve these kinds of > > problems? > > I really wouldn't - that's definitely grungy (both server side and > from the point of view of the user) > > Fred --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---