diff options
author | Ivan Antropov <antropov.ivan@gmail.com> | 2013-11-10 12:28:54 +0700 |
---|---|---|
committer | Ivan Antropov <antropov.ivan@gmail.com> | 2013-11-17 12:20:50 +0700 |
commit | ec0928076529e8f0b5a4ad58c95cfa1fe6ed5b60 (patch) | |
tree | 30ebc3fd0590552a2b175b83c5d99c6b0f347c39 /activerecord/test/models | |
parent | fa13d8e6d926c601070104c7075be39618280272 (diff) | |
download | rails-ec0928076529e8f0b5a4ad58c95cfa1fe6ed5b60.tar.gz rails-ec0928076529e8f0b5a4ad58c95cfa1fe6ed5b60.tar.bz2 rails-ec0928076529e8f0b5a4ad58c95cfa1fe6ed5b60.zip |
Fix insertion of records for hmt association with scope, fix #3548
Diffstat (limited to 'activerecord/test/models')
-rw-r--r-- | activerecord/test/models/club.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/activerecord/test/models/club.rb b/activerecord/test/models/club.rb index 566e0873f1..902a047f62 100644 --- a/activerecord/test/models/club.rb +++ b/activerecord/test/models/club.rb @@ -6,6 +6,8 @@ class Club < ActiveRecord::Base has_one :sponsored_member, :through => :sponsor, :source => :sponsorable, :source_type => "Member" belongs_to :category + has_many :favourites, -> { where(memberships: { favourite: true}) }, through: :memberships, source: :member + private def private_method |