Implementing an generic after_filter