Class: AdminUser

Inherits:
Object
  • Object
show all
Includes:
Ants::Id, Mongoid::Document, Mongoid::Search, Mongoid::Timestamps
Defined in:
app/models/admin_user.rb

Instance Method Summary collapse

Methods included from Ants::Id

#serializable_hash

Instance Method Details

#_list_item_subtitleObject


60
61
62
# File 'app/models/admin_user.rb', line 60

def _list_item_subtitle
  
end

#_list_item_thumbnailObject


64
65
66
67
# File 'app/models/admin_user.rb', line 64

def _list_item_thumbnail
  hex = Digest::MD5.hexdigest(email)
  "//www.gravatar.com/avatar/#{hex}?s=80&d=retro&r=g"
end

#_list_item_titleObject


56
57
58
# File 'app/models/admin_user.rb', line 56

def _list_item_title
  name.empty? ? email : name
end

#ascObject

Scopes


45
# File 'app/models/admin_user.rb', line 45

default_scope -> { asc(:name) }

#devise_mailerObject

Helpers


52
53
54
# File 'app/models/admin_user.rb', line 52

def devise_mailer
  AdminUserMailer
end

#emailObject

Database authenticatable


21
# File 'app/models/admin_user.rb', line 21

field :email,              type: String, default: ""

#nameObject

Search


8
# File 'app/models/admin_user.rb', line 8

field :name

#remember_created_atObject

Rememberable


29
# File 'app/models/admin_user.rb', line 29

field :remember_created_at, type: Time

#reset_password_tokenObject

Recoverable


25
# File 'app/models/admin_user.rb', line 25

field :reset_password_token,   type: String

#sign_in_countObject

Trackable


32
# File 'app/models/admin_user.rb', line 32

field :sign_in_count,      type: Integer, default: 0