search for: _calling_view_

Displaying 2 results from an estimated 2 matches for "_calling_view_".

2006 May 04
1
How do I identify the initiating View from within a Helper?
I would like to call a helper method from my View to construct a sidebar menu. The menu is contextual, so ideally I would like to do something like this: View ---- <%= sidebar_menu %> Helper ------ def sidebar_menu case _calling_view_ when ''_view_identifier_'' ... build menu... end end where ''_calling_view_'' is the key that points to the ''_view_identifier_'', if this this makes sense! I could send a parameter with the method call (eg sidebar_menu(''searc...
2006 May 04
1
Re: How do I identify the initiating View from within aHelper?
...wrote: > I would like to call a helper method from my View to construct a sidebar > menu. The menu is contextual, so ideally I would like to do something > like this: > > View > ---- > <%= sidebar_menu %> > > Helper > ------ > def sidebar_menu > case _calling_view_ > when ''_view_identifier_'' > ... build menu... > end > end > > where ''_calling_view_'' is the key that points to the > ''_view_identifier_'', if this this makes sense! > > I could send a parameter with the...