Class: Block

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/block.rb

Instance Method Summary collapse

Instance Method Details

#not_blocking_yourselfObject


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

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