Skip to content

Instantly share code, notes, and snippets.

@reedlaw
Created October 31, 2013 17:10
Show Gist options
  • Save reedlaw/7253360 to your computer and use it in GitHub Desktop.
Save reedlaw/7253360 to your computer and use it in GitHub Desktop.
User repository
# == Schema Information
#
# Table name: user_repository
#
# id :integer not null, primary key
# account_repository_id :integer
# first_name :text
# last_name :text
# state :text
# email :string(255) default(""), not null
# encrypted_password :string(255) default(""), not null
# reset_password_token :string(255)
# reset_password_sent_at :datetime
# remember_created_at :datetime
# sign_in_count :integer default(0), not null
# current_sign_in_at :datetime
# last_sign_in_at :datetime
# current_sign_in_ip :string(255)
# last_sign_in_ip :string(255)
#
class UserRepository < ActiveRecord::Base
self.table_name = 'user_repository'
belongs_to :account, class_name: 'AccountRepository', foreign_key: :account_repository_id
devise :database_authenticatable, :registerable, :recoverable, :rememberable, :trackable
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment