diff options
author | Yehuda Katz <wycats@yehuda-katzs-macbookpro41.local> | 2009-05-23 01:30:25 -0700 |
---|---|---|
committer | Yehuda Katz <wycats@yehuda-katzs-macbookpro41.local> | 2009-05-23 01:30:25 -0700 |
commit | e0ed4b7aa45cacba12ad5aeba23f71305579b395 (patch) | |
tree | d5f2d69e47d728af852891066d820a5ed418310d /actionpack/lib | |
parent | e22a3d893ef8441fb52320315c5e348c6c208b69 (diff) | |
download | rails-e0ed4b7aa45cacba12ad5aeba23f71305579b395.tar.gz rails-e0ed4b7aa45cacba12ad5aeba23f71305579b395.tar.bz2 rails-e0ed4b7aa45cacba12ad5aeba23f71305579b395.zip |
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)
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_controller/abstract/callbacks.rb | 11 |
1 files changed, 11 insertions, 0 deletions
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 |