Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Issue with callbacks and Rails 3 #194

magagnon opened this Issue · 2 comments

2 participants


Rails 3 introduced a new api for callbacks. Callbacks should use the :terminator option to change the default behavior (exiting the callback chain on true instead of false)

Instead of this:
run_callbacks(:persist) { |result, object| result == true }

We need to do this:
base.define_callbacks 'persist', :terminator => 'result == true'

The problem with the current version is that we never exit the callback chain when a session is created. It just keeps going and it always goes through the whole chain.

I fixed the callbacks.rb file in this patch:



I can't believe this hasn't been caught by now. Fundamental change of run_callbacks, so the persistence chain isn't halted currently if a "persist_by_x" method returns true.


Fyi, patched this myself w/tests and sent a pull request: #285

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.