changes made at the request of voodoorai2000

This commit is contained in:
Raúl Fuentes
2018-01-09 11:44:44 +01:00
parent b3461b2051
commit 29018e3062
5 changed files with 84 additions and 54 deletions

View File

@@ -1,11 +1,19 @@
module BudgetsHelper
def csv_params
csv_params = params.clone.merge(format: :csv)
csv_params = params.clone.merge(format: :csv).symbolize_keys
csv_params.delete(:page)
csv_params
end
def investment_selected_link(investment)
options = investment_selected_link_options(investment)
path = toggle_selection_admin_budget_budget_investment_path(@budget,
investment, filter: params[:filter], page: params[:page])
link_options = {method: :patch, remote: true, class: options[:link_class]}
link_to options[:text], path, link_options
end
def investment_selected_link_options(investment)
if investment.selected?
{link_class: "button small expanded",