Use the vote action to vote featured proposals

The action and the views were almost identical, with the supports
progress and the HTML classes of the success message element being the
only exceptions; we can use CSS for the styles instead.
This commit is contained in:
Javi Martín
2021-09-28 20:02:41 +02:00
parent b98244afd9
commit 4b42a68b6a
14 changed files with 17 additions and 64 deletions

View File

@@ -71,11 +71,6 @@ class ProposalsController < ApplicationController
def retire_form
end
def vote_featured
@follow = Follow.find_or_create_by!(user: current_user, followable: @proposal)
@proposal.register_vote(current_user, "yes")
end
def summary
@proposals = Proposal.for_summary
@tag_cloud = tag_cloud