module Authlogic::Session::ActiveRecordTrickery::InstanceMethods

Public Instance Methods

destroyed?() click to toggle source
# File lib/authlogic/session/active_record_trickery.rb, line 59
def destroyed?
  record.nil?
end
new_record?() click to toggle source

Don't use this yourself, this is to just trick some of the helpers since this is the method it calls.

# File lib/authlogic/session/active_record_trickery.rb, line 51
def new_record?
  new_session?
end
persisted?() click to toggle source
# File lib/authlogic/session/active_record_trickery.rb, line 55
def persisted?
  !(new_record? || destroyed?)
end
to_key() click to toggle source
# File lib/authlogic/session/active_record_trickery.rb, line 63
def to_key
  new_record? ? nil : record.to_key
end
to_model() click to toggle source

For rails >= 3.0

# File lib/authlogic/session/active_record_trickery.rb, line 68
def to_model
  self
end