From e0ed4b7aa45cacba12ad5aeba23f71305579b395 Mon Sep 17 00:00:00 2001 From: Yehuda Katz Date: Sat, 23 May 2009 01:30:25 -0700 Subject: Make a couple more tests pass. A large number of the remaining failing tests have to do with the semantics of filters that are Objects. The right solution is probably to just implement the filter/before/after semantics in NewCallbacks directly (the current semantics are based on the old AS::Callbacks specs) --- actionpack/lib/action_controller/abstract/callbacks.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/actionpack/lib/action_controller/abstract/callbacks.rb b/actionpack/lib/action_controller/abstract/callbacks.rb index 51b968c694..e4f9dd3112 100644 --- a/actionpack/lib/action_controller/abstract/callbacks.rb +++ b/actionpack/lib/action_controller/abstract/callbacks.rb @@ -36,6 +36,17 @@ module AbstractController process_action_callback(:#{filter}, name, options) end end + + def skip_#{filter}_filter(*names, &blk) + options = names.last.is_a?(Hash) ? names.pop : {} + _normalize_callback_options(options) + names.push(blk) if block_given? + names.each do |name| + skip_process_action_callback(:#{filter}, name, options) + end + end + + alias_method :append_#{filter}_filter, :#{filter}_filter RUBY_EVAL end end -- cgit v1.2.3