I am experiencing a problem with render_component in the following code (which is part of another controller''s layout rhtml). <div id="left" class="column"> <%= render_component :controller => ''test'', :action => :navigation %> </div> When this runs, it *does* render ''views/test/navigation.rhtml'', but *without* calling the navigation method in the ''test'' controller. I had understood that it would call the test controller, in order to render ''views/test/navigation.rhtml''. When I call it directly with http://localhost:3000/test/navigation it calls the method as expected. (I have also confirmed this by putting test commands in the controller method, which work correctly when run directly, but which do not get executed when run via render_component.) Am I missing something here, or is it a bug which I shoud report? Regards, Chris. P.S. I''m using Webbrick 1.3.1, Rails 1.1.6 and Ruby 1.8.4 (2005-12-24) [i486-linux] on Ubuntu 6.06. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Chris Dew wrote:> I am experiencing a problem with render_component in the following code > (which is part of another controller''s layout rhtml). > > <div id="left" class="column"> > <%= render_component :controller => ''test'', :action => > :navigation %> > </div> > > When this runs, it *does* render ''views/test/navigation.rhtml'', but > *without* calling the navigation method in the ''test'' controller. > > I had understood that it would call the test controller, in order to > render ''views/test/navigation.rhtml''. > > When I call it directly with http://localhost:3000/test/navigation it > calls the method as expected. > > (I have also confirmed this by putting test commands in the controller > method, which work correctly when run directly, but which do not get > executed when run via render_component.) > > Am I missing something here, or is it a bug which I shoud report?Yes, I think there''s a bug with component actions written as symbols. Try: :action => ''navigation'' -- We develop, watch us RoR, in numbers too big to ignore. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Thanks for your suggestion, I''ve just tried using a string instead of a symbol, but it''s still broken. Thanks, 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 -~----------~----~----~----~------~----~------~--~---