Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module Authlogic
- module Session
- module Callbacks
- def self.included(base) #:nodoc:
- base.send :include, ActiveSupport::Callbacks
- base.define_callbacks *METHODS
- base.define_callbacks :persist, :terminator => "result == true"
- # If Rails 3, support the new callback syntax
- if base.send(base.respond_to?(:singleton_class) ? :singleton_class : :metaclass).method_defined?(:set_callback)
- METHODS.each do |method|
- base.class_eval <<-"end_eval", __FILE__, __LINE__
- def self.#{method}(*methods, &block)
- set_callback :#{method}, *methods, &block
- end
- end_eval
- end
- end
- end
- end
- end
- module ControllerAdapters
- class AbstractAdapter
- def responds_to_http_auth_allowed?
- controller.respond_to?(:http_auth_allowed?, true)
- end
- def http_auth_allowed?
- controller.send(:http_auth_allowed?)
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment