]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/user_block.rb
Replace custom css class with bootstrap inline utility
[rails.git] / app / models / user_block.rb
index f56f87b9de255408ed72fb0d0a7044103c9591d0..60f680ac3016e02b2d4b6acf4437658b26f01f5d 100644 (file)
 #  user_blocks_user_id_fkey       (user_id => users.id)
 #
 
-class UserBlock < ActiveRecord::Base
+class UserBlock < ApplicationRecord
   validate :moderator_permissions
-  validates :reason, :invalid_chars => true
+  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