Allow printing investments from any budget in the management interface

This commit is contained in:
Senén Rodero Rodríguez
2023-01-16 12:58:15 +01:00
parent 569138cbae
commit 96f584c4f7
6 changed files with 69 additions and 17 deletions

View File

@@ -49,10 +49,6 @@ class Management::BaseController < ActionController::Base
I18n.with_locale(session[:locale], &action)
end
def current_budget
Budget.current
end
def clear_password
session[:new_password] = nil
end

View File

@@ -19,7 +19,7 @@ class Management::BudgetsController < Management::BaseController
end
def print_investments
@budget = current_budget
@budgets = Budget.published.order(created_at: :desc).page(params[:page])
end
private