Frederick Cheung wrote: > On May 9, 6:47�am, 7stud -- <rails-mailing-l...@andreas-s.net> wrote: >> >> � � @cart = [1, 2, 3] >> � end >> end >> > > if you go to /store that's just the index action
Yes. I realize that> > so add_to_cart is > never called and @cart is not set. > Ok, but if I go to /store/index why does the add_to_cart view ever come into play? @ variables in other actions are not set when /store/index executes, so why doesn't rails throw errors when their views reference the @ variables set in their actions? -- Posted via http://www.ruby-forum.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 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 -~----------~----~----~----~------~----~------~--~---