diff --git a/app/views/comments/_comment.html.erb b/app/views/comments/_comment.html.erb index 75d3887ca..549bab2d1 100644 --- a/app/views/comments/_comment.html.erb +++ b/app/views/comments/_comment.html.erb @@ -81,7 +81,7 @@
<% unless valuation %>
- <%= render "comments/votes", comment: comment %> + <%= render Comments::VotesComponent.new(comment) %>
<% end %> diff --git a/app/views/comments/_votes.html.erb b/app/views/comments/_votes.html.erb deleted file mode 100644 index e45be3c2c..000000000 --- a/app/views/comments/_votes.html.erb +++ /dev/null @@ -1 +0,0 @@ -<%= render Comments::VotesComponent.new(comment) %> diff --git a/app/views/comments/vote.js.erb b/app/views/comments/vote.js.erb index 2fe859cbd..f26291e73 100644 --- a/app/views/comments/vote.js.erb +++ b/app/views/comments/vote.js.erb @@ -1 +1 @@ -$("#<%= dom_id(@comment) %>_votes").html("<%= j render("comments/votes", comment: @comment) %>"); +$("#<%= dom_id(@comment) %>_votes").html("<%= j render Comments::VotesComponent.new(@comment) %>"); diff --git a/app/views/debates/_debate.html.erb b/app/views/debates/_debate.html.erb index 905c3ec79..68de5a60d 100644 --- a/app/views/debates/_debate.html.erb +++ b/app/views/debates/_debate.html.erb @@ -49,7 +49,7 @@
- <%= render "debates/votes", debate: debate %> + <%= render Debates::VotesComponent.new(debate) %>
diff --git a/app/views/debates/_votes.html.erb b/app/views/debates/_votes.html.erb deleted file mode 100644 index 01a1f2b3f..000000000 --- a/app/views/debates/_votes.html.erb +++ /dev/null @@ -1 +0,0 @@ -<%= render Debates::VotesComponent.new(debate) %> diff --git a/app/views/debates/show.html.erb b/app/views/debates/show.html.erb index 52146ee68..38fc11825 100644 --- a/app/views/debates/show.html.erb +++ b/app/views/debates/show.html.erb @@ -57,7 +57,7 @@

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

- <%= render "debates/votes", debate: @debate %> + <%= render Debates::VotesComponent.new(@debate) %>
<%= render "shared/social_share", share_title: t("debates.show.share"), diff --git a/app/views/debates/vote.js.erb b/app/views/debates/vote.js.erb index aae060dbd..bee28fcc7 100644 --- a/app/views/debates/vote.js.erb +++ b/app/views/debates/vote.js.erb @@ -1 +1 @@ -$("#<%= dom_id(@debate) %>_votes").html("<%= j render("debates/votes", debate: @debate) %>"); +$("#<%= dom_id(@debate) %>_votes").html("<%= j render Debates::VotesComponent.new(@debate) %>"); diff --git a/app/views/legislation/annotations/_comments.html.erb b/app/views/legislation/annotations/_comments.html.erb index aad5a4248..c8c1bd29d 100644 --- a/app/views/legislation/annotations/_comments.html.erb +++ b/app/views/legislation/annotations/_comments.html.erb @@ -24,7 +24,7 @@
- <%= render "comments/votes", comment: comment %> + <%= render Comments::VotesComponent.new(comment) %>