diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2006-04-06 02:58:32 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2006-04-06 02:58:32 +0000 |
commit | 2fa5bf03dd0105a70402b1abcf0ac3df54140a55 (patch) | |
tree | fff773074f9aeb76b20e50e45118a4d4074ff87a /activerecord/lib | |
parent | 26e187516f3a57a432f59dfec3244d1fbc8c58de (diff) | |
download | rails-2fa5bf03dd0105a70402b1abcf0ac3df54140a55.tar.gz rails-2fa5bf03dd0105a70402b1abcf0ac3df54140a55.tar.bz2 rails-2fa5bf03dd0105a70402b1abcf0ac3df54140a55.zip |
Reflect on aggregation ignores :class_name option (fixes #4599) [lars pind]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4175 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/reflection.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/reflection.rb b/activerecord/lib/active_record/reflection.rb index d2c5393b59..aab5444583 100644 --- a/activerecord/lib/active_record/reflection.rb +++ b/activerecord/lib/active_record/reflection.rb @@ -97,7 +97,7 @@ module ActiveRecord # Holds all the meta-data about an aggregation as it was specified in the Active Record class. class AggregateReflection < MacroReflection #:nodoc: def klass - @klass ||= Object.const_get(class_name) + @klass ||= Object.const_get(options[:class_name] || class_name) end private |