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
@ -571,12 +571,7 @@ def skip_filter(*filters)
|
||||
|
||||
# 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 New Issue
Block a user