Adding a block model and filter mentions from blocked users (fix #60)

This commit is contained in:
Eugen Rochko
2016-10-03 17:11:54 +02:00
parent a488b05726
commit 9d59d7b463
11 changed files with 55 additions and 12 deletions

7
app/models/block.rb Normal file
View File

@ -0,0 +1,7 @@
class Block < ApplicationRecord
belongs_to :account
belongs_to :target_account, class_name: 'Account'
validates :account, :target_account, presence: true
validates :account_id, uniqueness: { scope: :target_account_id }
end