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.
B29105598b6464efc13b04cb445efa85?d=identicon&s=25 Chris Bruce (Guest)
on 2006-05-05 01: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
Ae03102311939454d2b7f1ca3139fd97?d=identicon&s=25 Lindsay Boyd (Guest)
on 2006-05-05 02:07
Chris Bruce 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.