Skip to content

Instantly share code, notes, and snippets.

@tdeebswihart
Created March 5, 2014 02:02
Show Gist options
  • Save tdeebswihart/9359841 to your computer and use it in GitHub Desktop.
Save tdeebswihart/9359841 to your computer and use it in GitHub Desktop.
user
class User < ActiveRecord::Base
# Connects this user object to Sufia behaviors.
include Sufia::User
include Curate::UserBehavior
# Connects this user object to Hydra behaviors.
include Hydra::User
attr_accessible :email, :password, :password_confirmation if Rails::VERSION::MAJOR < 4
# Connects this user object to Blacklights Bookmarks.
include Blacklight::User
# Include default devise modules. Others available are:
# :confirmable, :lockable, :timeoutable and :omniauthable
devise :database_authenticatable, :registerable,
:recoverable, :rememberable, :trackable, :validatable
# Method added by Blacklight; Blacklight uses #to_s on your
# user class to get a user-displayable login/identifier for
# the account.
def to_s
email
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment