mirror of
https://github.com/github/rails.git
synced 2026-01-30 16:58:15 -05:00
Ruby 1.9 compat: workaround module_eval bug. Closes #10641 [Frederick Cheung]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8507 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
@@ -155,7 +155,7 @@ module ActiveRecord
|
||||
if (instance_variable_get("@#{name}").nil? || force_reload) && (!allow_nil || mapping.any? {|pair| !read_attribute(pair.first).nil? })
|
||||
instance_variable_set("@#{name}", class_name.constantize.new(*mapping.collect {|pair| read_attribute(pair.first)}))
|
||||
end
|
||||
return instance_variable_get("@#{name}")
|
||||
instance_variable_get("@#{name}")
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user