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 <josh@joshpeek.com>
This commit is contained in:
Andrew White 2009-02-05 19:56:22 -06:00 committed by Joshua Peek
parent f75b98d67e
commit bccd2c54b2

@ -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