Ruby on Rails Discussions
Accessing name of controller and action from layout
rubyonrails-talk
Ian_Leitch
(Ian Leitch)
September 11, 2006, 5:27pm
1
<%= self.controller.action_name.eql?(‘my_page’) ? ‘current’ : self.controller.action_name %>
Related topics
Topic
Replies
Views
Activity
Getting the Controller name from a layout
rubyonrails-talk
0
103
August 15, 2007
Find out the name of the currently :action
rubyonrails-talk
0
122
October 15, 2006
How to know the current Controller
rubyonrails-talk
0
120
July 30, 2007
How to get the name of currently executing action/controller
rubyonrails-talk
0
137
September 19, 2006
detecting controller in application layout
rubyonrails-talk
0
114
October 27, 2007