Skip to content

Commit

Permalink
Call Legislation::Proposals::VotesComponent directly
Browse files Browse the repository at this point in the history
  • Loading branch information
taitus committed Jun 27, 2023
1 parent ab2c548 commit d2b1817
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/views/legislation/proposals/_proposal.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
</div>

<div id="<%= dom_id(proposal) %>_votes" class="small-12 medium-3 column">
<%= render "legislation/proposals/votes", proposal: proposal %>
<%= render Legislation::Proposals::VotesComponent.new(proposal) %>
</div>
</div>
</div>
Expand Down
1 change: 0 additions & 1 deletion app/views/legislation/proposals/_votes.html.erb

This file was deleted.

2 changes: 1 addition & 1 deletion app/views/legislation/proposals/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
<div class="sidebar-divider"></div>
<h2><%= t("votes.supports") %></h2>
<div id="<%= dom_id(@proposal) %>_votes">
<%= render "votes", proposal: @proposal %>
<%= render Legislation::Proposals::VotesComponent.new(@proposal) %>
</div>
<%= render "shared/social_share",
share_title: t("proposals.show.share"),
Expand Down
3 changes: 2 additions & 1 deletion app/views/legislation/proposals/vote.js.erb
Original file line number Diff line number Diff line change
@@ -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) %>");

0 comments on commit d2b1817

Please sign in to comment.