Sha256: 8661f6420d5d4a3470862f79627bf984082368ce8f3a4643bc0465f98efc2278

Contents?: true

Size: 925 Bytes

Versions: 4

Compression:

Stored size: 925 Bytes

Contents

class AdminUser
  include Mongoid::Document
  # Include default devise modules. Others available are:
  # :token_authenticatable, :confirmable,
  # :lockable, :timeoutable and :omniauthable
  devise :database_authenticatable,
         :recoverable, :rememberable, :trackable, :validatable

  ## Database authenticatable
  field :email,              :type => String, :default => ""
  field :encrypted_password, :type => String, :default => ""

  ## Recoverable
  field :reset_password_token,   :type => String
  field :reset_password_sent_at, :type => Time

  ## Rememberable
  field :remember_created_at, :type => Time

  ## Trackable
  field :sign_in_count,      :type => Integer, :default => 0
  field :current_sign_in_at, :type => Time
  field :last_sign_in_at,    :type => Time
  field :current_sign_in_ip, :type => String
  field :last_sign_in_ip,    :type => String

  has_many :posts
  
  def name
    email
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
activeadmin-mongoid-1.0.0 test_app/app/models/admin_user.rb
activeadmin-mongoid-0.9.0 test_app/app/models/admin_user.rb
activeadmin-mongoid-0.7.0 test_app/app/models/admin_user.rb
activeadmin-mongoid-0.5.0 test_app/app/models/admin_user.rb