# RE: Re: How do I identify the initiating View from within aH

**URL:** <https://www.ruby-forum.com/t/re-re-how-do-i-identify-the-initiating-view-from-within-ah/94496>\
**Category:** Rails\
**Created:** [May 5, 2006, 1:50am UTC](https://www.ruby-forum.com/t/re-re-how-do-i-identify-the-initiating-view-from-within-ah/94496 "2006-05-05T01:50:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dacbo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/b9e5f3/32.png) [@dacbo](https://www.ruby-forum.com/u/dacbo)\
**Post date:** [May 5, 2006, 1:50am UTC](https://www.ruby-forum.com/t/re-re-how-do-i-identify-the-initiating-view-from-within-ah/94496/1 "2006-05-05T01:50:06Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![dacbo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/b9e5f3/32.png) [@dacbo](https://www.ruby-forum.com/u/dacbo)\
**Post date:** [May 5, 2006, 2:07am UTC](https://www.ruby-forum.com/t/re-re-how-do-i-identify-the-initiating-view-from-within-ah/94496/2 "2006-05-05T02:07:23Z")

</div>

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
