Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused code from Legislation proposals #5140

Merged
merged 2 commits into from
Jun 27, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Call Legislation::Proposals::VotesComponent directly
  • Loading branch information
taitus committed Jun 27, 2023
commit d2b181777dc47f935f9449b1e5a887aaf87e76c5
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) %>");
Loading