Yoshiyuki Mikami
2006-Oct-31 16:40 UTC
Instance valiable was lost in render_component_as_string().
Hi, I tried to an action via render_component_as_string(). And wanted to suppress layout in this action. I checked and noticed that "render_component_as_string()" doesn''t accept "layout" like "render()". Then called "render()" in that action like below. render :layout=>false Therefore layouts wasn''t used in this action. this behavior is just expected. But this time Instance valiable that I set in action will lost in view(rhtml). ex. In action --- @foo = "abc" In view ----- <%= @foo %> -> "" <%= @foo.nil? %> -> true I think "abc" should be shown here right? Someone has any idea? -- 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 -~----------~----~----~----~------~----~------~--~---