Duplicate current_budget method in management_base_controller
This method is already existent in the application_controller but it seems a little overkill to create a concern just for this method Maybe when we have multiple method it makes sense to create a nice controller. Another option would be to make the management_base_controller extend from the application_controller
This commit is contained in:
@@ -5,6 +5,7 @@ class Management::BaseController < ActionController::Base
|
|||||||
before_action :set_locale
|
before_action :set_locale
|
||||||
|
|
||||||
helper_method :managed_user
|
helper_method :managed_user
|
||||||
|
helper_method :current_user
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
@@ -40,4 +41,7 @@ class Management::BaseController < ActionController::Base
|
|||||||
I18n.locale = session[:locale]
|
I18n.locale = session[:locale]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def current_budget
|
||||||
|
Budget.current
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user