Sha256: ed0ac141b303f309d7fc2dcf3f5885e1f20e1c791784732d9903c0f7ba43fb11

Contents?: true

Size: 1.42 KB

Versions: 21

Compression:

Stored size: 1.42 KB

Contents

# == Schema Information
#
# Table name: users
#
#  id                     :integer          not null, primary key
#  login                  :string(20)       not null
#  email                  :string(255)
#  first_name             :string(60)
#  last_name              :string(60)
#  sign_in_count          :integer          default(0), not null
#  failed_attempts        :integer          default(0), not null
#  last_request_at        :datetime
#  current_sign_in_at     :datetime
#  last_sign_in_at        :datetime
#  current_sign_in_ip     :string(255)
#  last_sign_in_ip        :string(255)
#  created_at             :datetime
#  updated_at             :datetime
#  encrypted_password     :string(255)
#  confirmation_token     :string(255)
#  confirmed_at           :datetime
#  confirmation_sent_at   :datetime
#  reset_password_token   :string(255)
#  reset_password_sent_at :datetime
#  remember_token         :string(255)
#  remember_created_at    :datetime
#  unlock_token           :string(255)
#  locked_at              :datetime
#

class User < ActiveRecord::Base
  devise :database_authenticatable, :registerable, :rememberable, :trackable, :validatable, :confirmable, :recoverable, :token_authenticatable

  def role
    @role    ||= Role.for(self)
  end

  validates_presence_of :email
  validates_uniqueness_of :email

  validates_presence_of :email_confirmation, :on => :create
  validates :email, confirmation: true, :on => :create
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
xing-framework-1.0.0.pre.beta.1 default_configuration/base_app/backend/app/models/user.rb
xing-framework-1.0.0.pre.beta default_configuration/base_app/backend/app/models/user.rb
xing-framework-1.0.0.pre.alpha default_configuration/base_app/backend/app/models/user.rb
xing-framework-0.3.2 default_configuration/base_app/backend/app/models/user.rb
xing-framework-0.3.1 default_configuration/base_app/backend/app/models/user.rb
xing-framework-0.3.0 default_configuration/base_app/backend/app/models/user.rb
xing-framework-0.2.9 default_configuration/base_app/backend/app/models/user.rb
xing-framework-0.2.9.beta1 default_configuration/base_app/backend/app/models/user.rb
xing-framework-0.2.8 default_configuration/base_app/backend/app/models/user.rb
xing-framework-0.2.8.beta1 default_configuration/base_app/backend/app/models/user.rb
xing-framework-0.2.7 default_configuration/base_app/backend/app/models/user.rb
xing-framework-0.2.7.pre.beta1 default_configuration/base_app/backend/app/models/user.rb
xing-framework-0.2.6 default_configuration/base_app/backend/app/models/user.rb
xing-framework-0.2.5 default_configuration/base_app/backend/app/models/user.rb
xing-framework-0.2.4 default_configuration/base_app/backend/app/models/user.rb
xing-framework-0.2.3 default_configuration/base_app/backend/app/models/user.rb
xing-framework-0.2.2 default_configuration/base_app/backend/app/models/user.rb
xing-framework-0.2.1 default_configuration/base_app/backend/app/models/user.rb
xing-framework-0.2.0 default_configuration/base_app/backend/app/models/user.rb
xing-framework-0.0.3 default_configuration/base_app/backend/app/models/user.rb