aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/reflection.rb
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2013-09-03 14:16:29 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2013-09-03 14:16:29 -0700
commit1f006cd5f10663286e70b4c3e972fba91ac8c9f9 (patch)
treef5b44cc39be164115fba4f8df580f45027b12eda /activerecord/lib/active_record/reflection.rb
parentc64a001dcc9eb1b066ca3ce553c5d20988458e8c (diff)
downloadrails-1f006cd5f10663286e70b4c3e972fba91ac8c9f9.tar.gz
rails-1f006cd5f10663286e70b4c3e972fba91ac8c9f9.tar.bz2
rails-1f006cd5f10663286e70b4c3e972fba91ac8c9f9.zip
support anonymous classes on has_many associations
Diffstat (limited to 'activerecord/lib/active_record/reflection.rb')
-rw-r--r--activerecord/lib/active_record/reflection.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/reflection.rb b/activerecord/lib/active_record/reflection.rb
index 5245fc130a..150a90f5db 100644
--- a/activerecord/lib/active_record/reflection.rb
+++ b/activerecord/lib/active_record/reflection.rb
@@ -121,6 +121,7 @@ module ActiveRecord
@scope = scope
@options = options
@active_record = active_record
+ @klass = options[:class]
@plural_name = active_record.pluralize_table_names ?
name.to_s.pluralize : name.to_s
end