{"action":"created","comment":{"url":"https://api.github.com/repos/Shopify/identity_cache/pulls/comments/37221970","id":37221970,"diff_hunk":"@@ -82,6 +82,11 @@ def test_cache_without_guessable_inverse_name_does_not_raise_when_inverse_name_s\n     end\n   end\n \n+  def test_cache_uses_inverse_of_on_association\n+    Item.has_many :invertable_association, :inverse_of => :owner, :class_name => 'PolymorphicRecord', :as => \"owner\", :inverse_of => :owner\n+    Item.cache_has_many :invertable_association, :embed => true","path":"test/denormalized_has_many_test.rb","position":6,"original_position":6,"commit_id":"9fcf3b24c6c7389686d2da7ae646b3e6059b2b52","original_commit_id":"9fcf3b24c6c7389686d2da7ae646b3e6059b2b52","user":{"login":"camilo","id":7748,"avatar_url":"https://avatars.githubusercontent.com/u/7748?v=3","gravatar_id":"","url":"https://api.github.com/users/camilo","html_url":"https://github.com/camilo","followers_url":"https://api.github.com/users/camilo/followers","following_url":"https://api.github.com/users/camilo/following{/other_user}","gists_url":"https://api.github.com/users/camilo/gists{/gist_id}","starred_url":"https://api.github.com/users/camilo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/camilo/subscriptions","organizations_url":"https://api.github.com/users/camilo/orgs","repos_url":"https://api.github.com/users/camilo/repos","events_url":"https://api.github.com/users/camilo/events{/privacy}","received_events_url":"https://api.github.com/users/camilo/received_events","type":"User","site_admin":false},"body":"Is it even possible to hit:\r\n\r\n```\r\n+        raise InverseAssociationError unless child_class.reflect_on_association(options[:inverse_name])\r\n\r\n``` \r\n?","created_at":"2015-08-17T18:44:16Z","updated_at":"2015-08-17T18:44:16Z","html_url":"https://github.com/Shopify/identity_cache/pull/223#discussion_r37221970","pull_request_url":"https://api.github.com/repos/Shopify/identity_cache/pulls/223","_links":{"self":{"href":"https://api.github.com/repos/Shopify/identity_cache/pulls/comments/37221970"},"html":{"href":"https://github.com/Shopify/identity_cache/pull/223#discussion_r37221970"},"pull_request":{"href":"https://api.github.com/repos/Shopify/identity_cache/pulls/223"}}},"pull_request":{"url":"https://api.github.com/repos/Shopify/identity_cache/pulls/223","id":41958436,"html_url":"https://github.com/Shopify/identity_cache/pull/223","diff_url":"https://github.com/Shopify/identity_cache/pull/223.diff","patch_url":"https://github.com/Shopify/identity_cache/pull/223.patch","issue_url":"https://api.github.com/repos/Shopify/identity_cache/issues/223","number":223,"state":"closed","locked":false,"title":"Use the association's inverse_of if available.","user":{"login":"dylanahsmith","id":954402,"avatar_url":"https://avatars.githubusercontent.com/u/954402?v=3","gravatar_id":"","url":"https://api.github.com/users/dylanahsmith","html_url":"https://github.com/dylanahsmith","followers_url":"https://api.github.com/users/dylanahsmith/followers","following_url":"https://api.github.com/users/dylanahsmith/following{/other_user}","gists_url":"https://api.github.com/users/dylanahsmith/gists{/gist_id}","starred_url":"https://api.github.com/users/dylanahsmith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dylanahsmith/subscriptions","organizations_url":"https://api.github.com/users/dylanahsmith/orgs","repos_url":"https://api.github.com/users/dylanahsmith/repos","events_url":"https://api.github.com/users/dylanahsmith/events{/privacy}","received_events_url":"https://api.github.com/users/dylanahsmith/received_events","type":"User","site_admin":false},"body":"@arthurnn & @fbogsany for review\r\n\r\n## Problem\r\n\r\nIf the inverse association name can't be determined using the class name, then the `:inverse_name` option must be specified on the cache_has_many or cache_has_one, even when the actual association has specified the inverse name using the `:inverse_of` option.\r\n\r\n## Solution\r\n\r\nUse `inverse_of.name` on the association reflection if it is available.","created_at":"2015-08-08T18:38:52Z","updated_at":"2015-08-17T18:44:16Z","closed_at":"2015-08-13T01:25:16Z","merged_at":"2015-08-13T01:25:16Z","merge_commit_sha":"ec862b4dc0446dd8db5effe2a6af44f0c25fb765","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Shopify/identity_cache/pulls/223/commits","review_comments_url":"https://api.github.com/repos/Shopify/identity_cache/pulls/223/comments","review_comment_url":"https://api.github.com/repos/Shopify/identity_cache/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Shopify/identity_cache/issues/223/comments","statuses_url":"https://api.github.com/repos/Shopify/identity_cache/statuses/9fcf3b24c6c7389686d2da7ae646b3e6059b2b52","head":{"label":"Shopify:use-association-inverse-of","ref":"use-association-inverse-of","sha":"9fcf3b24c6c7389686d2da7ae646b3e6059b2b52","user":{"login":"Shopify","id":8085,"avatar_url":"https://avatars.githubusercontent.com/u/8085?v=3","gravatar_id":"","url":"https://api.github.com/users/Shopify","html_url":"https://github.com/Shopify","followers_url":"https://api.github.com/users/Shopify/followers","following_url":"https://api.github.com/users/Shopify/following{/other_user}","gists_url":"https://api.github.com/users/Shopify/gists{/gist_id}","starred_url":"https://api.github.com/users/Shopify/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Shopify/subscriptions","organizations_url":"https://api.github.com/users/Shopify/orgs","repos_url":"https://api.github.com/users/Shopify/repos","events_url":"https://api.github.com/users/Shopify/events{/privacy}","received_events_url":"https://api.github.com/users/Shopify/received_events","type":"Organization","site_admin":false},"repo":{"id":8472417,"name":"identity_cache","full_name":"Shopify/identity_cache","owner":{"login":"Shopify","id":8085,"avatar_url":"https://avatars.githubusercontent.com/u/8085?v=3","gravatar_id":"","url":"https://api.github.com/users/Shopify","html_url":"https://github.com/Shopify","followers_url":"https://api.github.com/users/Shopify/followers","following_url":"https://api.github.com/users/Shopify/following{/other_user}","gists_url":"https://api.github.com/users/Shopify/gists{/gist_id}","starred_url":"https://api.github.com/users/Shopify/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Shopify/subscriptions","organizations_url":"https://api.github.com/users/Shopify/orgs","repos_url":"https://api.github.com/users/Shopify/repos","events_url":"https://api.github.com/users/Shopify/events{/privacy}","received_events_url":"https://api.github.com/users/Shopify/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Shopify/identity_cache","description":"IdentityCache is a blob level caching solution to plug into ActiveRecord. Don't #find, #fetch!","fork":false,"url":"https://api.github.com/repos/Shopify/identity_cache","forks_url":"https://api.github.com/repos/Shopify/identity_cache/forks","keys_url":"https://api.github.com/repos/Shopify/identity_cache/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Shopify/identity_cache/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Shopify/identity_cache/teams","hooks_url":"https://api.github.com/repos/Shopify/identity_cache/hooks","issue_events_url":"https://api.github.com/repos/Shopify/identity_cache/issues/events{/number}","events_url":"https://api.github.com/repos/Shopify/identity_cache/events","assignees_url":"https://api.github.com/repos/Shopify/identity_cache/assignees{/user}","branches_url":"https://api.github.com/repos/Shopify/identity_cache/branches{/branch}","tags_url":"https://api.github.com/repos/Shopify/identity_cache/tags","blobs_url":"https://api.github.com/repos/Shopify/identity_cache/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Shopify/identity_cache/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Shopify/identity_cache/git/refs{/sha}","trees_url":"https://api.github.com/repos/Shopify/identity_cache/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Shopify/identity_cache/statuses/{sha}","languages_url":"https://api.github.com/repos/Shopify/identity_cache/languages","stargazers_url":"https://api.github.com/repos/Shopify/identity_cache/stargazers","contributors_url":"https://api.github.com/repos/Shopify/identity_cache/contributors","subscribers_url":"https://api.github.com/repos/Shopify/identity_cache/subscribers","subscription_url":"https://api.github.com/repos/Shopify/identity_cache/subscription","commits_url":"https://api.github.com/repos/Shopify/identity_cache/commits{/sha}","git_commits_url":"https://api.github.com/repos/Shopify/identity_cache/git/commits{/sha}","comments_url":"https://api.github.com/repos/Shopify/identity_cache/comments{/number}","issue_comment_url":"https://api.github.com/repos/Shopify/identity_cache/issues/comments{/number}","contents_url":"https://api.github.com/repos/Shopify/identity_cache/contents/{+path}","compare_url":"https://api.github.com/repos/Shopify/identity_cache/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Shopify/identity_cache/merges","archive_url":"https://api.github.com/repos/Shopify/identity_cache/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Shopify/identity_cache/downloads","issues_url":"https://api.github.com/repos/Shopify/identity_cache/issues{/number}","pulls_url":"https://api.github.com/repos/Shopify/identity_cache/pulls{/number}","milestones_url":"https://api.github.com/repos/Shopify/identity_cache/milestones{/number}","notifications_url":"https://api.github.com/repos/Shopify/identity_cache/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Shopify/identity_cache/labels{/name}","releases_url":"https://api.github.com/repos/Shopify/identity_cache/releases{/id}","created_at":"2013-02-28T05:19:14Z","updated_at":"2015-08-15T21:11:20Z","pushed_at":"2015-08-14T14:49:43Z","git_url":"git://github.com/Shopify/identity_cache.git","ssh_url":"git@github.com:Shopify/identity_cache.git","clone_url":"https://github.com/Shopify/identity_cache.git","svn_url":"https://github.com/Shopify/identity_cache","homepage":"http://shopify.github.io/identity_cache","size":2530,"stargazers_count":1027,"watchers_count":1027,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":110,"mirror_url":null,"open_issues_count":25,"forks":110,"open_issues":25,"watchers":1027,"default_branch":"master"}},"base":{"label":"Shopify:master","ref":"master","sha":"2e51201a5f51f50f8d00e2246ecf69a11806e15c","user":{"login":"Shopify","id":8085,"avatar_url":"https://avatars.githubusercontent.com/u/8085?v=3","gravatar_id":"","url":"https://api.github.com/users/Shopify","html_url":"https://github.com/Shopify","followers_url":"https://api.github.com/users/Shopify/followers","following_url":"https://api.github.com/users/Shopify/following{/other_user}","gists_url":"https://api.github.com/users/Shopify/gists{/gist_id}","starred_url":"https://api.github.com/users/Shopify/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Shopify/subscriptions","organizations_url":"https://api.github.com/users/Shopify/orgs","repos_url":"https://api.github.com/users/Shopify/repos","events_url":"https://api.github.com/users/Shopify/events{/privacy}","received_events_url":"https://api.github.com/users/Shopify/received_events","type":"Organization","site_admin":false},"repo":{"id":8472417,"name":"identity_cache","full_name":"Shopify/identity_cache","owner":{"login":"Shopify","id":8085,"avatar_url":"https://avatars.githubusercontent.com/u/8085?v=3","gravatar_id":"","url":"https://api.github.com/users/Shopify","html_url":"https://github.com/Shopify","followers_url":"https://api.github.com/users/Shopify/followers","following_url":"https://api.github.com/users/Shopify/following{/other_user}","gists_url":"https://api.github.com/users/Shopify/gists{/gist_id}","starred_url":"https://api.github.com/users/Shopify/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Shopify/subscriptions","organizations_url":"https://api.github.com/users/Shopify/orgs","repos_url":"https://api.github.com/users/Shopify/repos","events_url":"https://api.github.com/users/Shopify/events{/privacy}","received_events_url":"https://api.github.com/users/Shopify/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Shopify/identity_cache","description":"IdentityCache is a blob level caching solution to plug into ActiveRecord. Don't #find, #fetch!","fork":false,"url":"https://api.github.com/repos/Shopify/identity_cache","forks_url":"https://api.github.com/repos/Shopify/identity_cache/forks","keys_url":"https://api.github.com/repos/Shopify/identity_cache/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Shopify/identity_cache/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Shopify/identity_cache/teams","hooks_url":"https://api.github.com/repos/Shopify/identity_cache/hooks","issue_events_url":"https://api.github.com/repos/Shopify/identity_cache/issues/events{/number}","events_url":"https://api.github.com/repos/Shopify/identity_cache/events","assignees_url":"https://api.github.com/repos/Shopify/identity_cache/assignees{/user}","branches_url":"https://api.github.com/repos/Shopify/identity_cache/branches{/branch}","tags_url":"https://api.github.com/repos/Shopify/identity_cache/tags","blobs_url":"https://api.github.com/repos/Shopify/identity_cache/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Shopify/identity_cache/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Shopify/identity_cache/git/refs{/sha}","trees_url":"https://api.github.com/repos/Shopify/identity_cache/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Shopify/identity_cache/statuses/{sha}","languages_url":"https://api.github.com/repos/Shopify/identity_cache/languages","stargazers_url":"https://api.github.com/repos/Shopify/identity_cache/stargazers","contributors_url":"https://api.github.com/repos/Shopify/identity_cache/contributors","subscribers_url":"https://api.github.com/repos/Shopify/identity_cache/subscribers","subscription_url":"https://api.github.com/repos/Shopify/identity_cache/subscription","commits_url":"https://api.github.com/repos/Shopify/identity_cache/commits{/sha}","git_commits_url":"https://api.github.com/repos/Shopify/identity_cache/git/commits{/sha}","comments_url":"https://api.github.com/repos/Shopify/identity_cache/comments{/number}","issue_comment_url":"https://api.github.com/repos/Shopify/identity_cache/issues/comments{/number}","contents_url":"https://api.github.com/repos/Shopify/identity_cache/contents/{+path}","compare_url":"https://api.github.com/repos/Shopify/identity_cache/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Shopify/identity_cache/merges","archive_url":"https://api.github.com/repos/Shopify/identity_cache/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Shopify/identity_cache/downloads","issues_url":"https://api.github.com/repos/Shopify/identity_cache/issues{/number}","pulls_url":"https://api.github.com/repos/Shopify/identity_cache/pulls{/number}","milestones_url":"https://api.github.com/repos/Shopify/identity_cache/milestones{/number}","notifications_url":"https://api.github.com/repos/Shopify/identity_cache/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Shopify/identity_cache/labels{/name}","releases_url":"https://api.github.com/repos/Shopify/identity_cache/releases{/id}","created_at":"2013-02-28T05:19:14Z","updated_at":"2015-08-15T21:11:20Z","pushed_at":"2015-08-14T14:49:43Z","git_url":"git://github.com/Shopify/identity_cache.git","ssh_url":"git@github.com:Shopify/identity_cache.git","clone_url":"https://github.com/Shopify/identity_cache.git","svn_url":"https://github.com/Shopify/identity_cache","homepage":"http://shopify.github.io/identity_cache","size":2530,"stargazers_count":1027,"watchers_count":1027,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":110,"mirror_url":null,"open_issues_count":25,"forks":110,"open_issues":25,"watchers":1027,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Shopify/identity_cache/pulls/223"},"html":{"href":"https://github.com/Shopify/identity_cache/pull/223"},"issue":{"href":"https://api.github.com/repos/Shopify/identity_cache/issues/223"},"comments":{"href":"https://api.github.com/repos/Shopify/identity_cache/issues/223/comments"},"review_comments":{"href":"https://api.github.com/repos/Shopify/identity_cache/pulls/223/comments"},"review_comment":{"href":"https://api.github.com/repos/Shopify/identity_cache/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Shopify/identity_cache/pulls/223/commits"},"statuses":{"href":"https://api.github.com/repos/Shopify/identity_cache/statuses/9fcf3b24c6c7389686d2da7ae646b3e6059b2b52"}}}}