adds setting value check in Proposal#editable?

This commit is contained in:
Juanjo Bazán
2015-09-12 12:53:22 +02:00
parent f22f0afe3c
commit 26113cac96
2 changed files with 23 additions and 1 deletions

View File

@@ -63,7 +63,7 @@ class Proposal < ActiveRecord::Base
end
def editable?
total_votes <= 1000
total_votes <= Setting.value_for("max_votes_for_proposal_edit").to_i
end
def editable_by?(user)