Class: Digestive::User

Inherits:
ActiveRecord::Base
  • Object
show all
Includes:
Credentials
Defined in:
lib/digestive/user.rb

Overview

A simple User class which will function with Digestive.

Constant Summary collapse

DIGEST_REALM =

The realm to which the user will authenticate

'[email protected]'

Instance Method Summary collapse

Methods included from Credentials

#encrypt_password

Instance Method Details

#as_json(options = {}) ⇒ Object

The JSON representation of a User conceals the password



21
22
23
24
25
# File 'lib/digestive/user.rb', line 21

def as_json(options={})
  hash = super(options)
  hash['user']['password'] = ''
  hash
end