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:
parent
669fd84910
commit
63992e8f3a
1 changed files with 2 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue