about summary refs log tree commit diff
path: root/app/models/block.rb
blob: dc05bce877e28d07d307a0321856a1e4ca490b40 (plain) (blame)
1
2
3
4
5
6
7
8
9
# frozen_string_literal: true

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