I have the answer for the Rails 2.X but not for Rails 3. How can I read the name of a current layout rendered inside a view.
My Rails2 question: http://stackoverflow.com/questions/2622219/rails-layout-name-inside-view
Thx.
I have the answer for the Rails 2.X but not for Rails 3. How can I read the name of a current layout rendered inside a view.
My Rails2 question: http://stackoverflow.com/questions/2622219/rails-layout-name-inside-view
Thx.
I think it should be in core, but for now you can make a helper method:
def current_layout
controller.send :_layout
end
it will return currently used layout name