Skip to content
Browse files

fixed bug with autoloading missing namespaced constants

  • Loading branch information...
1 parent 00b131d commit 907cd55a53c51aa81ac174c40712193e77ac2e76 Tyler committed with Oct 8, 2008
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/acts_as_cached/cache_methods.rb
View
2 lib/acts_as_cached/cache_methods.rb
@@ -230,7 +230,7 @@ def autoload_missing_constants
yield
rescue ArgumentError, MemCache::MemCacheError => error
lazy_load ||= Hash.new { |hash, hash_key| hash[hash_key] = true; false }
- if error.to_s[/undefined class|referred/] && !lazy_load[error.to_s.split.last.constantize] then retry
+ if error.to_s[/undefined class|referred/] && !lazy_load[error.to_s.split.last.sub(/::$/, '').constantize] then retry
else raise error end
end
end

0 comments on commit 907cd55

Please sign in to comment.
Something went wrong with that request. Please try again.