mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Simplify filter_chain method implementation [#2327 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
This commit is contained in:
parent
4e8c36a741
commit
e41984c5f7
1 changed files with 1 additions and 6 deletions
|
@ -571,12 +571,7 @@ module ActionController #:nodoc:
|
|||
|
||||
# Returns an array of Filter objects for this controller.
|
||||
def filter_chain
|
||||
if chain = read_inheritable_attribute('filter_chain')
|
||||
return chain
|
||||
else
|
||||
write_inheritable_attribute('filter_chain', FilterChain.new)
|
||||
return filter_chain
|
||||
end
|
||||
read_inheritable_attribute('filter_chain') || write_inheritable_attribute('filter_chain', FilterChain.new)
|
||||
end
|
||||
|
||||
# Returns all the before filters for this class and all its ancestors.
|
||||
|
|
Loading…
Reference in a new issue