Skip to content

Commit

Permalink
rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
zambot committed Mar 6, 2017
1 parent 2b65072 commit d60060d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions app/helpers/rails_admin/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -85,17 +85,15 @@ def main_navigation
end

def root_navigation

actions(:root).select(&:show_in_sidebar).group_by(&:sidebar_label).collect do |label, nodes|

li_stack = nodes.map do |node|
url = rails_admin.url_for(action: node.action_name, controller: "rails_admin/main")
nav_icon = node.link_icon ? %(<i class="#{node.link_icon}"></i>).html_safe : ''
content_tag :li do
link_to nav_icon + " " + wording_for(:menu, node), url, class: "pjax"
end
end.join.html_safe
label = label || t('admin.misc.root_navigation')
label ||= t('admin.misc.root_navigation')

%(<li class='dropdown-header'>#{capitalize_first_letter label}</li>#{li_stack}) if li_stack.present?
end.join.html_safe
Expand Down

0 comments on commit d60060d

Please sign in to comment.