Forum: Ruby on Rails does the template know the name of the method that called it

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.
73606b1d1042de19056f3d59492b652f?d=identicon&s=25 Charlie Bowman (beachguy82)
on 2006-03-17 04:22
Within a template, is it possible to get the name of the calling method?
What other data can you query within your template?
Cf7e5e4b5ca573eec214191fac420a2f?d=identicon&s=25 Dave Silvester (Guest)
on 2006-03-17 07:41
(Received via mailing list)
On Friday 17 Mar 2006 03:22, charlie bowman wrote:
> Within a template, is it possible to get the name of the calling method?

Try:

controller.controller_name
controller.action_name

> What other data can you query within your template?

<%= debug controller %>

That'll be quite a lot then.  ;-)

~Dave

--

Dave Silvester
Rent-A-Monkey Website Development
http://www.rentamonkey.com/

PGP Key: http://www.rentamonkey.com/pgpkey.asc
This topic is locked and can not be replied to.