Skip to content

Commit

Permalink
Make a couple more tests pass.
Browse files Browse the repository at this point in the history
  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
Yehuda Katz committed May 23, 2009
1 parent e22a3d8 commit e0ed4b7
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions actionpack/lib/action_controller/abstract/callbacks.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -36,6 +36,17 @@ def #{filter}_filter(*names, &blk)
process_action_callback(:#{filter}, name, options) process_action_callback(:#{filter}, name, options)
end end
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 RUBY_EVAL
end end
end end
Expand Down

0 comments on commit e0ed4b7

Please sign in to comment.