1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Support Object#filter method for before/after filters

This commit is contained in:
Pratik Naik 2009-05-30 15:14:23 +01:00
parent 669fd84910
commit 63992e8f3a

View file

@ -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