From bd7beed8a18eb0aa079cf15c3960b5cdf36acac3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Fri, 20 Mar 2020 19:27:11 +0100 Subject: [PATCH] Remove no longer necessary flag/unflag HTML IDs They were added in commit 015fe704 because we used them in the specs, but we don't use them anymore and they make the code hard to read. --- app/views/budgets/investments/_flag_actions.html.erb | 10 ++++------ app/views/comments/_flag_actions.html.erb | 12 ++++-------- app/views/debates/_flag_actions.html.erb | 8 ++++---- .../legislation/proposals/_flag_actions.html.erb | 8 ++++---- app/views/proposals/_flag_actions.html.erb | 8 ++++---- 5 files changed, 20 insertions(+), 26 deletions(-) diff --git a/app/views/budgets/investments/_flag_actions.html.erb b/app/views/budgets/investments/_flag_actions.html.erb index d00bbe6b9..44f384c3b 100644 --- a/app/views/budgets/investments/_flag_actions.html.erb +++ b/app/views/budgets/investments/_flag_actions.html.erb @@ -1,25 +1,23 @@ <% if show_flag_action? investment %> - "> + "> <%= link_to t("shared.flag"), flag_budget_investment_path(investment.budget, investment.id), method: :put, - remote: true, - id: "flag-investment-#{investment.id}" %> + remote: true %> <% end %> <% if show_unflag_action? investment %> - "> + "> <%= link_to t("shared.unflag"), unflag_budget_investment_path(investment.budget, investment.id), method: :put, - remote: true, - id: "unflag-investment-#{investment.id}" %> + remote: true %> <% end %> diff --git a/app/views/comments/_flag_actions.html.erb b/app/views/comments/_flag_actions.html.erb index cac924994..16e50f93b 100644 --- a/app/views/comments/_flag_actions.html.erb +++ b/app/views/comments/_flag_actions.html.erb @@ -1,9 +1,7 @@ <% if show_flag_action? comment %>  |  - "> + "> <%= link_to t("shared.flag"), flag_comment_path(comment), method: :put, - remote: true, id: "flag-comment-#{comment.id}" %> + remote: true %> <% end %> <% if show_unflag_action? comment %>  |  - "> + "> <%= link_to t("shared.unflag"), unflag_comment_path(comment), method: :put, - remote: true, id: "unflag-comment-#{comment.id}" %> + remote: true %> <% end %> diff --git a/app/views/debates/_flag_actions.html.erb b/app/views/debates/_flag_actions.html.erb index 66d4e9179..e6b3308df 100644 --- a/app/views/debates/_flag_actions.html.erb +++ b/app/views/debates/_flag_actions.html.erb @@ -1,19 +1,19 @@ <% if show_flag_action? debate %> - "> + "> - <%= link_to t("shared.flag"), flag_debate_path(debate), method: :put, remote: true, id: "flag-debate-#{debate.id}" %> + <%= link_to t("shared.flag"), flag_debate_path(debate), method: :put, remote: true %> <% end %> <% if show_unflag_action? debate %> - "> + "> - <%= link_to t("shared.unflag"), unflag_debate_path(debate), method: :put, remote: true, id: "unflag-debate-#{debate.id}" %> + <%= link_to t("shared.unflag"), unflag_debate_path(debate), method: :put, remote: true %> <% end %> diff --git a/app/views/legislation/proposals/_flag_actions.html.erb b/app/views/legislation/proposals/_flag_actions.html.erb index 6d86b63a2..10a7892cc 100644 --- a/app/views/legislation/proposals/_flag_actions.html.erb +++ b/app/views/legislation/proposals/_flag_actions.html.erb @@ -1,19 +1,19 @@ <% if show_flag_action? proposal %> - "> + "> - <%= link_to t("shared.flag"), flag_legislation_process_proposal_path(proposal.process, proposal), method: :put, remote: true, id: "flag-proposal-#{proposal.id}" %> + <%= link_to t("shared.flag"), flag_legislation_process_proposal_path(proposal.process, proposal), method: :put, remote: true %> <% end %> <% if show_unflag_action? proposal %> - "> + "> - <%= link_to t("shared.unflag"), unflag_legislation_process_proposal_path(proposal.process, proposal), method: :put, remote: true, id: "unflag-proposal-#{proposal.id}" %> + <%= link_to t("shared.unflag"), unflag_legislation_process_proposal_path(proposal.process, proposal), method: :put, remote: true %> <% end %> diff --git a/app/views/proposals/_flag_actions.html.erb b/app/views/proposals/_flag_actions.html.erb index ec012e3df..ed8e7aab0 100644 --- a/app/views/proposals/_flag_actions.html.erb +++ b/app/views/proposals/_flag_actions.html.erb @@ -1,19 +1,19 @@ <% if show_flag_action? proposal %> - "> + "> - <%= link_to t("shared.flag"), flag_proposal_path(proposal), method: :put, remote: true, id: "flag-proposal-#{proposal.id}" %> + <%= link_to t("shared.flag"), flag_proposal_path(proposal), method: :put, remote: true %> <% end %> <% if show_unflag_action? proposal %> - "> + "> - <%= link_to t("shared.unflag"), unflag_proposal_path(proposal), method: :put, remote: true, id: "unflag-proposal-#{proposal.id}" %> + <%= link_to t("shared.unflag"), unflag_proposal_path(proposal), method: :put, remote: true %> <% end %>