diff options
author | Yves Senn <yves.senn@gmail.com> | 2015-05-26 15:23:35 +0200 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2015-05-26 15:23:35 +0200 |
commit | a19200d7bde3a852bad9efd3e5430aea3f788e1c (patch) | |
tree | 2411dd71cbf40cbcfb2d7a67f50feea07e6b644e /activerecord/lib | |
parent | 31cc1c2ef320f554120a1736eaf087aca19464a6 (diff) | |
parent | 995a473f0c3ed1804778b163e0b7d02d410568a5 (diff) | |
download | rails-a19200d7bde3a852bad9efd3e5430aea3f788e1c.tar.gz rails-a19200d7bde3a852bad9efd3e5430aea3f788e1c.tar.bz2 rails-a19200d7bde3a852bad9efd3e5430aea3f788e1c.zip |
Merge pull request #20027 from keepcosmos/add-extend-option-on-habtm
Add `extend` option on `has_and_belongs_to_many`.
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/associations.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb index 779a3fbbbd..1ca648d48d 100644 --- a/activerecord/lib/active_record/associations.rb +++ b/activerecord/lib/active_record/associations.rb @@ -1737,7 +1737,7 @@ module ActiveRecord hm_options[:through] = middle_reflection.name hm_options[:source] = join_model.right_reflection.name - [:before_add, :after_add, :before_remove, :after_remove, :autosave, :validate, :join_table, :class_name].each do |k| + [:before_add, :after_add, :before_remove, :after_remove, :autosave, :validate, :join_table, :class_name, :extend].each do |k| hm_options[k] = options[k] if options.key? k end |