Skip to content


Fix bug in persist callback for Rails 4.1 #395

merged 1 commit into from

2 participants


I noticed a couple of days back when using the fork that introduced this change, that my code did not run anymore, my spec were failing, testing use rails server failed. I tested just now with master and have the same problem. Looking at the new code I saw that where persist previously had a 'result==true' (look at line 71), it now has result==false. Changing this resolves the problem.


awesome, thanks

@binarylogic binarylogic merged commit 1599622 into binarylogic:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 1, 2014
  1. @Hermanverschooten
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/authlogic/session/callbacks.rb
4 lib/authlogic/session/callbacks.rb
@@ -65,7 +65,7 @@ def self.included(base) #:nodoc:
base.send :include, ActiveSupport::Callbacks
if ActiveSupport::VERSION::STRING >= '4.1'
base.define_callbacks *METHODS + [{:terminator => ->(target, result){ result == false } }]
- base.define_callbacks *['persist', {:terminator => ->(target, result){ result == false } }]
+ base.define_callbacks *['persist', {:terminator => ->(target, result){ result == true } }]
base.define_callbacks *METHODS + [{:terminator => 'result == false'}]
base.define_callbacks *['persist', {:terminator => 'result == true'}]
@@ -98,4 +98,4 @@ def save_record(alternate_record = nil)
Something went wrong with that request. Please try again.