Forum: Ruby on Rails RE: Re: How do I identify the initiating View from within aH

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Chris B. (Guest)
on 2006-05-05 03:50
(Received via mailing list)
Lindsay,

Wouldn't you want to use a component for this?  I know components seem
to be out of favor, but they seem like a perfect fit for this very
thing.

You could then go like:
<%= render_component :controller => 'sidebar', :action => 'home_menu' %>

The :action parameter could even be more dynamic based on your own
needs.


Maybe someone knows a better way?


Chris
Lindsay B. (Guest)
on 2006-05-05 04:07
Chris B. wrote:
> Lindsay,
>
> Wouldn't you want to use a component for this?  I know components seem
> to be out of favor, but they seem like a perfect fit for this very
> thing.

Thanks for the tip, Chris. I think I need to re-read the Action View
section in Agile that covers layouts and components.

Lindsay
This topic is locked and can not be replied to.