Merge pull request #505 from dgilperez/debates_max_votes_editable

Adds setting to control max number of votes for a Debate to be editable
This commit is contained in:
Enrique García
2015-09-22 16:52:52 +02:00
7 changed files with 24 additions and 13 deletions

View File

@@ -9,6 +9,7 @@ Setting.create(key: 'official_level_3_name', value: 'Directores generales')
Setting.create(key: 'official_level_4_name', value: 'Concejales')
Setting.create(key: 'official_level_5_name', value: 'Alcaldesa')
Setting.create(key: 'max_ratio_anon_votes_on_debates', value: '50')
Setting.create(key: 'max_votes_for_debate_edit', value: '1000')
Setting.create(key: 'max_votes_for_proposal_edit', value: '1000')
Setting.create(key: 'proposal_code_prefix', value: 'MAD')
Setting.create(key: 'votes_for_proposal_success', value: '100')
@@ -198,8 +199,3 @@ puts "Confirming hiding in debates, comments & proposals"
Comment.only_hidden.flagged.reorder("RANDOM()").limit(10).each(&:confirm_hide)
Debate.only_hidden.flagged.reorder("RANDOM()").limit(5).each(&:confirm_hide)
Proposal.only_hidden.flagged.reorder("RANDOM()").limit(5).each(&:confirm_hide)

View File

@@ -15,6 +15,9 @@ Setting.create(key: 'official_level_5_name', value: 'Alcaldesa')
# Max percentage of allowed anonymous votes on a debate
Setting.create(key: 'max_ratio_anon_votes_on_debates', value: '50')
# Max votes where a debate is still editable
Setting.create(key: 'max_votes_for_debate_edit', value: '1000')
# Max votes where a proposal is still editable
Setting.create(key: 'max_votes_for_proposal_edit', value: '1000')