Fixed legislation proposal vote action

This commit is contained in:
María Checa
2017-09-21 16:23:34 +02:00
parent 6c1c71fcc9
commit 5ae8cda0d5
2 changed files with 2 additions and 2 deletions

View File

@@ -101,7 +101,7 @@ class Legislation::Proposal < ActiveRecord::Base
end end
def register_vote(user, vote_value) def register_vote(user, vote_value)
if votable_by?(user) && !archived? if votable_by?(user)
vote_by(voter: user, vote: vote_value) vote_by(voter: user, vote: vote_value)
end end
end end

View File

@@ -1 +1 @@
$("#<%= dom_id(@proposal) %>_votes").html('<%= j render("proposals/votes", proposal: @proposal) %>'); $("#<%= dom_id(@proposal) %>_votes").html('<%= j render("legislation/proposals/votes", proposal: @proposal) %>');