Class: Actn::Api::User

Inherits:
DB::Mod
  • Object
show all
Defined in:
lib/actn/api/user.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#passwordObject

Returns the value of attribute password.



22
23
24
# File 'lib/actn/api/user.rb', line 22

def password
  @password
end

#password_confirmationObject

Returns the value of attribute password_confirmation.



22
23
24
# File 'lib/actn/api/user.rb', line 22

def password_confirmation
  @password_confirmation
end

Class Method Details

.find_for_auth(params) ⇒ Object



16
17
18
19
20
# File 'lib/actn/api/user.rb', line 16

def self.find_for_auth params
  return unless user = self.find_by('email' => params['email'])
  return unless user.password == params['password']
  user.uuid
end

Instance Method Details

#to_json(options = {}) ⇒ Object



41
42
43
# File 'lib/actn/api/user.rb', line 41

def to_json options = {}
  super(options.merge(:exclude [:hash]))
end