when i put: render :action=>"list" in my "index" method of my controller it doesn''t use/create the variables created in the list method it only gives the "list" view? is that supposed to happen --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Marc Rice wrote:> when i put: render :action=>"list" in my "index" method of my > controller it doesn''t use/create the variables created in the list > method it only gives the "list" view? is that supposed to happentry redirect_to :action => "list" instead. -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Mar 4, 4:52 pm, "libsfan01" <mcyi2...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> when i put: render :action=>"list" in my "index" method of my > controller it doesn''t use/create the variables created in the list > method it only gives the "list" view? is that supposed to happenYes. Calling render :action => "list" doesn''t actually run the method called ''list''. It just renders the default view template that would have been used if you have called the action ''list'' normally. Chris --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
> > Yes. Calling render :action => "list" doesn''t actually run the method > called ''list''. It just renders the default view template that would > have been used if you have called the action ''list'' normally. > > ChrisSo am i right to assume that you can run different actions on the same layout and the variables referenced in the ERB will inherit whatever values the ''calling'' action gives them? --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---