From 8d1b1c21930d85ac94da008d5201e43a7600e7f1 Mon Sep 17 00:00:00 2001 From: Rodrigo Souto Date: Tue, 13 May 2014 15:20:10 +0000 Subject: [PATCH] Using controller instead of @controller on layout helper --- app/helpers/layout_helper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/helpers/layout_helper.rb b/app/helpers/layout_helper.rb index f6739df..64d0541 100644 --- a/app/helpers/layout_helper.rb +++ b/app/helpers/layout_helper.rb @@ -2,8 +2,8 @@ module LayoutHelper def body_classes # Identify the current controller and action for the CSS: - " controller-#{@controller.controller_name}" + - " action-#{@controller.controller_name}-#{@controller.action_name}" + + " controller-#{controller.controller_name}" + + " action-#{controller.controller_name}-#{controller.action_name}" + " template-#{@layout_template || if profile.blank? then 'default' else profile.layout_template end}" + (!profile.nil? && profile.is_on_homepage?(request.path,@page) ? " profile-homepage" : "") end -- libgit2 0.21.2