module Authlogic::Session::ActiveRecordTrickery

Authlogic looks like ActiveRecord, sounds like ActiveRecord, but its not ActiveRecord. That's the goal here. This is useful for the various rails helper methods such as form_for, error_messages_for, or any method that expects an ActiveRecord object. The point is to disguise the object as an ActiveRecord object so we can take advantage of the many ActiveRecord tools.

Public Class Methods

included(klass) click to toggle source
# File lib/authlogic/session/active_record_trickery.rb, line 8
def self.included(klass)
  klass.extend ClassMethods
  klass.send(:include, InstanceMethods)
end