Sha256: e9ff537041e123b9600c8e3a14e9017761553df032b4f0a6b248830e49066f2c

Contents?: true

Size: 1.67 KB

Versions: 3

Compression:

Stored size: 1.67 KB

Contents

# == Schema Information
#
# Table name: users
#
#  id                   :integer(4)      not null, primary key
#  name                 :string(150)
#  login                :string(20)      not null
#  email                :string(255)     default(""), not null
#  encrypted_password   :string(128)     default(""), not null
#  password_salt        :string(255)     default(""), not null
#  reset_password_token :string(255)
#  remember_token       :string(255)
#  remember_created_at  :datetime
#  sign_in_count        :integer(4)      default(0)
#  current_sign_in_at   :datetime
#  last_sign_in_at      :datetime
#  current_sign_in_ip   :string(255)
#  last_sign_in_ip      :string(255)
#  confirmation_token   :string(255)
#  confirmed_at         :datetime
#  confirmation_sent_at :datetime
#  failed_attempts      :integer(4)      default(0)
#  locked_at            :datetime
#  created_at           :datetime
#  updated_at           :datetime
#
# Indexes
#
#  index_users_on_login                 (login) UNIQUE
#  index_users_on_email                 (email) UNIQUE
#  index_users_on_reset_password_token  (reset_password_token) UNIQUE
#  index_users_on_confirmation_token    (confirmation_token) UNIQUE
#

class User < ActiveRecord::Base
  include Freeberry::Models::User
  
  using_access_control
  
  # Include default devise modules.
  devise :database_authenticatable, :confirmable, :lockable, :timeoutable,
         :recoverable, :rememberable, :trackable, :validatable

  # Setup accessible (or protected) attributes for your model
  attr_accessible :name, :email, :password, :password_confirmation, :remember_me
  
#  acts_as_attach_file :avatar
  
  def to_param
    "#{id}-#{login}"
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
freeberry-0.2.7 lib/generators/freeberry/models/templates/models/user.rb
freeberry-0.2.6 lib/generators/freeberry/models/templates/models/user.rb
freeberry-0.2.5 lib/generators/freeberry/models/templates/models/user.rb