Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Simplify filter_chain method implementation [#2327 state:resolved]

Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
  • Loading branch information...
commit e41984c5f7f38b62c05dfcb54940bf51f6961aeb 1 parent 4e8c36a
Thomas E. Glasgow authored lifo committed
Showing with 1 addition and 6 deletions.
  1. +1 −6 actionpack/lib/action_controller/base/chained/filters.rb
View
7 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.
Please sign in to comment.
Something went wrong with that request. Please try again.