{"action":"created","comment":{"url":"https://api.github.com/repos/mumuki/mumuki-platform/pulls/comments/39591011","id":39591011,"diff_hunk":"@@ -4,9 +4,16 @@ class ExerciseSolutionsController < ApplicationController\n   before_action :authenticate!\n \n   def create\n+    guide_previously_done = is_guide_done?\n     @solution = @exercise.submit_solution(current_user, solution_params)\n     @solution.run_tests!\n-    render partial: 'exercise_solutions/results', locals: {solution: @solution}\n+    guide_finished_by_solution = !guide_previously_done && is_guide_done?\n+    render partial: 'exercise_solutions/results', locals: {solution: @solution, guide_finished_by_solution: guide_finished_by_solution}\n+  end\n+\n+  def is_guide_done?\n+    guide = @exercise.guide\n+    guide && guide.stats_for(current_user).done?\n   end","path":"app/controllers/exercise_solutions_controller.rb","position":null,"original_position":15,"commit_id":"b91fd5f249893154304b43293f54ba2e1d9f0232","original_commit_id":"ffa719a7f17e58c4520fbb2fb404a816e786cad7","user":{"login":"flbulgarelli","id":677436,"avatar_url":"https://avatars.githubusercontent.com/u/677436?v=3","gravatar_id":"","url":"https://api.github.com/users/flbulgarelli","html_url":"https://github.com/flbulgarelli","followers_url":"https://api.github.com/users/flbulgarelli/followers","following_url":"https://api.github.com/users/flbulgarelli/following{/other_user}","gists_url":"https://api.github.com/users/flbulgarelli/gists{/gist_id}","starred_url":"https://api.github.com/users/flbulgarelli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flbulgarelli/subscriptions","organizations_url":"https://api.github.com/users/flbulgarelli/orgs","repos_url":"https://api.github.com/users/flbulgarelli/repos","events_url":"https://api.github.com/users/flbulgarelli/events{/privacy}","received_events_url":"https://api.github.com/users/flbulgarelli/received_events","type":"User","site_admin":false},"body":"I mean: `exercise.guide_done?` ","created_at":"2015-09-16T03:33:01Z","updated_at":"2015-09-16T03:33:01Z","html_url":"https://github.com/mumuki/mumuki-platform/pull/314#discussion_r39591011","pull_request_url":"https://api.github.com/repos/mumuki/mumuki-platform/pulls/314","_links":{"self":{"href":"https://api.github.com/repos/mumuki/mumuki-platform/pulls/comments/39591011"},"html":{"href":"https://github.com/mumuki/mumuki-platform/pull/314#discussion_r39591011"},"pull_request":{"href":"https://api.github.com/repos/mumuki/mumuki-platform/pulls/314"}}},"pull_request":{"url":"https://api.github.com/repos/mumuki/mumuki-platform/pulls/314","id":45094406,"html_url":"https://github.com/mumuki/mumuki-platform/pull/314","diff_url":"https://github.com/mumuki/mumuki-platform/pull/314.diff","patch_url":"https://github.com/mumuki/mumuki-platform/pull/314.patch","issue_url":"https://api.github.com/repos/mumuki/mumuki-platform/issues/314","number":314,"state":"open","locked":false,"title":"Issue #271 annoying popup","user":{"login":"gcrespi","id":10291211,"avatar_url":"https://avatars.githubusercontent.com/u/10291211?v=3","gravatar_id":"","url":"https://api.github.com/users/gcrespi","html_url":"https://github.com/gcrespi","followers_url":"https://api.github.com/users/gcrespi/followers","following_url":"https://api.github.com/users/gcrespi/following{/other_user}","gists_url":"https://api.github.com/users/gcrespi/gists{/gist_id}","starred_url":"https://api.github.com/users/gcrespi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gcrespi/subscriptions","organizations_url":"https://api.github.com/users/gcrespi/orgs","repos_url":"https://api.github.com/users/gcrespi/repos","events_url":"https://api.github.com/users/gcrespi/events{/privacy}","received_events_url":"https://api.github.com/users/gcrespi/received_events","type":"User","site_admin":false},"body":"Fixes #271","created_at":"2015-09-15T19:55:51Z","updated_at":"2015-09-16T03:33:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c19249677b58ddb81b4eefc866fa53346266f262","assignee":{"login":"flbulgarelli","id":677436,"avatar_url":"https://avatars.githubusercontent.com/u/677436?v=3","gravatar_id":"","url":"https://api.github.com/users/flbulgarelli","html_url":"https://github.com/flbulgarelli","followers_url":"https://api.github.com/users/flbulgarelli/followers","following_url":"https://api.github.com/users/flbulgarelli/following{/other_user}","gists_url":"https://api.github.com/users/flbulgarelli/gists{/gist_id}","starred_url":"https://api.github.com/users/flbulgarelli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flbulgarelli/subscriptions","organizations_url":"https://api.github.com/users/flbulgarelli/orgs","repos_url":"https://api.github.com/users/flbulgarelli/repos","events_url":"https://api.github.com/users/flbulgarelli/events{/privacy}","received_events_url":"https://api.github.com/users/flbulgarelli/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/mumuki/mumuki-platform/pulls/314/commits","review_comments_url":"https://api.github.com/repos/mumuki/mumuki-platform/pulls/314/comments","review_comment_url":"https://api.github.com/repos/mumuki/mumuki-platform/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mumuki/mumuki-platform/issues/314/comments","statuses_url":"https://api.github.com/repos/mumuki/mumuki-platform/statuses/b91fd5f249893154304b43293f54ba2e1d9f0232","head":{"label":"mumuki:issue-#271-annoying-popups-in-finished-guides","ref":"issue-#271-annoying-popups-in-finished-guides","sha":"b91fd5f249893154304b43293f54ba2e1d9f0232","user":{"login":"mumuki","id":10385254,"avatar_url":"https://avatars.githubusercontent.com/u/10385254?v=3","gravatar_id":"","url":"https://api.github.com/users/mumuki","html_url":"https://github.com/mumuki","followers_url":"https://api.github.com/users/mumuki/followers","following_url":"https://api.github.com/users/mumuki/following{/other_user}","gists_url":"https://api.github.com/users/mumuki/gists{/gist_id}","starred_url":"https://api.github.com/users/mumuki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mumuki/subscriptions","organizations_url":"https://api.github.com/users/mumuki/orgs","repos_url":"https://api.github.com/users/mumuki/repos","events_url":"https://api.github.com/users/mumuki/events{/privacy}","received_events_url":"https://api.github.com/users/mumuki/received_events","type":"Organization","site_admin":false},"repo":{"id":27654303,"name":"mumuki-platform","full_name":"mumuki/mumuki-platform","owner":{"login":"mumuki","id":10385254,"avatar_url":"https://avatars.githubusercontent.com/u/10385254?v=3","gravatar_id":"","url":"https://api.github.com/users/mumuki","html_url":"https://github.com/mumuki","followers_url":"https://api.github.com/users/mumuki/followers","following_url":"https://api.github.com/users/mumuki/following{/other_user}","gists_url":"https://api.github.com/users/mumuki/gists{/gist_id}","starred_url":"https://api.github.com/users/mumuki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mumuki/subscriptions","organizations_url":"https://api.github.com/users/mumuki/orgs","repos_url":"https://api.github.com/users/mumuki/repos","events_url":"https://api.github.com/users/mumuki/events{/privacy}","received_events_url":"https://api.github.com/users/mumuki/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mumuki/mumuki-platform","description":"Improve your programming skills","fork":false,"url":"https://api.github.com/repos/mumuki/mumuki-platform","forks_url":"https://api.github.com/repos/mumuki/mumuki-platform/forks","keys_url":"https://api.github.com/repos/mumuki/mumuki-platform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mumuki/mumuki-platform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mumuki/mumuki-platform/teams","hooks_url":"https://api.github.com/repos/mumuki/mumuki-platform/hooks","issue_events_url":"https://api.github.com/repos/mumuki/mumuki-platform/issues/events{/number}","events_url":"https://api.github.com/repos/mumuki/mumuki-platform/events","assignees_url":"https://api.github.com/repos/mumuki/mumuki-platform/assignees{/user}","branches_url":"https://api.github.com/repos/mumuki/mumuki-platform/branches{/branch}","tags_url":"https://api.github.com/repos/mumuki/mumuki-platform/tags","blobs_url":"https://api.github.com/repos/mumuki/mumuki-platform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mumuki/mumuki-platform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mumuki/mumuki-platform/git/refs{/sha}","trees_url":"https://api.github.com/repos/mumuki/mumuki-platform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mumuki/mumuki-platform/statuses/{sha}","languages_url":"https://api.github.com/repos/mumuki/mumuki-platform/languages","stargazers_url":"https://api.github.com/repos/mumuki/mumuki-platform/stargazers","contributors_url":"https://api.github.com/repos/mumuki/mumuki-platform/contributors","subscribers_url":"https://api.github.com/repos/mumuki/mumuki-platform/subscribers","subscription_url":"https://api.github.com/repos/mumuki/mumuki-platform/subscription","commits_url":"https://api.github.com/repos/mumuki/mumuki-platform/commits{/sha}","git_commits_url":"https://api.github.com/repos/mumuki/mumuki-platform/git/commits{/sha}","comments_url":"https://api.github.com/repos/mumuki/mumuki-platform/comments{/number}","issue_comment_url":"https://api.github.com/repos/mumuki/mumuki-platform/issues/comments{/number}","contents_url":"https://api.github.com/repos/mumuki/mumuki-platform/contents/{+path}","compare_url":"https://api.github.com/repos/mumuki/mumuki-platform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mumuki/mumuki-platform/merges","archive_url":"https://api.github.com/repos/mumuki/mumuki-platform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mumuki/mumuki-platform/downloads","issues_url":"https://api.github.com/repos/mumuki/mumuki-platform/issues{/number}","pulls_url":"https://api.github.com/repos/mumuki/mumuki-platform/pulls{/number}","milestones_url":"https://api.github.com/repos/mumuki/mumuki-platform/milestones{/number}","notifications_url":"https://api.github.com/repos/mumuki/mumuki-platform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mumuki/mumuki-platform/labels{/name}","releases_url":"https://api.github.com/repos/mumuki/mumuki-platform/releases{/id}","created_at":"2014-12-07T00:31:42Z","updated_at":"2015-09-09T21:22:19Z","pushed_at":"2015-09-16T03:30:06Z","git_url":"git://github.com/mumuki/mumuki-platform.git","ssh_url":"git@github.com:mumuki/mumuki-platform.git","clone_url":"https://github.com/mumuki/mumuki-platform.git","svn_url":"https://github.com/mumuki/mumuki-platform","homepage":"http://mumuki.io","size":12018,"stargazers_count":100,"watchers_count":100,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":49,"forks":13,"open_issues":49,"watchers":100,"default_branch":"master"}},"base":{"label":"mumuki:master","ref":"master","sha":"5219827458324e6b47163254656b08d7f956cbc1","user":{"login":"mumuki","id":10385254,"avatar_url":"https://avatars.githubusercontent.com/u/10385254?v=3","gravatar_id":"","url":"https://api.github.com/users/mumuki","html_url":"https://github.com/mumuki","followers_url":"https://api.github.com/users/mumuki/followers","following_url":"https://api.github.com/users/mumuki/following{/other_user}","gists_url":"https://api.github.com/users/mumuki/gists{/gist_id}","starred_url":"https://api.github.com/users/mumuki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mumuki/subscriptions","organizations_url":"https://api.github.com/users/mumuki/orgs","repos_url":"https://api.github.com/users/mumuki/repos","events_url":"https://api.github.com/users/mumuki/events{/privacy}","received_events_url":"https://api.github.com/users/mumuki/received_events","type":"Organization","site_admin":false},"repo":{"id":27654303,"name":"mumuki-platform","full_name":"mumuki/mumuki-platform","owner":{"login":"mumuki","id":10385254,"avatar_url":"https://avatars.githubusercontent.com/u/10385254?v=3","gravatar_id":"","url":"https://api.github.com/users/mumuki","html_url":"https://github.com/mumuki","followers_url":"https://api.github.com/users/mumuki/followers","following_url":"https://api.github.com/users/mumuki/following{/other_user}","gists_url":"https://api.github.com/users/mumuki/gists{/gist_id}","starred_url":"https://api.github.com/users/mumuki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mumuki/subscriptions","organizations_url":"https://api.github.com/users/mumuki/orgs","repos_url":"https://api.github.com/users/mumuki/repos","events_url":"https://api.github.com/users/mumuki/events{/privacy}","received_events_url":"https://api.github.com/users/mumuki/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mumuki/mumuki-platform","description":"Improve your programming skills","fork":false,"url":"https://api.github.com/repos/mumuki/mumuki-platform","forks_url":"https://api.github.com/repos/mumuki/mumuki-platform/forks","keys_url":"https://api.github.com/repos/mumuki/mumuki-platform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mumuki/mumuki-platform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mumuki/mumuki-platform/teams","hooks_url":"https://api.github.com/repos/mumuki/mumuki-platform/hooks","issue_events_url":"https://api.github.com/repos/mumuki/mumuki-platform/issues/events{/number}","events_url":"https://api.github.com/repos/mumuki/mumuki-platform/events","assignees_url":"https://api.github.com/repos/mumuki/mumuki-platform/assignees{/user}","branches_url":"https://api.github.com/repos/mumuki/mumuki-platform/branches{/branch}","tags_url":"https://api.github.com/repos/mumuki/mumuki-platform/tags","blobs_url":"https://api.github.com/repos/mumuki/mumuki-platform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mumuki/mumuki-platform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mumuki/mumuki-platform/git/refs{/sha}","trees_url":"https://api.github.com/repos/mumuki/mumuki-platform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mumuki/mumuki-platform/statuses/{sha}","languages_url":"https://api.github.com/repos/mumuki/mumuki-platform/languages","stargazers_url":"https://api.github.com/repos/mumuki/mumuki-platform/stargazers","contributors_url":"https://api.github.com/repos/mumuki/mumuki-platform/contributors","subscribers_url":"https://api.github.com/repos/mumuki/mumuki-platform/subscribers","subscription_url":"https://api.github.com/repos/mumuki/mumuki-platform/subscription","commits_url":"https://api.github.com/repos/mumuki/mumuki-platform/commits{/sha}","git_commits_url":"https://api.github.com/repos/mumuki/mumuki-platform/git/commits{/sha}","comments_url":"https://api.github.com/repos/mumuki/mumuki-platform/comments{/number}","issue_comment_url":"https://api.github.com/repos/mumuki/mumuki-platform/issues/comments{/number}","contents_url":"https://api.github.com/repos/mumuki/mumuki-platform/contents/{+path}","compare_url":"https://api.github.com/repos/mumuki/mumuki-platform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mumuki/mumuki-platform/merges","archive_url":"https://api.github.com/repos/mumuki/mumuki-platform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mumuki/mumuki-platform/downloads","issues_url":"https://api.github.com/repos/mumuki/mumuki-platform/issues{/number}","pulls_url":"https://api.github.com/repos/mumuki/mumuki-platform/pulls{/number}","milestones_url":"https://api.github.com/repos/mumuki/mumuki-platform/milestones{/number}","notifications_url":"https://api.github.com/repos/mumuki/mumuki-platform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mumuki/mumuki-platform/labels{/name}","releases_url":"https://api.github.com/repos/mumuki/mumuki-platform/releases{/id}","created_at":"2014-12-07T00:31:42Z","updated_at":"2015-09-09T21:22:19Z","pushed_at":"2015-09-16T03:30:06Z","git_url":"git://github.com/mumuki/mumuki-platform.git","ssh_url":"git@github.com:mumuki/mumuki-platform.git","clone_url":"https://github.com/mumuki/mumuki-platform.git","svn_url":"https://github.com/mumuki/mumuki-platform","homepage":"http://mumuki.io","size":12018,"stargazers_count":100,"watchers_count":100,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":49,"forks":13,"open_issues":49,"watchers":100,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mumuki/mumuki-platform/pulls/314"},"html":{"href":"https://github.com/mumuki/mumuki-platform/pull/314"},"issue":{"href":"https://api.github.com/repos/mumuki/mumuki-platform/issues/314"},"comments":{"href":"https://api.github.com/repos/mumuki/mumuki-platform/issues/314/comments"},"review_comments":{"href":"https://api.github.com/repos/mumuki/mumuki-platform/pulls/314/comments"},"review_comment":{"href":"https://api.github.com/repos/mumuki/mumuki-platform/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mumuki/mumuki-platform/pulls/314/commits"},"statuses":{"href":"https://api.github.com/repos/mumuki/mumuki-platform/statuses/b91fd5f249893154304b43293f54ba2e1d9f0232"}}}}