Glad You're Ready. Let's Get Started!

Let us know how we can contact you.

Thank you!

We'll respond shortly.

revealing the ActionController callback filter chain

Sometimes your controllers get so full of before_filters, after_filters, and around_filters that it’s hard to figure out what order these callbacks are actually executing in. A couple of times recently, I’ve run into some tricky bugs that ended up being related to callbacks running too soon or too late.

Due to some fancy-pants metaprogramming in AbstractController::Callbacks, it’s hard to see what’s going on.

In Rails 3, send this to Rails.logger.debug or puts from inside your controller to see the ordered filter callback chain:

Post a Comment

Your Information (Name required. Email address will not be displayed with comment.)

* Copy This Password *

* Type Or Paste Password Here *