diff options
author | Thomas E. Glasgow <tglasgow@digiprof.fr> | 2009-05-17 18:54:34 +0200 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2009-05-17 18:56:07 +0200 |
commit | e41984c5f7f38b62c05dfcb54940bf51f6961aeb (patch) | |
tree | b82003a7e956472f0a90e7188905128e4a3c325b /actionpack/lib | |
parent | 4e8c36a7417e5d447c9b15d5c61df0c014ee6d3b (diff) | |
download | rails-e41984c5f7f38b62c05dfcb54940bf51f6961aeb.tar.gz rails-e41984c5f7f38b62c05dfcb54940bf51f6961aeb.tar.bz2 rails-e41984c5f7f38b62c05dfcb54940bf51f6961aeb.zip |
Simplify filter_chain method implementation [#2327 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_controller/base/chained/filters.rb | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/actionpack/lib/action_controller/base/chained/filters.rb b/actionpack/lib/action_controller/base/chained/filters.rb index 98fe306fd5..e121c0129d 100644 --- a/actionpack/lib/action_controller/base/chained/filters.rb +++ b/actionpack/lib/action_controller/base/chained/filters.rb @@ -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. |