Module: RademadeAdmin::MenuHelper
- Defined in:
- app/helpers/rademade_admin/menu_helper.rb
Instance Method Summary collapse
Instance Method Details
#active?(menu_item) ⇒ Boolean
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'app/helpers/rademade_admin/menu_helper.rb', line 10 def active?() if [:is_current] true else [:sub].each do |sub_item| if active?(sub_item) return true end end false end end |
#main_menu ⇒ Object
3 4 5 6 7 8 |
# File 'app/helpers/rademade_admin/menu_helper.rb', line 3 def @model_infos = RademadeAdmin::Model::Graph.instance.root_models = collect_children .unshift({ :uri => url_for(:root), :name => 'Home', :ico => 'fa fa-home', :sub => [] }) end |