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
50 51 52 53 54 55 56 |
# File 'lib/authlogic/session/klass.rb', line 50 def initialize(*args) if !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 |