Class: CapsuleCRM::User

Inherits:
Object
  • Object
show all
Extended by:
ActiveModel::Naming
Includes:
ActiveModel::Conversion, ActiveModel::Validations, Associations, Inspector, Querying::Configuration, Querying::FindAll, Serializable
Defined in:
lib/capsule_crm/user.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Serializable

included, #serializer, #to_capsule_json

Methods included from Querying::Configuration

included

Methods included from Inspector

#inspect

Class Method Details

.find_by_username(username) ⇒ Object



27
28
29
# File 'lib/capsule_crm/user.rb', line 27

def self.find_by_username(username)
  all.select { |user| user.username == username }.first
end

Instance Method Details

#idObject



23
24
25
# File 'lib/capsule_crm/user.rb', line 23

def id
  username
end