From bccd2c54b2c7708f881faf9c9464dcf29bd30bef Mon Sep 17 00:00:00 2001 From: Andrew White Date: Thu, 5 Feb 2009 19:56:22 -0600 Subject: Use Path rather than EagerPath when cache_classes == false so other view paths are properly recompiled in development mode [#1764 state:resolved] Signed-off-by: Joshua Peek --- actionpack/lib/action_view/paths.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'actionpack/lib/action_view') diff --git a/actionpack/lib/action_view/paths.rb b/actionpack/lib/action_view/paths.rb index ee26542a07..c7d6fd696a 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 -- cgit v1.2.3