{"action":"created","comment":{"url":"https://api.github.com/repos/spree/spree/pulls/comments/63336571","id":63336571,"diff_hunk":"@@ -0,0 +1,98 @@\n+// Attach a 'js-country-states' class to a wrapper around both fields\n+// Attach a 'js-country' class to country select wrapper\n+// Attach a 'js-state' class to the state select wrapper\n+// Now the states will be refreshed as the country changes.\n+\n+$(document).ready(function () {\n+  $('.js-country select').on('change', function () {\n+    var $parent = $(this).parents('.js-country-states');\n+    countryStates.requestStates($parent);\n+  });\n+});\n+\n+var countryStates = {\n+  requestStates: function($parent, state_id){\n+    var countryId = countryStates.getCountryId($parent);\n+\n+    $.ajax({\n+      type: 'GET',\n+      url: Spree.routes.states_search,\n+      data: {\n+        country_id: countryId","path":"backend/app/assets/javascripts/spree/backend/country_states.js","position":21,"original_position":21,"commit_id":"02392d68e7430da7c7a62fe15e94e911195298c8","original_commit_id":"02392d68e7430da7c7a62fe15e94e911195298c8","user":{"login":"houndci-bot","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"Identifier 'country_id' is not in camel case.","created_at":"2016-05-16T10:43:07Z","updated_at":"2016-05-16T10:43:07Z","html_url":"https://github.com/spree/spree/pull/7350#discussion_r63336571","pull_request_url":"https://api.github.com/repos/spree/spree/pulls/7350","_links":{"self":{"href":"https://api.github.com/repos/spree/spree/pulls/comments/63336571"},"html":{"href":"https://github.com/spree/spree/pull/7350#discussion_r63336571"},"pull_request":{"href":"https://api.github.com/repos/spree/spree/pulls/7350"}}},"pull_request":{"url":"https://api.github.com/repos/spree/spree/pulls/7350","id":70179059,"html_url":"https://github.com/spree/spree/pull/7350","diff_url":"https://github.com/spree/spree/pull/7350.diff","patch_url":"https://github.com/spree/spree/pull/7350.patch","issue_url":"https://api.github.com/repos/spree/spree/issues/7350","number":7350,"state":"open","locked":false,"title":"Attach address to shipment","user":{"login":"priyank-gupta","id":894818,"avatar_url":"https://avatars.githubusercontent.com/u/894818?v=3","gravatar_id":"","url":"https://api.github.com/users/priyank-gupta","html_url":"https://github.com/priyank-gupta","followers_url":"https://api.github.com/users/priyank-gupta/followers","following_url":"https://api.github.com/users/priyank-gupta/following{/other_user}","gists_url":"https://api.github.com/users/priyank-gupta/gists{/gist_id}","starred_url":"https://api.github.com/users/priyank-gupta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/priyank-gupta/subscriptions","organizations_url":"https://api.github.com/users/priyank-gupta/orgs","repos_url":"https://api.github.com/users/priyank-gupta/repos","events_url":"https://api.github.com/users/priyank-gupta/events{/privacy}","received_events_url":"https://api.github.com/users/priyank-gupta/received_events","type":"User","site_admin":false},"body":"Refer https://github.com/spree/spree/pull/6001.","created_at":"2016-05-16T10:42:56Z","updated_at":"2016-05-16T10:43:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a9337d90f6257996933c1eb36510b973267cf05b","assignee":{"login":"damianlegawiec","id":55154,"avatar_url":"https://avatars.githubusercontent.com/u/55154?v=3","gravatar_id":"","url":"https://api.github.com/users/damianlegawiec","html_url":"https://github.com/damianlegawiec","followers_url":"https://api.github.com/users/damianlegawiec/followers","following_url":"https://api.github.com/users/damianlegawiec/following{/other_user}","gists_url":"https://api.github.com/users/damianlegawiec/gists{/gist_id}","starred_url":"https://api.github.com/users/damianlegawiec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/damianlegawiec/subscriptions","organizations_url":"https://api.github.com/users/damianlegawiec/orgs","repos_url":"https://api.github.com/users/damianlegawiec/repos","events_url":"https://api.github.com/users/damianlegawiec/events{/privacy}","received_events_url":"https://api.github.com/users/damianlegawiec/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/spree/spree/milestones/34","html_url":"https://github.com/spree/spree/milestones/v3.2.x","labels_url":"https://api.github.com/repos/spree/spree/milestones/34/labels","id":1605028,"number":34,"title":"v3.2.x","description":"","creator":{"login":"damianlegawiec","id":55154,"avatar_url":"https://avatars.githubusercontent.com/u/55154?v=3","gravatar_id":"","url":"https://api.github.com/users/damianlegawiec","html_url":"https://github.com/damianlegawiec","followers_url":"https://api.github.com/users/damianlegawiec/followers","following_url":"https://api.github.com/users/damianlegawiec/following{/other_user}","gists_url":"https://api.github.com/users/damianlegawiec/gists{/gist_id}","starred_url":"https://api.github.com/users/damianlegawiec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/damianlegawiec/subscriptions","organizations_url":"https://api.github.com/users/damianlegawiec/orgs","repos_url":"https://api.github.com/users/damianlegawiec/repos","events_url":"https://api.github.com/users/damianlegawiec/events{/privacy}","received_events_url":"https://api.github.com/users/damianlegawiec/received_events","type":"User","site_admin":false},"open_issues":20,"closed_issues":15,"state":"open","created_at":"2016-02-25T11:48:10Z","updated_at":"2016-05-16T10:42:56Z","due_on":"2016-06-27T22:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/spree/spree/pulls/7350/commits","review_comments_url":"https://api.github.com/repos/spree/spree/pulls/7350/comments","review_comment_url":"https://api.github.com/repos/spree/spree/pulls/comments{/number}","comments_url":"https://api.github.com/repos/spree/spree/issues/7350/comments","statuses_url":"https://api.github.com/repos/spree/spree/statuses/02392d68e7430da7c7a62fe15e94e911195298c8","head":{"label":"vinsol:reinaris-attach-address-to-shipment","ref":"reinaris-attach-address-to-shipment","sha":"02392d68e7430da7c7a62fe15e94e911195298c8","user":{"login":"vinsol","id":72388,"avatar_url":"https://avatars.githubusercontent.com/u/72388?v=3","gravatar_id":"","url":"https://api.github.com/users/vinsol","html_url":"https://github.com/vinsol","followers_url":"https://api.github.com/users/vinsol/followers","following_url":"https://api.github.com/users/vinsol/following{/other_user}","gists_url":"https://api.github.com/users/vinsol/gists{/gist_id}","starred_url":"https://api.github.com/users/vinsol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vinsol/subscriptions","organizations_url":"https://api.github.com/users/vinsol/orgs","repos_url":"https://api.github.com/users/vinsol/repos","events_url":"https://api.github.com/users/vinsol/events{/privacy}","received_events_url":"https://api.github.com/users/vinsol/received_events","type":"Organization","site_admin":false},"repo":{"id":50100254,"name":"spree","full_name":"vinsol/spree","owner":{"login":"vinsol","id":72388,"avatar_url":"https://avatars.githubusercontent.com/u/72388?v=3","gravatar_id":"","url":"https://api.github.com/users/vinsol","html_url":"https://github.com/vinsol","followers_url":"https://api.github.com/users/vinsol/followers","following_url":"https://api.github.com/users/vinsol/following{/other_user}","gists_url":"https://api.github.com/users/vinsol/gists{/gist_id}","starred_url":"https://api.github.com/users/vinsol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vinsol/subscriptions","organizations_url":"https://api.github.com/users/vinsol/orgs","repos_url":"https://api.github.com/users/vinsol/repos","events_url":"https://api.github.com/users/vinsol/events{/privacy}","received_events_url":"https://api.github.com/users/vinsol/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vinsol/spree","description":"Spree is a complete open source e-commerce solution for Ruby on Rails.","fork":true,"url":"https://api.github.com/repos/vinsol/spree","forks_url":"https://api.github.com/repos/vinsol/spree/forks","keys_url":"https://api.github.com/repos/vinsol/spree/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vinsol/spree/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vinsol/spree/teams","hooks_url":"https://api.github.com/repos/vinsol/spree/hooks","issue_events_url":"https://api.github.com/repos/vinsol/spree/issues/events{/number}","events_url":"https://api.github.com/repos/vinsol/spree/events","assignees_url":"https://api.github.com/repos/vinsol/spree/assignees{/user}","branches_url":"https://api.github.com/repos/vinsol/spree/branches{/branch}","tags_url":"https://api.github.com/repos/vinsol/spree/tags","blobs_url":"https://api.github.com/repos/vinsol/spree/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vinsol/spree/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vinsol/spree/git/refs{/sha}","trees_url":"https://api.github.com/repos/vinsol/spree/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vinsol/spree/statuses/{sha}","languages_url":"https://api.github.com/repos/vinsol/spree/languages","stargazers_url":"https://api.github.com/repos/vinsol/spree/stargazers","contributors_url":"https://api.github.com/repos/vinsol/spree/contributors","subscribers_url":"https://api.github.com/repos/vinsol/spree/subscribers","subscription_url":"https://api.github.com/repos/vinsol/spree/subscription","commits_url":"https://api.github.com/repos/vinsol/spree/commits{/sha}","git_commits_url":"https://api.github.com/repos/vinsol/spree/git/commits{/sha}","comments_url":"https://api.github.com/repos/vinsol/spree/comments{/number}","issue_comment_url":"https://api.github.com/repos/vinsol/spree/issues/comments{/number}","contents_url":"https://api.github.com/repos/vinsol/spree/contents/{+path}","compare_url":"https://api.github.com/repos/vinsol/spree/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vinsol/spree/merges","archive_url":"https://api.github.com/repos/vinsol/spree/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vinsol/spree/downloads","issues_url":"https://api.github.com/repos/vinsol/spree/issues{/number}","pulls_url":"https://api.github.com/repos/vinsol/spree/pulls{/number}","milestones_url":"https://api.github.com/repos/vinsol/spree/milestones{/number}","notifications_url":"https://api.github.com/repos/vinsol/spree/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vinsol/spree/labels{/name}","releases_url":"https://api.github.com/repos/vinsol/spree/releases{/id}","deployments_url":"https://api.github.com/repos/vinsol/spree/deployments","created_at":"2016-01-21T10:30:54Z","updated_at":"2016-02-26T12:43:28Z","pushed_at":"2016-05-16T10:39:56Z","git_url":"git://github.com/vinsol/spree.git","ssh_url":"git@github.com:vinsol/spree.git","clone_url":"https://github.com/vinsol/spree.git","svn_url":"https://github.com/vinsol/spree","homepage":"http://spreecommerce.com","size":76491,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":10,"mirror_url":null,"open_issues_count":11,"forks":10,"open_issues":11,"watchers":0,"default_branch":"master"}},"base":{"label":"spree:master","ref":"master","sha":"da50c7e4097c5e14a93255bd6b6938caae3deee4","user":{"login":"spree","id":56702,"avatar_url":"https://avatars.githubusercontent.com/u/56702?v=3","gravatar_id":"","url":"https://api.github.com/users/spree","html_url":"https://github.com/spree","followers_url":"https://api.github.com/users/spree/followers","following_url":"https://api.github.com/users/spree/following{/other_user}","gists_url":"https://api.github.com/users/spree/gists{/gist_id}","starred_url":"https://api.github.com/users/spree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spree/subscriptions","organizations_url":"https://api.github.com/users/spree/orgs","repos_url":"https://api.github.com/users/spree/repos","events_url":"https://api.github.com/users/spree/events{/privacy}","received_events_url":"https://api.github.com/users/spree/received_events","type":"Organization","site_admin":false},"repo":{"id":3314,"name":"spree","full_name":"spree/spree","owner":{"login":"spree","id":56702,"avatar_url":"https://avatars.githubusercontent.com/u/56702?v=3","gravatar_id":"","url":"https://api.github.com/users/spree","html_url":"https://github.com/spree","followers_url":"https://api.github.com/users/spree/followers","following_url":"https://api.github.com/users/spree/following{/other_user}","gists_url":"https://api.github.com/users/spree/gists{/gist_id}","starred_url":"https://api.github.com/users/spree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spree/subscriptions","organizations_url":"https://api.github.com/users/spree/orgs","repos_url":"https://api.github.com/users/spree/repos","events_url":"https://api.github.com/users/spree/events{/privacy}","received_events_url":"https://api.github.com/users/spree/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/spree/spree","description":"Spree is a complete open source e-commerce solution for Ruby on Rails.","fork":false,"url":"https://api.github.com/repos/spree/spree","forks_url":"https://api.github.com/repos/spree/spree/forks","keys_url":"https://api.github.com/repos/spree/spree/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spree/spree/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spree/spree/teams","hooks_url":"https://api.github.com/repos/spree/spree/hooks","issue_events_url":"https://api.github.com/repos/spree/spree/issues/events{/number}","events_url":"https://api.github.com/repos/spree/spree/events","assignees_url":"https://api.github.com/repos/spree/spree/assignees{/user}","branches_url":"https://api.github.com/repos/spree/spree/branches{/branch}","tags_url":"https://api.github.com/repos/spree/spree/tags","blobs_url":"https://api.github.com/repos/spree/spree/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spree/spree/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spree/spree/git/refs{/sha}","trees_url":"https://api.github.com/repos/spree/spree/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spree/spree/statuses/{sha}","languages_url":"https://api.github.com/repos/spree/spree/languages","stargazers_url":"https://api.github.com/repos/spree/spree/stargazers","contributors_url":"https://api.github.com/repos/spree/spree/contributors","subscribers_url":"https://api.github.com/repos/spree/spree/subscribers","subscription_url":"https://api.github.com/repos/spree/spree/subscription","commits_url":"https://api.github.com/repos/spree/spree/commits{/sha}","git_commits_url":"https://api.github.com/repos/spree/spree/git/commits{/sha}","comments_url":"https://api.github.com/repos/spree/spree/comments{/number}","issue_comment_url":"https://api.github.com/repos/spree/spree/issues/comments{/number}","contents_url":"https://api.github.com/repos/spree/spree/contents/{+path}","compare_url":"https://api.github.com/repos/spree/spree/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spree/spree/merges","archive_url":"https://api.github.com/repos/spree/spree/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spree/spree/downloads","issues_url":"https://api.github.com/repos/spree/spree/issues{/number}","pulls_url":"https://api.github.com/repos/spree/spree/pulls{/number}","milestones_url":"https://api.github.com/repos/spree/spree/milestones{/number}","notifications_url":"https://api.github.com/repos/spree/spree/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spree/spree/labels{/name}","releases_url":"https://api.github.com/repos/spree/spree/releases{/id}","deployments_url":"https://api.github.com/repos/spree/spree/deployments","created_at":"2008-03-10T14:45:35Z","updated_at":"2016-05-16T05:24:26Z","pushed_at":"2016-05-16T10:42:56Z","git_url":"git://github.com/spree/spree.git","ssh_url":"git@github.com:spree/spree.git","clone_url":"https://github.com/spree/spree.git","svn_url":"https://github.com/spree/spree","homepage":"http://spreecommerce.com","size":103058,"stargazers_count":7467,"watchers_count":7467,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3530,"mirror_url":null,"open_issues_count":169,"forks":3530,"open_issues":169,"watchers":7467,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/spree/spree/pulls/7350"},"html":{"href":"https://github.com/spree/spree/pull/7350"},"issue":{"href":"https://api.github.com/repos/spree/spree/issues/7350"},"comments":{"href":"https://api.github.com/repos/spree/spree/issues/7350/comments"},"review_comments":{"href":"https://api.github.com/repos/spree/spree/pulls/7350/comments"},"review_comment":{"href":"https://api.github.com/repos/spree/spree/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/spree/spree/pulls/7350/commits"},"statuses":{"href":"https://api.github.com/repos/spree/spree/statuses/02392d68e7430da7c7a62fe15e94e911195298c8"}}}}