{"action":"created","comment":{"url":"https://api.github.com/repos/SchemaPlus/schema_associations/pulls/comments/241933784","pull_request_review_id":185337700,"id":241933784,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0MTkzMzc4NA==","diff_hunk":"@@ -570,6 +570,38 @@ class Tag < ActiveRecord::Base ; end\n     end\n   end\n \n+  context 'manually defined through association' do\n+    before(:each) do\n+      create_tables(\n+          \"posts\", {}, {},\n+          \"tags\", {}, {},\n+          \"post_tags\", {:id => false}, { :post_id => { foreign_key: true}, :tag_id => { foreign_key: true}}\n+      )\n+      class Post < ActiveRecord::Base\n+        schema_associations concise_names: false do\n+          has_many :linked_tags, through: :post_tags, source: :tag\n+        end\n+      end\n+      class Tag < ActiveRecord::Base\n+        schema_associations concise_names: false do\n+          has_many :linked_posts, through: :post_tags, source: :post\n+        end\n+      end\n+      class PostTag < ActiveRecord::Base\n+      end\n+    end\n+\n+    it 'should not error when accessing the through association' do\n+      reflection = Post.reflect_on_association(:linked_tags)\n+      expect(reflection).not_to be_nil\n+      # expect(reflection.macro).to eq(:has_many)\n+      # expect(reflection.options[:source]).to eq(:tag)\n+      # expect(reflection.options[:through]).to eq(:posts_tags)\n+\n+      Post.new.linked_tags","path":"spec/association_spec.rb","position":32,"original_position":32,"commit_id":"24eebf5c23975733f0f6577c9f77279b824a2ab4","original_commit_id":"24eebf5c23975733f0f6577c9f77279b824a2ab4","user":{"login":"lowjoel","id":2505070,"node_id":"MDQ6VXNlcjI1MDUwNzA=","avatar_url":"https://avatars2.githubusercontent.com/u/2505070?v=4","gravatar_id":"","url":"https://api.github.com/users/lowjoel","html_url":"https://github.com/lowjoel","followers_url":"https://api.github.com/users/lowjoel/followers","following_url":"https://api.github.com/users/lowjoel/following{/other_user}","gists_url":"https://api.github.com/users/lowjoel/gists{/gist_id}","starred_url":"https://api.github.com/users/lowjoel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lowjoel/subscriptions","organizations_url":"https://api.github.com/users/lowjoel/orgs","repos_url":"https://api.github.com/users/lowjoel/repos","events_url":"https://api.github.com/users/lowjoel/events{/privacy}","received_events_url":"https://api.github.com/users/lowjoel/received_events","type":"User","site_admin":false},"body":"Maybe you'd want to assert something?","created_at":"2018-12-15T02:02:55Z","updated_at":"2018-12-15T02:03:06Z","html_url":"https://github.com/SchemaPlus/schema_associations/pull/26#discussion_r241933784","pull_request_url":"https://api.github.com/repos/SchemaPlus/schema_associations/pulls/26","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/SchemaPlus/schema_associations/pulls/comments/241933784"},"html":{"href":"https://github.com/SchemaPlus/schema_associations/pull/26#discussion_r241933784"},"pull_request":{"href":"https://api.github.com/repos/SchemaPlus/schema_associations/pulls/26"}}},"pull_request":{"url":"https://api.github.com/repos/SchemaPlus/schema_associations/pulls/26","id":238851615,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM4ODUxNjE1","html_url":"https://github.com/SchemaPlus/schema_associations/pull/26","diff_url":"https://github.com/SchemaPlus/schema_associations/pull/26.diff","patch_url":"https://github.com/SchemaPlus/schema_associations/pull/26.patch","issue_url":"https://api.github.com/repos/SchemaPlus/schema_associations/issues/26","number":26,"state":"open","locked":false,"title":"add block support to allow defining has_many through associations on rails 5.1+","user":{"login":"urkle","id":101123,"node_id":"MDQ6VXNlcjEwMTEyMw==","avatar_url":"https://avatars0.githubusercontent.com/u/101123?v=4","gravatar_id":"","url":"https://api.github.com/users/urkle","html_url":"https://github.com/urkle","followers_url":"https://api.github.com/users/urkle/followers","following_url":"https://api.github.com/users/urkle/following{/other_user}","gists_url":"https://api.github.com/users/urkle/gists{/gist_id}","starred_url":"https://api.github.com/users/urkle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/urkle/subscriptions","organizations_url":"https://api.github.com/users/urkle/orgs","repos_url":"https://api.github.com/users/urkle/repos","events_url":"https://api.github.com/users/urkle/events{/privacy}","received_events_url":"https://api.github.com/users/urkle/received_events","type":"User","site_admin":false},"body":"In rails 5.1+ has any through associations have to reference an association defined BEFORE them.. Thus w/ Schema_associations we need to allow defining these manual associations after schema+ has defined the automatic ones.","created_at":"2018-12-14T21:47:02Z","updated_at":"2018-12-15T02:03:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9533a04f36a7d651744dc8e2546741caa00879bb","assignee":{"login":"urkle","id":101123,"node_id":"MDQ6VXNlcjEwMTEyMw==","avatar_url":"https://avatars0.githubusercontent.com/u/101123?v=4","gravatar_id":"","url":"https://api.github.com/users/urkle","html_url":"https://github.com/urkle","followers_url":"https://api.github.com/users/urkle/followers","following_url":"https://api.github.com/users/urkle/following{/other_user}","gists_url":"https://api.github.com/users/urkle/gists{/gist_id}","starred_url":"https://api.github.com/users/urkle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/urkle/subscriptions","organizations_url":"https://api.github.com/users/urkle/orgs","repos_url":"https://api.github.com/users/urkle/repos","events_url":"https://api.github.com/users/urkle/events{/privacy}","received_events_url":"https://api.github.com/users/urkle/received_events","type":"User","site_admin":false},"assignees":[{"login":"urkle","id":101123,"node_id":"MDQ6VXNlcjEwMTEyMw==","avatar_url":"https://avatars0.githubusercontent.com/u/101123?v=4","gravatar_id":"","url":"https://api.github.com/users/urkle","html_url":"https://github.com/urkle","followers_url":"https://api.github.com/users/urkle/followers","following_url":"https://api.github.com/users/urkle/following{/other_user}","gists_url":"https://api.github.com/users/urkle/gists{/gist_id}","starred_url":"https://api.github.com/users/urkle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/urkle/subscriptions","organizations_url":"https://api.github.com/users/urkle/orgs","repos_url":"https://api.github.com/users/urkle/repos","events_url":"https://api.github.com/users/urkle/events{/privacy}","received_events_url":"https://api.github.com/users/urkle/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/SchemaPlus/schema_associations/pulls/26/commits","review_comments_url":"https://api.github.com/repos/SchemaPlus/schema_associations/pulls/26/comments","review_comment_url":"https://api.github.com/repos/SchemaPlus/schema_associations/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SchemaPlus/schema_associations/issues/26/comments","statuses_url":"https://api.github.com/repos/SchemaPlus/schema_associations/statuses/24eebf5c23975733f0f6577c9f77279b824a2ab4","head":{"label":"SchemaPlus:feat-rails-5.2","ref":"feat-rails-5.2","sha":"24eebf5c23975733f0f6577c9f77279b824a2ab4","user":{"login":"SchemaPlus","id":614848,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYxNDg0OA==","avatar_url":"https://avatars1.githubusercontent.com/u/614848?v=4","gravatar_id":"","url":"https://api.github.com/users/SchemaPlus","html_url":"https://github.com/SchemaPlus","followers_url":"https://api.github.com/users/SchemaPlus/followers","following_url":"https://api.github.com/users/SchemaPlus/following{/other_user}","gists_url":"https://api.github.com/users/SchemaPlus/gists{/gist_id}","starred_url":"https://api.github.com/users/SchemaPlus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SchemaPlus/subscriptions","organizations_url":"https://api.github.com/users/SchemaPlus/orgs","repos_url":"https://api.github.com/users/SchemaPlus/repos","events_url":"https://api.github.com/users/SchemaPlus/events{/privacy}","received_events_url":"https://api.github.com/users/SchemaPlus/received_events","type":"Organization","site_admin":false},"repo":{"id":2060578,"node_id":"MDEwOlJlcG9zaXRvcnkyMDYwNTc4","name":"schema_associations","full_name":"SchemaPlus/schema_associations","private":false,"owner":{"login":"SchemaPlus","id":614848,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYxNDg0OA==","avatar_url":"https://avatars1.githubusercontent.com/u/614848?v=4","gravatar_id":"","url":"https://api.github.com/users/SchemaPlus","html_url":"https://github.com/SchemaPlus","followers_url":"https://api.github.com/users/SchemaPlus/followers","following_url":"https://api.github.com/users/SchemaPlus/following{/other_user}","gists_url":"https://api.github.com/users/SchemaPlus/gists{/gist_id}","starred_url":"https://api.github.com/users/SchemaPlus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SchemaPlus/subscriptions","organizations_url":"https://api.github.com/users/SchemaPlus/orgs","repos_url":"https://api.github.com/users/SchemaPlus/repos","events_url":"https://api.github.com/users/SchemaPlus/events{/privacy}","received_events_url":"https://api.github.com/users/SchemaPlus/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/SchemaPlus/schema_associations","description":"ActiveRecord extension that automatically (DRY) creates associations based on the schema","fork":false,"url":"https://api.github.com/repos/SchemaPlus/schema_associations","forks_url":"https://api.github.com/repos/SchemaPlus/schema_associations/forks","keys_url":"https://api.github.com/repos/SchemaPlus/schema_associations/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SchemaPlus/schema_associations/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SchemaPlus/schema_associations/teams","hooks_url":"https://api.github.com/repos/SchemaPlus/schema_associations/hooks","issue_events_url":"https://api.github.com/repos/SchemaPlus/schema_associations/issues/events{/number}","events_url":"https://api.github.com/repos/SchemaPlus/schema_associations/events","assignees_url":"https://api.github.com/repos/SchemaPlus/schema_associations/assignees{/user}","branches_url":"https://api.github.com/repos/SchemaPlus/schema_associations/branches{/branch}","tags_url":"https://api.github.com/repos/SchemaPlus/schema_associations/tags","blobs_url":"https://api.github.com/repos/SchemaPlus/schema_associations/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SchemaPlus/schema_associations/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SchemaPlus/schema_associations/git/refs{/sha}","trees_url":"https://api.github.com/repos/SchemaPlus/schema_associations/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SchemaPlus/schema_associations/statuses/{sha}","languages_url":"https://api.github.com/repos/SchemaPlus/schema_associations/languages","stargazers_url":"https://api.github.com/repos/SchemaPlus/schema_associations/stargazers","contributors_url":"https://api.github.com/repos/SchemaPlus/schema_associations/contributors","subscribers_url":"https://api.github.com/repos/SchemaPlus/schema_associations/subscribers","subscription_url":"https://api.github.com/repos/SchemaPlus/schema_associations/subscription","commits_url":"https://api.github.com/repos/SchemaPlus/schema_associations/commits{/sha}","git_commits_url":"https://api.github.com/repos/SchemaPlus/schema_associations/git/commits{/sha}","comments_url":"https://api.github.com/repos/SchemaPlus/schema_associations/comments{/number}","issue_comment_url":"https://api.github.com/repos/SchemaPlus/schema_associations/issues/comments{/number}","contents_url":"https://api.github.com/repos/SchemaPlus/schema_associations/contents/{+path}","compare_url":"https://api.github.com/repos/SchemaPlus/schema_associations/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SchemaPlus/schema_associations/merges","archive_url":"https://api.github.com/repos/SchemaPlus/schema_associations/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SchemaPlus/schema_associations/downloads","issues_url":"https://api.github.com/repos/SchemaPlus/schema_associations/issues{/number}","pulls_url":"https://api.github.com/repos/SchemaPlus/schema_associations/pulls{/number}","milestones_url":"https://api.github.com/repos/SchemaPlus/schema_associations/milestones{/number}","notifications_url":"https://api.github.com/repos/SchemaPlus/schema_associations/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SchemaPlus/schema_associations/labels{/name}","releases_url":"https://api.github.com/repos/SchemaPlus/schema_associations/releases{/id}","deployments_url":"https://api.github.com/repos/SchemaPlus/schema_associations/deployments","created_at":"2011-07-17T04:44:31Z","updated_at":"2018-12-07T13:54:34Z","pushed_at":"2018-12-14T21:47:03Z","git_url":"git://github.com/SchemaPlus/schema_associations.git","ssh_url":"git@github.com:SchemaPlus/schema_associations.git","clone_url":"https://github.com/SchemaPlus/schema_associations.git","svn_url":"https://github.com/SchemaPlus/schema_associations","homepage":"","size":159,"stargazers_count":43,"watchers_count":43,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"archived":false,"open_issues_count":11,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":7,"open_issues":11,"watchers":43,"default_branch":"master"}},"base":{"label":"SchemaPlus:master","ref":"master","sha":"cd0a3af36ffef352a62742874ca3e9f9ea2c26b0","user":{"login":"SchemaPlus","id":614848,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYxNDg0OA==","avatar_url":"https://avatars1.githubusercontent.com/u/614848?v=4","gravatar_id":"","url":"https://api.github.com/users/SchemaPlus","html_url":"https://github.com/SchemaPlus","followers_url":"https://api.github.com/users/SchemaPlus/followers","following_url":"https://api.github.com/users/SchemaPlus/following{/other_user}","gists_url":"https://api.github.com/users/SchemaPlus/gists{/gist_id}","starred_url":"https://api.github.com/users/SchemaPlus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SchemaPlus/subscriptions","organizations_url":"https://api.github.com/users/SchemaPlus/orgs","repos_url":"https://api.github.com/users/SchemaPlus/repos","events_url":"https://api.github.com/users/SchemaPlus/events{/privacy}","received_events_url":"https://api.github.com/users/SchemaPlus/received_events","type":"Organization","site_admin":false},"repo":{"id":2060578,"node_id":"MDEwOlJlcG9zaXRvcnkyMDYwNTc4","name":"schema_associations","full_name":"SchemaPlus/schema_associations","private":false,"owner":{"login":"SchemaPlus","id":614848,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYxNDg0OA==","avatar_url":"https://avatars1.githubusercontent.com/u/614848?v=4","gravatar_id":"","url":"https://api.github.com/users/SchemaPlus","html_url":"https://github.com/SchemaPlus","followers_url":"https://api.github.com/users/SchemaPlus/followers","following_url":"https://api.github.com/users/SchemaPlus/following{/other_user}","gists_url":"https://api.github.com/users/SchemaPlus/gists{/gist_id}","starred_url":"https://api.github.com/users/SchemaPlus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SchemaPlus/subscriptions","organizations_url":"https://api.github.com/users/SchemaPlus/orgs","repos_url":"https://api.github.com/users/SchemaPlus/repos","events_url":"https://api.github.com/users/SchemaPlus/events{/privacy}","received_events_url":"https://api.github.com/users/SchemaPlus/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/SchemaPlus/schema_associations","description":"ActiveRecord extension that automatically (DRY) creates associations based on the schema","fork":false,"url":"https://api.github.com/repos/SchemaPlus/schema_associations","forks_url":"https://api.github.com/repos/SchemaPlus/schema_associations/forks","keys_url":"https://api.github.com/repos/SchemaPlus/schema_associations/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SchemaPlus/schema_associations/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SchemaPlus/schema_associations/teams","hooks_url":"https://api.github.com/repos/SchemaPlus/schema_associations/hooks","issue_events_url":"https://api.github.com/repos/SchemaPlus/schema_associations/issues/events{/number}","events_url":"https://api.github.com/repos/SchemaPlus/schema_associations/events","assignees_url":"https://api.github.com/repos/SchemaPlus/schema_associations/assignees{/user}","branches_url":"https://api.github.com/repos/SchemaPlus/schema_associations/branches{/branch}","tags_url":"https://api.github.com/repos/SchemaPlus/schema_associations/tags","blobs_url":"https://api.github.com/repos/SchemaPlus/schema_associations/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SchemaPlus/schema_associations/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SchemaPlus/schema_associations/git/refs{/sha}","trees_url":"https://api.github.com/repos/SchemaPlus/schema_associations/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SchemaPlus/schema_associations/statuses/{sha}","languages_url":"https://api.github.com/repos/SchemaPlus/schema_associations/languages","stargazers_url":"https://api.github.com/repos/SchemaPlus/schema_associations/stargazers","contributors_url":"https://api.github.com/repos/SchemaPlus/schema_associations/contributors","subscribers_url":"https://api.github.com/repos/SchemaPlus/schema_associations/subscribers","subscription_url":"https://api.github.com/repos/SchemaPlus/schema_associations/subscription","commits_url":"https://api.github.com/repos/SchemaPlus/schema_associations/commits{/sha}","git_commits_url":"https://api.github.com/repos/SchemaPlus/schema_associations/git/commits{/sha}","comments_url":"https://api.github.com/repos/SchemaPlus/schema_associations/comments{/number}","issue_comment_url":"https://api.github.com/repos/SchemaPlus/schema_associations/issues/comments{/number}","contents_url":"https://api.github.com/repos/SchemaPlus/schema_associations/contents/{+path}","compare_url":"https://api.github.com/repos/SchemaPlus/schema_associations/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SchemaPlus/schema_associations/merges","archive_url":"https://api.github.com/repos/SchemaPlus/schema_associations/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SchemaPlus/schema_associations/downloads","issues_url":"https://api.github.com/repos/SchemaPlus/schema_associations/issues{/number}","pulls_url":"https://api.github.com/repos/SchemaPlus/schema_associations/pulls{/number}","milestones_url":"https://api.github.com/repos/SchemaPlus/schema_associations/milestones{/number}","notifications_url":"https://api.github.com/repos/SchemaPlus/schema_associations/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SchemaPlus/schema_associations/labels{/name}","releases_url":"https://api.github.com/repos/SchemaPlus/schema_associations/releases{/id}","deployments_url":"https://api.github.com/repos/SchemaPlus/schema_associations/deployments","created_at":"2011-07-17T04:44:31Z","updated_at":"2018-12-07T13:54:34Z","pushed_at":"2018-12-14T21:47:03Z","git_url":"git://github.com/SchemaPlus/schema_associations.git","ssh_url":"git@github.com:SchemaPlus/schema_associations.git","clone_url":"https://github.com/SchemaPlus/schema_associations.git","svn_url":"https://github.com/SchemaPlus/schema_associations","homepage":"","size":159,"stargazers_count":43,"watchers_count":43,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"archived":false,"open_issues_count":11,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":7,"open_issues":11,"watchers":43,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SchemaPlus/schema_associations/pulls/26"},"html":{"href":"https://github.com/SchemaPlus/schema_associations/pull/26"},"issue":{"href":"https://api.github.com/repos/SchemaPlus/schema_associations/issues/26"},"comments":{"href":"https://api.github.com/repos/SchemaPlus/schema_associations/issues/26/comments"},"review_comments":{"href":"https://api.github.com/repos/SchemaPlus/schema_associations/pulls/26/comments"},"review_comment":{"href":"https://api.github.com/repos/SchemaPlus/schema_associations/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SchemaPlus/schema_associations/pulls/26/commits"},"statuses":{"href":"https://api.github.com/repos/SchemaPlus/schema_associations/statuses/24eebf5c23975733f0f6577c9f77279b824a2ab4"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"lowjoel"}}