{"action":"created","comment":{"url":"https://api.github.com/repos/TommyJohnWear/spree/pulls/comments/35904834","id":35904834,"diff_hunk":"@@ -2,15 +2,18 @@ module Spree\n   class StockItem < ActiveRecord::Base\n     acts_as_paranoid\n \n-    belongs_to :stock_location, class_name: 'Spree::StockLocation'\n-    belongs_to :variant, class_name: 'Spree::Variant', touch: true\n-    has_many :stock_movements\n+    belongs_to :stock_location, class_name: 'Spree::StockLocation', inverse_of: :stock_items\n+    belongs_to :variant, class_name: 'Spree::Variant', inverse_of: :stock_items\n+    has_many :stock_movements, inverse_of: :stock_item","path":"core/app/models/spree/stock_item.rb","position":9,"original_position":9,"commit_id":"a587333f9d93107a359054e36cf0d9c6737edb02","original_commit_id":"a587333f9d93107a359054e36cf0d9c6737edb02","user":{"login":"bbuchalter","id":540762,"avatar_url":"https://avatars.githubusercontent.com/u/540762?v=3","gravatar_id":"","url":"https://api.github.com/users/bbuchalter","html_url":"https://github.com/bbuchalter","followers_url":"https://api.github.com/users/bbuchalter/followers","following_url":"https://api.github.com/users/bbuchalter/following{/other_user}","gists_url":"https://api.github.com/users/bbuchalter/gists{/gist_id}","starred_url":"https://api.github.com/users/bbuchalter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bbuchalter/subscriptions","organizations_url":"https://api.github.com/users/bbuchalter/orgs","repos_url":"https://api.github.com/users/bbuchalter/repos","events_url":"https://api.github.com/users/bbuchalter/events{/privacy}","received_events_url":"https://api.github.com/users/bbuchalter/received_events","type":"User","site_admin":false},"body":"All three of these are `inverse_of: :stock_items`. Is that right?","created_at":"2015-07-30T18:41:24Z","updated_at":"2015-07-30T18:41:24Z","html_url":"https://github.com/TommyJohnWear/spree/pull/18#discussion_r35904834","pull_request_url":"https://api.github.com/repos/TommyJohnWear/spree/pulls/18","_links":{"self":{"href":"https://api.github.com/repos/TommyJohnWear/spree/pulls/comments/35904834"},"html":{"href":"https://github.com/TommyJohnWear/spree/pull/18#discussion_r35904834"},"pull_request":{"href":"https://api.github.com/repos/TommyJohnWear/spree/pulls/18"}}},"pull_request":{"url":"https://api.github.com/repos/TommyJohnWear/spree/pulls/18","id":41265799,"html_url":"https://github.com/TommyJohnWear/spree/pull/18","diff_url":"https://github.com/TommyJohnWear/spree/pull/18.diff","patch_url":"https://github.com/TommyJohnWear/spree/pull/18.patch","issue_url":"https://api.github.com/repos/TommyJohnWear/spree/issues/18","number":18,"state":"open","locked":false,"title":"Conditional variant touch.","user":{"login":"gmacdougall","id":764390,"avatar_url":"https://avatars.githubusercontent.com/u/764390?v=3","gravatar_id":"","url":"https://api.github.com/users/gmacdougall","html_url":"https://github.com/gmacdougall","followers_url":"https://api.github.com/users/gmacdougall/followers","following_url":"https://api.github.com/users/gmacdougall/following{/other_user}","gists_url":"https://api.github.com/users/gmacdougall/gists{/gist_id}","starred_url":"https://api.github.com/users/gmacdougall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gmacdougall/subscriptions","organizations_url":"https://api.github.com/users/gmacdougall/orgs","repos_url":"https://api.github.com/users/gmacdougall/repos","events_url":"https://api.github.com/users/gmacdougall/events{/privacy}","received_events_url":"https://api.github.com/users/gmacdougall/received_events","type":"User","site_admin":false},"body":"This is ported back from solidus 1.0.","created_at":"2015-07-30T18:26:29Z","updated_at":"2015-07-30T18:41:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8618bfc100028b5597a5e5c660469e5890ff38d2","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/TommyJohnWear/spree/pulls/18/commits","review_comments_url":"https://api.github.com/repos/TommyJohnWear/spree/pulls/18/comments","review_comment_url":"https://api.github.com/repos/TommyJohnWear/spree/pulls/comments{/number}","comments_url":"https://api.github.com/repos/TommyJohnWear/spree/issues/18/comments","statuses_url":"https://api.github.com/repos/TommyJohnWear/spree/statuses/a587333f9d93107a359054e36cf0d9c6737edb02","head":{"label":"TommyJohnWear:conditional-variant-touch","ref":"conditional-variant-touch","sha":"a587333f9d93107a359054e36cf0d9c6737edb02","user":{"login":"TommyJohnWear","id":7293672,"avatar_url":"https://avatars.githubusercontent.com/u/7293672?v=3","gravatar_id":"","url":"https://api.github.com/users/TommyJohnWear","html_url":"https://github.com/TommyJohnWear","followers_url":"https://api.github.com/users/TommyJohnWear/followers","following_url":"https://api.github.com/users/TommyJohnWear/following{/other_user}","gists_url":"https://api.github.com/users/TommyJohnWear/gists{/gist_id}","starred_url":"https://api.github.com/users/TommyJohnWear/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TommyJohnWear/subscriptions","organizations_url":"https://api.github.com/users/TommyJohnWear/orgs","repos_url":"https://api.github.com/users/TommyJohnWear/repos","events_url":"https://api.github.com/users/TommyJohnWear/events{/privacy}","received_events_url":"https://api.github.com/users/TommyJohnWear/received_events","type":"Organization","site_admin":false},"repo":{"id":8230491,"name":"spree","full_name":"TommyJohnWear/spree","owner":{"login":"TommyJohnWear","id":7293672,"avatar_url":"https://avatars.githubusercontent.com/u/7293672?v=3","gravatar_id":"","url":"https://api.github.com/users/TommyJohnWear","html_url":"https://github.com/TommyJohnWear","followers_url":"https://api.github.com/users/TommyJohnWear/followers","following_url":"https://api.github.com/users/TommyJohnWear/following{/other_user}","gists_url":"https://api.github.com/users/TommyJohnWear/gists{/gist_id}","starred_url":"https://api.github.com/users/TommyJohnWear/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TommyJohnWear/subscriptions","organizations_url":"https://api.github.com/users/TommyJohnWear/orgs","repos_url":"https://api.github.com/users/TommyJohnWear/repos","events_url":"https://api.github.com/users/TommyJohnWear/events{/privacy}","received_events_url":"https://api.github.com/users/TommyJohnWear/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/TommyJohnWear/spree","description":"Spree is a complete open source e-commerce solution for Ruby on Rails.","fork":true,"url":"https://api.github.com/repos/TommyJohnWear/spree","forks_url":"https://api.github.com/repos/TommyJohnWear/spree/forks","keys_url":"https://api.github.com/repos/TommyJohnWear/spree/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TommyJohnWear/spree/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TommyJohnWear/spree/teams","hooks_url":"https://api.github.com/repos/TommyJohnWear/spree/hooks","issue_events_url":"https://api.github.com/repos/TommyJohnWear/spree/issues/events{/number}","events_url":"https://api.github.com/repos/TommyJohnWear/spree/events","assignees_url":"https://api.github.com/repos/TommyJohnWear/spree/assignees{/user}","branches_url":"https://api.github.com/repos/TommyJohnWear/spree/branches{/branch}","tags_url":"https://api.github.com/repos/TommyJohnWear/spree/tags","blobs_url":"https://api.github.com/repos/TommyJohnWear/spree/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TommyJohnWear/spree/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TommyJohnWear/spree/git/refs{/sha}","trees_url":"https://api.github.com/repos/TommyJohnWear/spree/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TommyJohnWear/spree/statuses/{sha}","languages_url":"https://api.github.com/repos/TommyJohnWear/spree/languages","stargazers_url":"https://api.github.com/repos/TommyJohnWear/spree/stargazers","contributors_url":"https://api.github.com/repos/TommyJohnWear/spree/contributors","subscribers_url":"https://api.github.com/repos/TommyJohnWear/spree/subscribers","subscription_url":"https://api.github.com/repos/TommyJohnWear/spree/subscription","commits_url":"https://api.github.com/repos/TommyJohnWear/spree/commits{/sha}","git_commits_url":"https://api.github.com/repos/TommyJohnWear/spree/git/commits{/sha}","comments_url":"https://api.github.com/repos/TommyJohnWear/spree/comments{/number}","issue_comment_url":"https://api.github.com/repos/TommyJohnWear/spree/issues/comments{/number}","contents_url":"https://api.github.com/repos/TommyJohnWear/spree/contents/{+path}","compare_url":"https://api.github.com/repos/TommyJohnWear/spree/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TommyJohnWear/spree/merges","archive_url":"https://api.github.com/repos/TommyJohnWear/spree/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TommyJohnWear/spree/downloads","issues_url":"https://api.github.com/repos/TommyJohnWear/spree/issues{/number}","pulls_url":"https://api.github.com/repos/TommyJohnWear/spree/pulls{/number}","milestones_url":"https://api.github.com/repos/TommyJohnWear/spree/milestones{/number}","notifications_url":"https://api.github.com/repos/TommyJohnWear/spree/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TommyJohnWear/spree/labels{/name}","releases_url":"https://api.github.com/repos/TommyJohnWear/spree/releases{/id}","created_at":"2013-02-16T02:56:40Z","updated_at":"2014-08-13T14:28:06Z","pushed_at":"2015-07-30T18:26:31Z","git_url":"git://github.com/TommyJohnWear/spree.git","ssh_url":"git@github.com:TommyJohnWear/spree.git","clone_url":"https://github.com/TommyJohnWear/spree.git","svn_url":"https://github.com/TommyJohnWear/spree","homepage":"http://spreecommerce.com","size":65479,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"TommyJohnWear:opco_2.1.17","ref":"opco_2.1.17","sha":"fa5d7c238456e8b1c8e79c2468ba806352a05903","user":{"login":"TommyJohnWear","id":7293672,"avatar_url":"https://avatars.githubusercontent.com/u/7293672?v=3","gravatar_id":"","url":"https://api.github.com/users/TommyJohnWear","html_url":"https://github.com/TommyJohnWear","followers_url":"https://api.github.com/users/TommyJohnWear/followers","following_url":"https://api.github.com/users/TommyJohnWear/following{/other_user}","gists_url":"https://api.github.com/users/TommyJohnWear/gists{/gist_id}","starred_url":"https://api.github.com/users/TommyJohnWear/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TommyJohnWear/subscriptions","organizations_url":"https://api.github.com/users/TommyJohnWear/orgs","repos_url":"https://api.github.com/users/TommyJohnWear/repos","events_url":"https://api.github.com/users/TommyJohnWear/events{/privacy}","received_events_url":"https://api.github.com/users/TommyJohnWear/received_events","type":"Organization","site_admin":false},"repo":{"id":8230491,"name":"spree","full_name":"TommyJohnWear/spree","owner":{"login":"TommyJohnWear","id":7293672,"avatar_url":"https://avatars.githubusercontent.com/u/7293672?v=3","gravatar_id":"","url":"https://api.github.com/users/TommyJohnWear","html_url":"https://github.com/TommyJohnWear","followers_url":"https://api.github.com/users/TommyJohnWear/followers","following_url":"https://api.github.com/users/TommyJohnWear/following{/other_user}","gists_url":"https://api.github.com/users/TommyJohnWear/gists{/gist_id}","starred_url":"https://api.github.com/users/TommyJohnWear/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TommyJohnWear/subscriptions","organizations_url":"https://api.github.com/users/TommyJohnWear/orgs","repos_url":"https://api.github.com/users/TommyJohnWear/repos","events_url":"https://api.github.com/users/TommyJohnWear/events{/privacy}","received_events_url":"https://api.github.com/users/TommyJohnWear/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/TommyJohnWear/spree","description":"Spree is a complete open source e-commerce solution for Ruby on Rails.","fork":true,"url":"https://api.github.com/repos/TommyJohnWear/spree","forks_url":"https://api.github.com/repos/TommyJohnWear/spree/forks","keys_url":"https://api.github.com/repos/TommyJohnWear/spree/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TommyJohnWear/spree/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TommyJohnWear/spree/teams","hooks_url":"https://api.github.com/repos/TommyJohnWear/spree/hooks","issue_events_url":"https://api.github.com/repos/TommyJohnWear/spree/issues/events{/number}","events_url":"https://api.github.com/repos/TommyJohnWear/spree/events","assignees_url":"https://api.github.com/repos/TommyJohnWear/spree/assignees{/user}","branches_url":"https://api.github.com/repos/TommyJohnWear/spree/branches{/branch}","tags_url":"https://api.github.com/repos/TommyJohnWear/spree/tags","blobs_url":"https://api.github.com/repos/TommyJohnWear/spree/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TommyJohnWear/spree/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TommyJohnWear/spree/git/refs{/sha}","trees_url":"https://api.github.com/repos/TommyJohnWear/spree/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TommyJohnWear/spree/statuses/{sha}","languages_url":"https://api.github.com/repos/TommyJohnWear/spree/languages","stargazers_url":"https://api.github.com/repos/TommyJohnWear/spree/stargazers","contributors_url":"https://api.github.com/repos/TommyJohnWear/spree/contributors","subscribers_url":"https://api.github.com/repos/TommyJohnWear/spree/subscribers","subscription_url":"https://api.github.com/repos/TommyJohnWear/spree/subscription","commits_url":"https://api.github.com/repos/TommyJohnWear/spree/commits{/sha}","git_commits_url":"https://api.github.com/repos/TommyJohnWear/spree/git/commits{/sha}","comments_url":"https://api.github.com/repos/TommyJohnWear/spree/comments{/number}","issue_comment_url":"https://api.github.com/repos/TommyJohnWear/spree/issues/comments{/number}","contents_url":"https://api.github.com/repos/TommyJohnWear/spree/contents/{+path}","compare_url":"https://api.github.com/repos/TommyJohnWear/spree/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TommyJohnWear/spree/merges","archive_url":"https://api.github.com/repos/TommyJohnWear/spree/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TommyJohnWear/spree/downloads","issues_url":"https://api.github.com/repos/TommyJohnWear/spree/issues{/number}","pulls_url":"https://api.github.com/repos/TommyJohnWear/spree/pulls{/number}","milestones_url":"https://api.github.com/repos/TommyJohnWear/spree/milestones{/number}","notifications_url":"https://api.github.com/repos/TommyJohnWear/spree/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TommyJohnWear/spree/labels{/name}","releases_url":"https://api.github.com/repos/TommyJohnWear/spree/releases{/id}","created_at":"2013-02-16T02:56:40Z","updated_at":"2014-08-13T14:28:06Z","pushed_at":"2015-07-30T18:26:31Z","git_url":"git://github.com/TommyJohnWear/spree.git","ssh_url":"git@github.com:TommyJohnWear/spree.git","clone_url":"https://github.com/TommyJohnWear/spree.git","svn_url":"https://github.com/TommyJohnWear/spree","homepage":"http://spreecommerce.com","size":65479,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/TommyJohnWear/spree/pulls/18"},"html":{"href":"https://github.com/TommyJohnWear/spree/pull/18"},"issue":{"href":"https://api.github.com/repos/TommyJohnWear/spree/issues/18"},"comments":{"href":"https://api.github.com/repos/TommyJohnWear/spree/issues/18/comments"},"review_comments":{"href":"https://api.github.com/repos/TommyJohnWear/spree/pulls/18/comments"},"review_comment":{"href":"https://api.github.com/repos/TommyJohnWear/spree/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/TommyJohnWear/spree/pulls/18/commits"},"statuses":{"href":"https://api.github.com/repos/TommyJohnWear/spree/statuses/a587333f9d93107a359054e36cf0d9c6737edb02"}}}}