Class: Vines::Storage::Sql::Person

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
lib/vines/storage/sql.rb

Instance Method Summary collapse

Instance Method Details

#local?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/vines/storage/sql.rb', line 16

def local?
  !self.owner_id.nil?
end

#name(opts = {}) ⇒ Object



20
21
22
23
# File 'lib/vines/storage/sql.rb', line 20

def name(opts = {})
  self.profile.first_name.blank? && self.profile.last_name.blank? ?
    self.diaspora_handle : "#{self.profile.first_name.to_s.strip} #{self.profile.last_name.to_s.strip}".strip
end