Permalink
Browse files

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)
  • Loading branch information...
1 parent e22a3d8 commit e0ed4b7aa45cacba12ad5aeba23f71305579b395 Yehuda Katz committed May 23, 2009
Showing with 11 additions and 0 deletions.
  1. +11 −0 actionpack/lib/action_controller/abstract/callbacks.rb
View
11 actionpack/lib/action_controller/abstract/callbacks.rb
@@ -36,6 +36,17 @@ def #{filter}_filter(*names, &blk)
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

0 comments on commit e0ed4b7

Please sign in to comment.