Fixes admin menu link when create a new widget
This commit is contained in:
@@ -9,11 +9,7 @@ module AdminHelper
|
||||
end
|
||||
|
||||
def namespaced_root_path
|
||||
if namespace == 'moderation/budgets'
|
||||
"/moderation"
|
||||
else
|
||||
"/#{namespace}"
|
||||
end
|
||||
"/#{namespace}"
|
||||
end
|
||||
|
||||
def namespaced_header_title
|
||||
@@ -95,7 +91,7 @@ module AdminHelper
|
||||
private
|
||||
|
||||
def namespace
|
||||
controller.class.parent.name.downcase.gsub("::", "/")
|
||||
controller.class.name.downcase.split("::").first
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -27,7 +27,7 @@ module BudgetsHelper
|
||||
|
||||
def namespaced_budget_investment_path(investment, options = {})
|
||||
case namespace
|
||||
when "management/budgets"
|
||||
when "management"
|
||||
management_budget_investment_path(investment.budget, investment, options)
|
||||
else
|
||||
budget_investment_path(investment.budget, investment, options)
|
||||
@@ -36,7 +36,7 @@ module BudgetsHelper
|
||||
|
||||
def namespaced_budget_investment_vote_path(investment, options = {})
|
||||
case namespace
|
||||
when "management/budgets"
|
||||
when "management"
|
||||
vote_management_budget_investment_path(investment.budget, investment, options)
|
||||
else
|
||||
vote_budget_investment_path(investment.budget, investment, options)
|
||||
|
||||
Reference in New Issue
Block a user