From 1e0130f7e0a27878dd78ed1335ae8e6fbc52397f Mon Sep 17 00:00:00 2001 From: Ivan Antropov Date: Sun, 25 May 2014 21:08:11 +0700 Subject: Add setting of FK for throgh associations while building --- activerecord/test/models/organization.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'activerecord/test/models') diff --git a/activerecord/test/models/organization.rb b/activerecord/test/models/organization.rb index 72e7bade68..f3e92f3067 100644 --- a/activerecord/test/models/organization.rb +++ b/activerecord/test/models/organization.rb @@ -8,5 +8,7 @@ class Organization < ActiveRecord::Base has_one :author, :primary_key => :name has_one :author_owned_essay_category, :through => :author, :source => :owned_essay_category + has_many :posts, :through => :author, :source => :posts + scope :clubs, -> { from('clubs') } end -- cgit v1.2.3