diff options
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/CHANGELOG | 5 | ||||
-rw-r--r-- | activesupport/lib/active_support/dependencies.rb | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/activesupport/CHANGELOG b/activesupport/CHANGELOG index c6af6c288d..c323bd2ea5 100644 --- a/activesupport/CHANGELOG +++ b/activesupport/CHANGELOG @@ -1,3 +1,8 @@ +*SVN* + +* Fixed problem with classes being required twice. Object#const_missing now uses require_dependency to load files. It used to use require_or_load which would cause models to be loaded twice, which was not good for validations and other class methods #971 [Nicholas Seckar] + + *1.0.3* (27th March, 2005) * Fixed Inflector.pluralize to handle capitalized words #932 [bitsweat] diff --git a/activesupport/lib/active_support/dependencies.rb b/activesupport/lib/active_support/dependencies.rb index a189da189a..91f1f54f5a 100644 --- a/activesupport/lib/active_support/dependencies.rb +++ b/activesupport/lib/active_support/dependencies.rb @@ -175,7 +175,7 @@ class Object #:nodoc: end begin - require_or_load(class_id.to_s.demodulize.underscore) + require_dependency(class_id.to_s.demodulize.underscore) if Object.const_defined?(class_id) then return Object.const_get(class_id) else raise LoadError end rescue LoadError => e raise NameError.new("uninitialized constant #{class_id}").copy_blame!(e) |