From bc1a18d7bd8898fea6d41d59f4016b4be51e371b Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Wed, 14 Oct 2009 19:53:52 -0500 Subject: Punt on ConcurrentHash [#3322 state:resolved] --- actionpack/lib/action_controller/legacy/layout.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'actionpack/lib/action_controller/legacy') diff --git a/actionpack/lib/action_controller/legacy/layout.rb b/actionpack/lib/action_controller/legacy/layout.rb index 53762158fc..4e3b67de20 100644 --- a/actionpack/lib/action_controller/legacy/layout.rb +++ b/actionpack/lib/action_controller/legacy/layout.rb @@ -184,7 +184,7 @@ module ActionController #:nodoc: def default_layout(*args) memoized_default_layout(*args) - @_memoized_default_layout ||= ::ActiveSupport::ConcurrentHash.new + @_memoized_default_layout ||= {} @_memoized_default_layout[args] ||= memoized_default_layout(*args) end @@ -195,7 +195,7 @@ module ActionController #:nodoc: end def find_layout(*args) - @_memoized_find_layout ||= ::ActiveSupport::ConcurrentHash.new + @_memoized_find_layout ||= {} @_memoized_find_layout[args] ||= memoized_find_layout(*args) end @@ -221,10 +221,10 @@ module ActionController #:nodoc: write_inheritable_hash(:layout_conditions, conditions) end end - + def active_layout(name) name = self.class.default_layout(formats) if name == true - + layout_name = case name when Symbol then __send__(name) when Proc then name.call(self) @@ -246,7 +246,7 @@ module ActionController #:nodoc: if only = conditions[:only] return only.include?(action_name) elsif except = conditions[:except] - return !except.include?(action_name) + return !except.include?(action_name) end end true -- cgit v1.2.3