From 1f006cd5f10663286e70b4c3e972fba91ac8c9f9 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Tue, 3 Sep 2013 14:16:29 -0700 Subject: support anonymous classes on has_many associations --- activerecord/lib/active_record/reflection.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'activerecord/lib/active_record/reflection.rb') 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 -- cgit v1.2.3