diff --git a/app/models/comment.rb b/app/models/comment.rb index 3771af84a..47beb5050 100644 --- a/app/models/comment.rb +++ b/app/models/comment.rb @@ -95,7 +95,7 @@ class Comment < ActiveRecord::Base end def self.body_max_length - 1000 + Setting['comments_body_max_length'].to_i end def calculate_confidence_score diff --git a/db/dev_seeds.rb b/db/dev_seeds.rb index f36ed5b36..14af135da 100644 --- a/db/dev_seeds.rb +++ b/db/dev_seeds.rb @@ -24,6 +24,8 @@ Setting.create(key: 'feature.twitter_login', value: "true") Setting.create(key: 'feature.facebook_login', value: "true") Setting.create(key: 'feature.google_login', value: "true") +Setting.create(key: 'comments_body_max_length', value: '1000') + puts "Creating Geozones" ('A'..'Z').each{ |i| Geozone.create(name: "District #{i}") } diff --git a/db/seeds.rb b/db/seeds.rb index fb4f26b8b..55bd65e22 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -57,3 +57,6 @@ Setting['feature.twitter_login'] = true Setting['feature.facebook_login'] = true Setting['feature.google_login'] = true Setting['feature.public_stats'] = true + +# Max length for comments +Setting['comments_body_max_length'] = 1000