Permalink
Browse files

Simplify filter_chain method implementation [#2327 state:resolved]

Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
  • Loading branch information...
Thomas E. Glasgow authored and lifo committed May 17, 2009
1 parent 4e8c36a commit e41984c5f7f38b62c05dfcb54940bf51f6961aeb
Showing with 1 addition and 6 deletions.
  1. +1 −6 actionpack/lib/action_controller/base/chained/filters.rb
@@ -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.

0 comments on commit e41984c

Please sign in to comment.