diff options
Diffstat (limited to 'activerecord/lib/active_record/associations/builder/has_many.rb')
-rw-r--r-- | activerecord/lib/active_record/associations/builder/has_many.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/associations/builder/has_many.rb b/activerecord/lib/active_record/associations/builder/has_many.rb index d37d4e9d33..81df1fb135 100644 --- a/activerecord/lib/active_record/associations/builder/has_many.rb +++ b/activerecord/lib/active_record/associations/builder/has_many.rb @@ -2,9 +2,13 @@ require 'active_support/core_ext/object/inclusion' module ActiveRecord::Associations::Builder class HasMany < CollectionAssociation #:nodoc: - self.macro = :has_many + def macro + :has_many + end - self.valid_options += [:primary_key, :dependent, :as, :through, :source, :source_type, :inverse_of] + def valid_options + super + [:primary_key, :dependent, :as, :through, :source, :source_type, :inverse_of] + end def build reflection = super |