Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Fixed deprecated (by ActiveSupport 4.1.0) string terminators #387

merged 1 commit into from

4 participants

Christophe Maximin Herman verschooten Nick Pearson Ben Johnson
Herman verschooten

With the expected release of Rails 4.1, is there a reason why this pull request is not yet merged?

Nick Pearson

+1 for this pull request to get rid of the deprecation warnings in Rails 4.1.

Herman verschooten

Shouldn't this return true? I tried your fork and I couldn't get my app to work properly.

Ben Johnson binarylogic merged commit 4ac79c0 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 7 additions and 2 deletions.
  1. +7 −2 lib/authlogic/session/callbacks.rb
9 lib/authlogic/session/callbacks.rb
@@ -63,8 +63,13 @@ module Callbacks
def self.included(base) #:nodoc:
base.send :include, ActiveSupport::Callbacks
- base.define_callbacks *METHODS + [{:terminator => 'result == false'}]
- base.define_callbacks *['persist', {:terminator => 'result == true'}]
+ if ActiveSupport::VERSION::STRING >= '4.1'
+ base.define_callbacks *METHODS + [{:terminator => ->(target, result){ result == false } }]
+ base.define_callbacks *['persist', {:terminator => ->(target, result){ result == false } }]
+ else
+ base.define_callbacks *METHODS + [{:terminator => 'result == false'}]
+ base.define_callbacks *['persist', {:terminator => 'result == true'}]
+ end
# If Rails 3, support the new callback syntax
if base.singleton_class.method_defined?(:set_callback)
Something went wrong with that request. Please try again.