Module: Skyline::MenuHelper
- Defined in:
- app/helpers/skyline/menu_helper.rb
Instance Method Summary collapse
Instance Method Details
#current_menu_scope(scope) ⇒ Object
21 22 23 |
# File 'app/helpers/skyline/menu_helper.rb', line 21 def (scope) (@_menu_scope || []) + scope end |
#menu_item(*scope) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'app/helpers/skyline/menu_helper.rb', line 6 def (*scope) scope = Array(scope) = scope. = .slice!(:method) url = scope.pop scope = (scope) if controller.[0, scope.size] == scope ([:class] ||= "") << " active" end content_tag("li", link_to(t(scope.last, :scope => [:navigation, scope[-2]]), url, ), ) end |