diff --git a/app/views/legislation/proposals/_proposal.html.erb b/app/views/legislation/proposals/_proposal.html.erb index 3df7e5c1b..b784e3ff8 100644 --- a/app/views/legislation/proposals/_proposal.html.erb +++ b/app/views/legislation/proposals/_proposal.html.erb @@ -64,8 +64,7 @@
- <%= render "legislation/proposals/votes", - { proposal: proposal, vote_url: vote_legislation_process_proposal_path(proposal.legislation_process_id, proposal, value: "yes") } %> + <%= render Legislation::Proposals::VotesComponent.new(proposal) %>
diff --git a/app/views/legislation/proposals/_votes.html.erb b/app/views/legislation/proposals/_votes.html.erb deleted file mode 100644 index 175527233..000000000 --- a/app/views/legislation/proposals/_votes.html.erb +++ /dev/null @@ -1 +0,0 @@ -<%= render Legislation::Proposals::VotesComponent.new(proposal) %> diff --git a/app/views/legislation/proposals/show.html.erb b/app/views/legislation/proposals/show.html.erb index 9be3ee3b3..0dc8654d0 100644 --- a/app/views/legislation/proposals/show.html.erb +++ b/app/views/legislation/proposals/show.html.erb @@ -105,8 +105,7 @@

<%= t("votes.supports") %>

- <%= render "votes", - { proposal: @proposal, vote_url: vote_legislation_process_proposal_path(@proposal.legislation_process_id, @proposal, value: "yes") } %> + <%= render Legislation::Proposals::VotesComponent.new(@proposal) %>
<%= render "shared/social_share", share_title: t("proposals.show.share"), diff --git a/app/views/legislation/proposals/vote.js.erb b/app/views/legislation/proposals/vote.js.erb index eccb9ea61..1845c6d80 100644 --- a/app/views/legislation/proposals/vote.js.erb +++ b/app/views/legislation/proposals/vote.js.erb @@ -1 +1,2 @@ -$("#<%= dom_id(@proposal) %>_votes").html("<%= j render("legislation/proposals/votes", proposal: @proposal) %>"); +$("#<%= dom_id(@proposal) %>_votes") + .html("<%= j render Legislation::Proposals::VotesComponent.new(@proposal) %>");