From 4cdd95bf2fcac0eb3e33405d65aaa0293603d18a Mon Sep 17 00:00:00 2001 From: Andrew White Date: Wed, 4 Feb 2009 16:56:35 +0000 Subject: [PATCH] Use Path rather than EagerPath when cache_classes == false --- actionpack/lib/action_view/paths.rb | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/actionpack/lib/action_view/paths.rb b/actionpack/lib/action_view/paths.rb index ee26542..c7d6fd6 100644 --- a/actionpack/lib/action_view/paths.rb +++ b/actionpack/lib/action_view/paths.rb @@ -2,7 +2,11 @@ module ActionView #:nodoc: class PathSet < Array #:nodoc: def self.type_cast(obj) if obj.is_a?(String) - Template::EagerPath.new(obj) + if !Object.const_defined?(:Rails) || Rails.configuration.cache_classes + Template::EagerPath.new(obj) + else + Template::Path.new(obj) + end else obj end -- 1.5.4.5