Adding a block model and filter mentions from blocked users (fix #60)
This commit is contained in:
7
app/models/block.rb
Normal file
7
app/models/block.rb
Normal 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
|
Reference in New Issue
Block a user