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
puts from inside your controller to see the ordered filter callback chain:
About the Author
BiographyMore Content by Nate Clark