Module: Authlogic::Session::Klass::InstanceMethods
- Defined in:
- lib/authlogic/session/klass.rb
Instance Method Summary collapse
-
#initialize(*args) ⇒ Object
Creating an alias method for the “record” method based on the klass name, so that we can do:.
Instance Method Details
#initialize(*args) ⇒ Object
Creating an alias method for the “record” method based on the klass name, so that we can do:
session.user
instead of:
session.record
53 54 55 56 57 58 59 |
# File 'lib/authlogic/session/klass.rb', line 53 def initialize(*args) unless self.class.configured_klass_methods self.class.send(:alias_method, klass_name.demodulize.underscore.to_sym, :record) self.class.configured_klass_methods = true end super end |