From 75f265807b02ad8d0a9a0f27a90c41c6e588fafa Mon Sep 17 00:00:00 2001 From: Thomas E. Glasgow Date: Tue, 24 Mar 2009 14:57:39 +0100 Subject: [PATCH] Rewrote method to one-liner --- actionpack/lib/action_controller/filters.rb | 7 +------ 1 files changed, 1 insertions(+), 6 deletions(-) diff --git a/actionpack/lib/action_controller/filters.rb b/actionpack/lib/action_controller/filters.rb index 9022b8b..5b7eebf 100644 --- a/actionpack/lib/action_controller/filters.rb +++ b/actionpack/lib/action_controller/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. -- 1.6.1