fixes some deprecation warnings

This commit is contained in:
alejandro
2017-05-01 12:49:46 +02:00
committed by Julian Herrero
parent 1077a632cb
commit bafab3b769
6 changed files with 10 additions and 10 deletions

View File

@@ -39,7 +39,7 @@ class Admin::BudgetInvestmentsController < Admin::BaseController
if @investment.update(budget_investment_params)
redirect_to admin_budget_budget_investment_path(@budget,
@investment,
Budget::Investment.filter_params(params)),
Budget::Investment.filter_params(params).to_h),
notice: t("flash.actions.update.budget_investment")
else
load_admins

View File

@@ -97,8 +97,8 @@ class Valuation::BudgetInvestmentsController < Valuation::BaseController
end
def params_for_current_valuator
Budget::Investment.filter_params(params).merge(valuator_id: current_user.valuator.id,
budget_id: @budget.id)
Budget::Investment.filter_params(params).to_h.merge({ valuator_id: current_user.valuator.id,
budget_id: @budget.id })
end
def valuation_params

View File

@@ -5,7 +5,7 @@
<%= link_to investment.title,
admin_budget_budget_investment_path(budget_id: @budget.id,
id: investment.id,
params: Budget::Investment.filter_params(params)),
params: Budget::Investment.filter_params(params).to_h),
target: "_blank" %>
</td>
<td class="text-center">

View File

@@ -1,11 +1,11 @@
<%= link_to admin_budget_budget_investment_path(@budget, @investment, Budget::Investment.filter_params(params)), class: "back" do %>
<%= link_to admin_budget_budget_investment_path(@budget, @investment, Budget::Investment.filter_params(params).to_h), class: "back" do %>
<span class="icon-angle-left"></span> <%= t("shared.back") %>
<% end %>
<%= form_for @investment,
url: admin_budget_budget_investment_path(@budget, @investment) do |f| %>
<% Budget::Investment.filter_params(params).each do |filter_name, filter_value| %>
<% Budget::Investment.filter_params(params).to_h.each do |filter_name, filter_value| %>
<%= hidden_field_tag filter_name, filter_value %>
<% end %>

View File

@@ -1,4 +1,4 @@
<%= link_to admin_budget_budget_investments_path(Budget::Investment.filter_params(params)),
<%= link_to admin_budget_budget_investments_path(Budget::Investment.filter_params(params).to_h),
class: "back", data: {no_turbolink: true} do %>
<span class="icon-angle-left"></span><%= t("shared.back") %>
<% end %>
@@ -7,7 +7,7 @@
<%= link_to t("admin.budget_investments.show.edit"),
edit_admin_budget_budget_investment_path(@budget, @investment,
Budget::Investment.filter_params(params)) unless @budget.finished? %>
Budget::Investment.filter_params(params).to_h) unless @budget.finished? %>
<hr>
@@ -44,7 +44,7 @@
<p>
<%= link_to t("admin.budget_investments.show.edit_classification"),
edit_admin_budget_budget_investment_path(@budget, @investment,
{anchor: "classification"}.merge(Budget::Investment.filter_params(params))) unless @budget.finished? %>
{anchor: "classification"}.merge(Budget::Investment.filter_params(params).to_h)) unless @budget.finished? %>
</p>
<hr>

View File

@@ -14,7 +14,7 @@ describe HasOrders do
end
def new
render text: "#{@current_order} (#{@valid_orders.join(" ")})"
render plain: "#{@current_order} (#{@valid_orders.join(" ")})"
end
end