]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/user_block.rb
Exclude files in the vendor directory from erb-lint rubocop checks
[rails.git] / app / models / user_block.rb
index 9f32862af52546bfbf4542599d38916af0ca76e8..27bc40498b90ba455006ffd054a2eadbb3e7d60f 100644 (file)
 
 class UserBlock < ActiveRecord::Base
   validate :moderator_permissions
+  validates :reason, :characters => true
 
   belongs_to :user, :class_name => "User", :foreign_key => :user_id
   belongs_to :creator, :class_name => "User", :foreign_key => :creator_id
   belongs_to :revoker, :class_name => "User", :foreign_key => :revoker_id
 
-  PERIODS = USER_BLOCK_PERIODS
+  PERIODS = Settings.user_block_periods
 
   ##
   # scope to match active blocks