Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1057 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
commit 0ca544d7b38c5f93b940c1709b361ba8d54d1194 1 parent f7c61b6
@dhh dhh authored
View
5 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]
View
2  activesupport/lib/active_support/dependencies.rb
@@ -175,7 +175,7 @@ def const_missing(class_id)
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)
Please sign in to comment.
Something went wrong with that request. Please try again.