Support creates follow (Merge pull request #3895)

* Supporting a proposal will create a follow relationship
* Only followers receive notifications
This commit is contained in:
Andy Sims
2020-04-06 23:26:47 +10:00
committed by GitHub
parent 14106ce800
commit 74fbde09f1
17 changed files with 44 additions and 48 deletions

View File

@@ -37,6 +37,7 @@ class Management::ProposalsController < Management::BaseController
end
def vote
@follow = Follow.find_or_create_by!(user: current_user, followable: @proposal)
@proposal.register_vote(managed_user, "yes")
set_proposal_votes(@proposal)
end