X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/c2f23fea6a7821a4ad4c97fd65744b138ec86267..067290f19f4aa36b89c110280099b77c115d3187:/app/models/user_block.rb?ds=sidebyside diff --git a/app/models/user_block.rb b/app/models/user_block.rb index f56f87b9d..02af385a7 100644 --- a/app/models/user_block.rb +++ b/app/models/user_block.rb @@ -3,12 +3,12 @@ # Table name: user_blocks # # id :integer not null, primary key -# user_id :bigint(8) not null -# creator_id :bigint(8) not null +# user_id :integer not null +# creator_id :integer not null # reason :text not null # ends_at :datetime not null # needs_view :boolean default(FALSE), not null -# revoker_id :bigint(8) +# revoker_id :integer # created_at :datetime # updated_at :datetime # reason_format :enum default("markdown"), not null @@ -26,7 +26,7 @@ class UserBlock < ActiveRecord::Base 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