Skip to content
Browse files

Merge pull request #395 from Hermanverschooten/master

Fix bug in persist callback for Rails 4.1
  • Loading branch information...
2 parents 0691e39 + 5ed9e99 commit 1599622e084698f849c42d6b0c452d7b7dfbaaff @binarylogic committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/authlogic/session/callbacks.rb
View
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 } }]
else
base.define_callbacks *METHODS + [{:terminator => 'result == false'}]
base.define_callbacks *['persist', {:terminator => 'result == true'}]
@@ -98,4 +98,4 @@ def save_record(alternate_record = nil)
end
end
end
-end
+end

0 comments on commit 1599622

Please sign in to comment.
Something went wrong with that request. Please try again.