Use paths instead of URLs where possible

It simplifies the code and solves any issue we might have configuring
the host in the test environment.
This commit is contained in:
Javi Martín
2019-04-29 12:14:53 +02:00
parent db6ed4772c
commit 241ee313f1
3 changed files with 9 additions and 9 deletions

View File

@@ -98,19 +98,19 @@
<% show_links = show_links_to_budget_investments(current_budget) %>
<% if show_links %>
<li>
<%= link_to budget_url(current_budget) do %>
<%= link_to budget_path(current_budget) do %>
<small><%= t("budgets.index.investment_proyects") %></small>
<% end %>
</li>
<% end %>
<li>
<%= link_to budget_url(current_budget, filter: "unfeasible") do %>
<%= link_to budget_path(current_budget, filter: "unfeasible") do %>
<small><%= t("budgets.index.unfeasible_investment_proyects") %></small>
<% end %>
</li>
<% if show_links %>
<li>
<%= link_to budget_url(current_budget, filter: "unselected") do %>
<%= link_to budget_path(current_budget, filter: "unselected") do %>
<small><%= t("budgets.index.not_selected_investment_proyects") %></small>
<% end %>
</li>

View File

@@ -76,13 +76,13 @@
<% end %>
<p>
<%= link_to budget_url(@budget) do %>
<%= link_to budget_path(@budget) do %>
<small><%= t("budgets.results.investment_proyects") %></small>
<% end %><br>
<%= link_to budget_url(@budget, filter: "unfeasible") do %>
<%= link_to budget_path(@budget, filter: "unfeasible") do %>
<small><%= t("budgets.results.unfeasible_investment_proyects") %></small>
<% end %><br>
<%= link_to budget_url(@budget, filter: "unselected") do %>
<%= link_to budget_path(@budget, filter: "unselected") do %>
<small><%= t("budgets.results.not_selected_investment_proyects") %></small>
<% end %>
</p>