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:
rgarcia
2018-01-17 12:50:17 +01:00
parent 21cdddcbae
commit 952df2947a

View File

@@ -5,6 +5,7 @@ class Management::BaseController < ActionController::Base
before_action :set_locale
helper_method :managed_user
helper_method :current_user
private
@@ -40,4 +41,7 @@ class Management::BaseController < ActionController::Base
I18n.locale = session[:locale]
end
def current_budget
Budget.current
end
end