I understand the difference between render and redirect (at least I think I do...) But there still seems to be some confusion in my mind between render :action => :some_action and render :action => "some_action" It would seem the second form (with the action target in quotes) just renders "some_action.rhtml" However, the first form using the colon fomat seems to call the action method -- a direct contradiction of the explanation given in the Pragmatic Programmer''s Agile Web Development book (page 428). If somebody has some explanation of how these two formats differ, I sure would appreciate a response. Thanks, sjf --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
sjf, On 7/11/07, sjf_control <sjfcontrol-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > I understand the difference between render and redirect (at least I > think I do...) > But there still seems to be some confusion in my mind between > render :action => :some_action > and > render :action => "some_action"These are equivalent, it''s just that the first you are using a symbol (:symbol_name) and the second you are using a string, but both lines will do the same thing.> > It would seem the second form (with the action target in quotes) just > renders "some_action.rhtml" > However, the first form using the colon fomat seems to call the action > method -- a direct contradiction of the explanation given in the > Pragmatic Programmer''s Agile Web Development book (page 428). > > If somebody has some explanation of how these two formats differ, I > sure would appreciate a response. > > Thanks, > sjf > > > > >Javier Godinez --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Hi, sjf_control wrote:> there still seems to be some confusion in my mind between > render :action => :some_action > and > render :action => "some_action" > > It would seem the second form (with the action target in quotes) just > renders "some_action.rhtml" > However, the first form using the colon fomat seems to call the action > methodIf you can supply a succinct test case that illustates this behavior, please do. There is not supposed to be a difference, but perhaps you''ve found a bug. Best regards, 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 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 -~----------~----~----~----~------~----~------~--~---