Wes Gamble
2006-Jun-28 20:00 UTC
[Rails] Getting name of currently rendering ERb template in view?
If I''m writing code in a template and I want to refer to the name of the template itself so that I can pass it to a helper method, is there a built-in variable (like controller_name or action_name) that I can use. Assume x.rhtml and in this template I have helper_method(). I want to pass "x.rhtml" into helper_method without hardcoding it. Do I have access to the _currently rendering_ template name? Thanks, Wes -- Posted via http://www.ruby-forum.com/.