{"action":"created","comment":{"url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/pulls/comments/33288791","id":33288791,"diff_hunk":"@@ -34,24 +41,54 @@ def update\n \n         if @store_credit.save\n           flash[:success] = flash_message_for(@store_credit, :successfully_updated)\n-          redirect_to admin_user_store_credits_path(@user)\n+          respond_with(@store_credit) do |format|\n+            format.js { render partial: '/spree/admin/store_credits/update' }\n+          end\n         else\n-          load_categories\n           flash[:error] = \"#{Spree.t(\"admin.store_credits.unable_to_update\")} #{@store_credit.errors.full_messages}\"\n-          render :edit\n+          respond_with(@store_credit) do |format|\n+            format.js { render partial: '/spree/admin/store_credits/update' }\n+          end\n+        end\n+      end\n+\n+      def update_amount","path":"app/controllers/spree/admin/store_credits_controller.rb","position":41,"original_position":41,"commit_id":"4d8aef85a5c1253d91f2ef2e0a6262e98c288ed9","original_commit_id":"4d8aef85a5c1253d91f2ef2e0a6262e98c288ed9","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":"That would probably be a good place to start. Give it a shot and see what it looks like.","created_at":"2015-06-25T18:32:11Z","updated_at":"2015-06-25T18:32:11Z","html_url":"https://github.com/bonobos/spree_store_credit_payment_method/pull/67#discussion_r33288791","pull_request_url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/pulls/67","_links":{"self":{"href":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/pulls/comments/33288791"},"html":{"href":"https://github.com/bonobos/spree_store_credit_payment_method/pull/67#discussion_r33288791"},"pull_request":{"href":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/pulls/67"}}},"pull_request":{"url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/pulls/67","id":38440603,"html_url":"https://github.com/bonobos/spree_store_credit_payment_method/pull/67","diff_url":"https://github.com/bonobos/spree_store_credit_payment_method/pull/67.diff","patch_url":"https://github.com/bonobos/spree_store_credit_payment_method/pull/67.patch","issue_url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/issues/67","number":67,"state":"open","locked":false,"title":"Restrict store credit updating","user":{"login":"richardnuno","id":2223534,"avatar_url":"https://avatars.githubusercontent.com/u/2223534?v=3","gravatar_id":"","url":"https://api.github.com/users/richardnuno","html_url":"https://github.com/richardnuno","followers_url":"https://api.github.com/users/richardnuno/followers","following_url":"https://api.github.com/users/richardnuno/following{/other_user}","gists_url":"https://api.github.com/users/richardnuno/gists{/gist_id}","starred_url":"https://api.github.com/users/richardnuno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richardnuno/subscriptions","organizations_url":"https://api.github.com/users/richardnuno/orgs","repos_url":"https://api.github.com/users/richardnuno/repos","events_url":"https://api.github.com/users/richardnuno/events{/privacy}","received_events_url":"https://api.github.com/users/richardnuno/received_events","type":"User","site_admin":false},"body":"This change disables the ability to change a store credit's category once it's been allocated. If a store credit starts out associated with a certain category and is changed after an accounting reconciliation, the store credit will be incorrectly classified the next time a reconciliation is performed. When a store credit is created with an incorrect category, the admin should invalidate it and create a new one.\r\n\r\nWhen changing a store credit's amount or when invalidating store credit, the admin will have to select a reason why they are performing the action. This helps to better determine a store credit's history.\r\n\r\nA new detail page is introduced to display information about a store credit, including it's associated store credit events. This will help admins by enabling them to view what modified a customer's store credit, when that modification was made and why it was made.","created_at":"2015-06-24T13:18:34Z","updated_at":"2015-06-25T18:32:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f5e30540bef4d18c42450c29459fa63a207d5f46","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/pulls/67/commits","review_comments_url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/pulls/67/comments","review_comment_url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/issues/67/comments","statuses_url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/statuses/4d8aef85a5c1253d91f2ef2e0a6262e98c288ed9","head":{"label":"bonobos:restrict-updating","ref":"restrict-updating","sha":"4d8aef85a5c1253d91f2ef2e0a6262e98c288ed9","user":{"login":"bonobos","id":78914,"avatar_url":"https://avatars.githubusercontent.com/u/78914?v=3","gravatar_id":"","url":"https://api.github.com/users/bonobos","html_url":"https://github.com/bonobos","followers_url":"https://api.github.com/users/bonobos/followers","following_url":"https://api.github.com/users/bonobos/following{/other_user}","gists_url":"https://api.github.com/users/bonobos/gists{/gist_id}","starred_url":"https://api.github.com/users/bonobos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bonobos/subscriptions","organizations_url":"https://api.github.com/users/bonobos/orgs","repos_url":"https://api.github.com/users/bonobos/repos","events_url":"https://api.github.com/users/bonobos/events{/privacy}","received_events_url":"https://api.github.com/users/bonobos/received_events","type":"Organization","site_admin":false},"repo":{"id":20221069,"name":"spree_store_credit_payment_method","full_name":"bonobos/spree_store_credit_payment_method","owner":{"login":"bonobos","id":78914,"avatar_url":"https://avatars.githubusercontent.com/u/78914?v=3","gravatar_id":"","url":"https://api.github.com/users/bonobos","html_url":"https://github.com/bonobos","followers_url":"https://api.github.com/users/bonobos/followers","following_url":"https://api.github.com/users/bonobos/following{/other_user}","gists_url":"https://api.github.com/users/bonobos/gists{/gist_id}","starred_url":"https://api.github.com/users/bonobos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bonobos/subscriptions","organizations_url":"https://api.github.com/users/bonobos/orgs","repos_url":"https://api.github.com/users/bonobos/repos","events_url":"https://api.github.com/users/bonobos/events{/privacy}","received_events_url":"https://api.github.com/users/bonobos/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bonobos/spree_store_credit_payment_method","description":"Store credit as a payment method","fork":false,"url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method","forks_url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/forks","keys_url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/teams","hooks_url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/hooks","issue_events_url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/issues/events{/number}","events_url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/events","assignees_url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/assignees{/user}","branches_url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/branches{/branch}","tags_url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/tags","blobs_url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/git/refs{/sha}","trees_url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/statuses/{sha}","languages_url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/languages","stargazers_url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/stargazers","contributors_url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/contributors","subscribers_url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/subscribers","subscription_url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/subscription","commits_url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/commits{/sha}","git_commits_url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/git/commits{/sha}","comments_url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/comments{/number}","issue_comment_url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/issues/comments{/number}","contents_url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/contents/{+path}","compare_url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/merges","archive_url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/downloads","issues_url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/issues{/number}","pulls_url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/pulls{/number}","milestones_url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/milestones{/number}","notifications_url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/labels{/name}","releases_url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/releases{/id}","created_at":"2014-05-27T13:34:15Z","updated_at":"2015-04-17T15:04:07Z","pushed_at":"2015-06-24T19:12:08Z","git_url":"git://github.com/bonobos/spree_store_credit_payment_method.git","ssh_url":"git@github.com:bonobos/spree_store_credit_payment_method.git","clone_url":"https://github.com/bonobos/spree_store_credit_payment_method.git","svn_url":"https://github.com/bonobos/spree_store_credit_payment_method","homepage":null,"size":1030,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"2-2-dev"}},"base":{"label":"bonobos:2-2-dev","ref":"2-2-dev","sha":"e476c15c4e30ef7bc70a5590554a086cee14ee0e","user":{"login":"bonobos","id":78914,"avatar_url":"https://avatars.githubusercontent.com/u/78914?v=3","gravatar_id":"","url":"https://api.github.com/users/bonobos","html_url":"https://github.com/bonobos","followers_url":"https://api.github.com/users/bonobos/followers","following_url":"https://api.github.com/users/bonobos/following{/other_user}","gists_url":"https://api.github.com/users/bonobos/gists{/gist_id}","starred_url":"https://api.github.com/users/bonobos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bonobos/subscriptions","organizations_url":"https://api.github.com/users/bonobos/orgs","repos_url":"https://api.github.com/users/bonobos/repos","events_url":"https://api.github.com/users/bonobos/events{/privacy}","received_events_url":"https://api.github.com/users/bonobos/received_events","type":"Organization","site_admin":false},"repo":{"id":20221069,"name":"spree_store_credit_payment_method","full_name":"bonobos/spree_store_credit_payment_method","owner":{"login":"bonobos","id":78914,"avatar_url":"https://avatars.githubusercontent.com/u/78914?v=3","gravatar_id":"","url":"https://api.github.com/users/bonobos","html_url":"https://github.com/bonobos","followers_url":"https://api.github.com/users/bonobos/followers","following_url":"https://api.github.com/users/bonobos/following{/other_user}","gists_url":"https://api.github.com/users/bonobos/gists{/gist_id}","starred_url":"https://api.github.com/users/bonobos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bonobos/subscriptions","organizations_url":"https://api.github.com/users/bonobos/orgs","repos_url":"https://api.github.com/users/bonobos/repos","events_url":"https://api.github.com/users/bonobos/events{/privacy}","received_events_url":"https://api.github.com/users/bonobos/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bonobos/spree_store_credit_payment_method","description":"Store credit as a payment method","fork":false,"url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method","forks_url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/forks","keys_url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/teams","hooks_url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/hooks","issue_events_url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/issues/events{/number}","events_url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/events","assignees_url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/assignees{/user}","branches_url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/branches{/branch}","tags_url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/tags","blobs_url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/git/refs{/sha}","trees_url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/statuses/{sha}","languages_url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/languages","stargazers_url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/stargazers","contributors_url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/contributors","subscribers_url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/subscribers","subscription_url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/subscription","commits_url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/commits{/sha}","git_commits_url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/git/commits{/sha}","comments_url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/comments{/number}","issue_comment_url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/issues/comments{/number}","contents_url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/contents/{+path}","compare_url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/merges","archive_url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/downloads","issues_url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/issues{/number}","pulls_url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/pulls{/number}","milestones_url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/milestones{/number}","notifications_url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/labels{/name}","releases_url":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/releases{/id}","created_at":"2014-05-27T13:34:15Z","updated_at":"2015-04-17T15:04:07Z","pushed_at":"2015-06-24T19:12:08Z","git_url":"git://github.com/bonobos/spree_store_credit_payment_method.git","ssh_url":"git@github.com:bonobos/spree_store_credit_payment_method.git","clone_url":"https://github.com/bonobos/spree_store_credit_payment_method.git","svn_url":"https://github.com/bonobos/spree_store_credit_payment_method","homepage":null,"size":1030,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"2-2-dev"}},"_links":{"self":{"href":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/pulls/67"},"html":{"href":"https://github.com/bonobos/spree_store_credit_payment_method/pull/67"},"issue":{"href":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/issues/67"},"comments":{"href":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/issues/67/comments"},"review_comments":{"href":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/pulls/67/comments"},"review_comment":{"href":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/pulls/67/commits"},"statuses":{"href":"https://api.github.com/repos/bonobos/spree_store_credit_payment_method/statuses/4d8aef85a5c1253d91f2ef2e0a6262e98c288ed9"}}}}