Displaying 2 results from an estimated 2 matches for "search_screen".
2006 May 04
1
How do I identify the initiating View from within a Helper?
...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(''search_screen'')), but I consider this redundant.
Is this possile? Is there a better approach?
-Lindsay
--
Posted via http://www.ruby-forum.com/.
2006 May 04
1
Re: How do I identify the initiating View from within aHelper?
...9;'
> ... 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(''search_screen'')), but I consider this redundant.
>
> Is this possile? Is there a better approach?
The action name is available as "action_name".
As for the view name, all I can see after a quick look through
the Rails code is the variable "@first_render". It''ll wor...