Skip to content

Commit

Permalink
Simplify method to render admin menu
Browse files Browse the repository at this point in the history
The `side_menu` helper method isn't necessary since commit 13b3d9c.
  • Loading branch information
javierm committed Aug 28, 2020
1 parent 031d870 commit 527b9d9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
8 changes: 0 additions & 8 deletions app/helpers/admin_helper.rb
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
module AdminHelper
def side_menu
if namespace == "moderation/budgets"
render "/moderation/menu"
else
render "/#{namespace}/menu"
end
end

def namespaced_root_path
"/#{namespace}"
end
Expand Down
2 changes: 1 addition & 1 deletion app/views/layouts/admin.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<%= check_box_tag :show_menu, nil, false, role: "switch" %>

<nav id="side_menu" class="admin-sidebar">
<%= side_menu %>
<%= render "/#{namespace}/menu" %>
</nav>

<div class="admin-content">
Expand Down

0 comments on commit 527b9d9

Please sign in to comment.