Permalink
Browse files

Use Path rather than EagerPath when cache_classes == false so other v…

…iew paths are properly recompiled in development mode [#1764 state:resolved]

Signed-off-by: Joshua Peek <josh@joshpeek.com>
  • Loading branch information...
pixeltrix authored and josh committed Feb 6, 2009
1 parent f75b98d commit bccd2c54b2c7708f881faf9c9464dcf29bd30bef
Showing with 5 additions and 1 deletion.
  1. +5 −1 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

0 comments on commit bccd2c5

Please sign in to comment.