diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2009-05-30 15:14:23 +0100 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2009-05-30 15:14:23 +0100 |
commit | 63992e8f3af48d34d70ce33828c93625af9e8562 (patch) | |
tree | a46f8d7a816ed3a21a5364bd35cee289474f9d07 | |
parent | 669fd84910586d4c791b6f5bf4320f68ac7845aa (diff) | |
download | rails-63992e8f3af48d34d70ce33828c93625af9e8562.tar.gz rails-63992e8f3af48d34d70ce33828c93625af9e8562.tar.bz2 rails-63992e8f3af48d34d70ce33828c93625af9e8562.zip |
Support Object#filter method for before/after filters
-rw-r--r-- | activesupport/lib/active_support/new_callbacks.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/new_callbacks.rb b/activesupport/lib/active_support/new_callbacks.rb index f1d2ea7bb1..8512c659b0 100644 --- a/activesupport/lib/active_support/new_callbacks.rb +++ b/activesupport/lib/active_support/new_callbacks.rb @@ -326,6 +326,8 @@ module ActiveSupport 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 |