Module: Cornerstone::ActsAsCornerstoneUser::ClassMethods

Defined in:
lib/cornerstone/acts_as_cornerstone_user.rb

Instance Method Summary collapse

Instance Method Details

#acts_as_cornerstone_user(options = {}) ⇒ Object

Method placed within User model of parent application and used to set Cornerstone options for the model.



33
34
35
36
37
38
39
40
41
# File 'lib/cornerstone/acts_as_cornerstone_user.rb', line 33

def acts_as_cornerstone_user(options = {})
  # == Options

  # TODO: CHECK that the methods given actually exist and raise error if not
  #       CHECK that values given are good types
  self.cornerstone_name_method = options[:user_name] if options[:user_name]
  self.cornerstone_email_method = options[:user_email] if options[:user_email]
  self.cornerstone_admin = options[:admin] if options[:admin]
end