Module: Sorcery::Model::InstanceMethods

Defined in:
lib/sorcery/model.rb

Instance Method Summary collapse

Instance Method Details

#external?Boolean

identifies whether this user is regular, i.e. we hold his credentials in our db, or that he is external, and his credentials are saved elsewhere (twitter/facebook etc.).

Returns:

  • (Boolean)


163
164
165
# File 'lib/sorcery/model.rb', line 163

def external?
  send(sorcery_config.crypted_password_attribute_name).nil?
end

#sorcery_configObject

Returns the class instance variable for configuration, when called by an instance.



157
158
159
# File 'lib/sorcery/model.rb', line 157

def sorcery_config
  self.class.sorcery_config
end