Permalink
Browse files

Support Object#filter method for before/after filters

  • Loading branch information...
1 parent 669fd84 commit 63992e8f3af48d34d70ce33828c93625af9e8562 @lifo lifo committed May 30, 2009
Showing with 2 additions and 0 deletions.
  1. +2 −0 activesupport/lib/active_support/new_callbacks.rb
@@ -326,6 +326,8 @@ def #{method_name}(&blk)
def #{method_name}(&blk)
if #{method_name}_object.respond_to?(:#{kind})
#{method_name}_object.#{kind}(self, &blk)
+ elsif #{method_name}_object.respond_to?(:filter)
+ #{method_name}_object.send("filter", self, &blk)
else
#{method_name}_object.send("#{kind}_#{name}", self, &blk)
end

0 comments on commit 63992e8

Please sign in to comment.