Class: Block

Inherits:
ApplicationRecord show all
Defined in:
app/models/block.rb

Instance Method Summary collapse

Instance Method Details

#not_blocking_yourselfObject


13
14
15
16
17
# File 'app/models/block.rb', line 13

def not_blocking_yourself
  if self.user.person.id == self.person_id
    errors[:person_id] << "stop blocking yourself!"
  end
end

#subscribersArray<Person>

Returns The recipient of the block.

Returns:

  • (Array<Person>)

    The recipient of the block


20
21
22
# File 'app/models/block.rb', line 20

def subscribers
  [person]
end