Sha256: c49a4f749707a681bd6c0ac2a36a961a18151bb9d8d19fcca7c2df16f97a958d
Contents?: true
Size: 847 Bytes
Versions: 12
Compression:
Stored size: 847 Bytes
Contents
module Authlogic module Session # = ActiveRecord Trickery # # 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, etc. # These helpers exptect various methods to be present. This adds in those methods into Authlogic. module ActiveRecordTrickery def self.included(klass) # :nodoc: klass.extend ClassMethods klass.send(:include, InstanceMethods) end module ClassMethods # :nodoc: def human_attribute_name(attribute_key_name, options = {}) attribute_key_name.humanize end end module InstanceMethods # :nodoc: def new_record? new_session? end end end end end
Version data entries
12 entries across 12 versions & 1 rubygems