allow the main app to add custom code in the locomotive layout

This commit is contained in:
Didier Lafforgue 2012-02-07 15:20:38 +01:00
parent 51a0862d89
commit a5e9e52996
3 changed files with 5 additions and 2 deletions

View File

@ -5,7 +5,7 @@ module Locomotive
def build_item(name, attributes)
item = super
enhanced_class = "#{'on' if name.to_s == sections(:sub)} #{item[:class]}"
enhanced_class = "#{'on' if name.to_s == sections(:sub).to_s} #{item[:class]}"
item.merge(:class => enhanced_class)
end

View File

@ -30,3 +30,5 @@
});
= yield :head
= render 'locomotive/shared/main_app_head'

View File

@ -0,0 +1 @@
- # this partial can be overridden in the main app in order to include extra css or js