{"action":"created","comment":{"url":"https://api.github.com/repos/cbitstech/rogalski/pulls/comments/42418878","id":42418878,"diff_hunk":"@@ -0,0 +1,25 @@\n+class MultisyllabicAnswersController < ApplicationController\n+\n+  protect_from_forgery :except => :create\n+\n+  def create\n+    card = MultisyllabicCard.find(params[:multisyllabic_card_id])\n+    filename = \"#{ Time.now }multisyllabic_card_#{ card.id }.wav\"\n+    audio = request.raw_post\n+    File.open(filename, 'w+b'){|file| file.puts audio}\n+    @multisyllabic_answer = MultisyllabicAnswer.new\n+    @multisyllabic_answer.multisyllabic_card_id = params[:multisyllabic_card_id]\n+    File.open(Rails.root + filename) do |file|\n+      @multisyllabic_answer.mp3 = file\n+      @multisyllabic_answer.save\n+    end\n+\n+    File.delete(Rails.root + filename.to_s) if File.exist?(Rails.root + filename.to_s)","path":"app/controllers/multisyllabic_answers_controller.rb","position":17,"original_position":17,"commit_id":"72713117bec620b4325e1cf28b7f0cfbc5e65c24","original_commit_id":"72713117bec620b4325e1cf28b7f0cfbc5e65c24","user":{"login":"eschlange","id":4666065,"avatar_url":"https://avatars.githubusercontent.com/u/4666065?v=3","gravatar_id":"","url":"https://api.github.com/users/eschlange","html_url":"https://github.com/eschlange","followers_url":"https://api.github.com/users/eschlange/followers","following_url":"https://api.github.com/users/eschlange/following{/other_user}","gists_url":"https://api.github.com/users/eschlange/gists{/gist_id}","starred_url":"https://api.github.com/users/eschlange/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eschlange/subscriptions","organizations_url":"https://api.github.com/users/eschlange/orgs","repos_url":"https://api.github.com/users/eschlange/repos","events_url":"https://api.github.com/users/eschlange/events{/privacy}","received_events_url":"https://api.github.com/users/eschlange/received_events","type":"User","site_admin":false},"body":"The controller copies the auto-named paperclip file in order to allow for multiple files to be associated with a single answer. It then deletes the auto-named file since it will no longer be referenced.","created_at":"2015-10-19T20:05:58Z","updated_at":"2015-10-19T20:05:58Z","html_url":"https://github.com/cbitstech/rogalski/pull/22#discussion_r42418878","pull_request_url":"https://api.github.com/repos/cbitstech/rogalski/pulls/22","_links":{"self":{"href":"https://api.github.com/repos/cbitstech/rogalski/pulls/comments/42418878"},"html":{"href":"https://github.com/cbitstech/rogalski/pull/22#discussion_r42418878"},"pull_request":{"href":"https://api.github.com/repos/cbitstech/rogalski/pulls/22"}}},"pull_request":{"url":"https://api.github.com/repos/cbitstech/rogalski/pulls/22","id":48113089,"html_url":"https://github.com/cbitstech/rogalski/pull/22","diff_url":"https://github.com/cbitstech/rogalski/pull/22.diff","patch_url":"https://github.com/cbitstech/rogalski/pull/22.patch","issue_url":"https://api.github.com/repos/cbitstech/rogalski/issues/22","number":22,"state":"open","locked":false,"title":"Added views, controllers and specs for new exercise.","user":{"login":"eschlange","id":4666065,"avatar_url":"https://avatars.githubusercontent.com/u/4666065?v=3","gravatar_id":"","url":"https://api.github.com/users/eschlange","html_url":"https://github.com/eschlange","followers_url":"https://api.github.com/users/eschlange/followers","following_url":"https://api.github.com/users/eschlange/following{/other_user}","gists_url":"https://api.github.com/users/eschlange/gists{/gist_id}","starred_url":"https://api.github.com/users/eschlange/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eschlange/subscriptions","organizations_url":"https://api.github.com/users/eschlange/orgs","repos_url":"https://api.github.com/users/eschlange/repos","events_url":"https://api.github.com/users/eschlange/events{/privacy}","received_events_url":"https://api.github.com/users/eschlange/received_events","type":"User","site_admin":false},"body":"* Added new pages for exercise views.\r\n* Added controllers for the exercise and to save answers.\r\n* Added javascript logic to save new answers.\r\n* Added javascript logic to play sample audio.\r\n* Updated routes for new files.\r\n* Updated javascript logic to allow multiple recordings.\r\n* Updated rails admin views.\r\n* Updated rails admin export data.\r\n* Added specs for new controllers.\r\n* Added fixtures for new specs.\r\n* Added specs for responses controller.\r\n\r\n[#105691316] [#105691640]","created_at":"2015-10-19T19:12:17Z","updated_at":"2015-10-19T20:05:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b0e7de98c3a9c22420d70aaa94c49ac1b80fb9ca","assignee":{"login":"michaelwehrley","id":526136,"avatar_url":"https://avatars.githubusercontent.com/u/526136?v=3","gravatar_id":"","url":"https://api.github.com/users/michaelwehrley","html_url":"https://github.com/michaelwehrley","followers_url":"https://api.github.com/users/michaelwehrley/followers","following_url":"https://api.github.com/users/michaelwehrley/following{/other_user}","gists_url":"https://api.github.com/users/michaelwehrley/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelwehrley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelwehrley/subscriptions","organizations_url":"https://api.github.com/users/michaelwehrley/orgs","repos_url":"https://api.github.com/users/michaelwehrley/repos","events_url":"https://api.github.com/users/michaelwehrley/events{/privacy}","received_events_url":"https://api.github.com/users/michaelwehrley/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/cbitstech/rogalski/pulls/22/commits","review_comments_url":"https://api.github.com/repos/cbitstech/rogalski/pulls/22/comments","review_comment_url":"https://api.github.com/repos/cbitstech/rogalski/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cbitstech/rogalski/issues/22/comments","statuses_url":"https://api.github.com/repos/cbitstech/rogalski/statuses/72713117bec620b4325e1cf28b7f0cfbc5e65c24","head":{"label":"cbitstech:ems-105691316","ref":"ems-105691316","sha":"72713117bec620b4325e1cf28b7f0cfbc5e65c24","user":{"login":"cbitstech","id":864362,"avatar_url":"https://avatars.githubusercontent.com/u/864362?v=3","gravatar_id":"","url":"https://api.github.com/users/cbitstech","html_url":"https://github.com/cbitstech","followers_url":"https://api.github.com/users/cbitstech/followers","following_url":"https://api.github.com/users/cbitstech/following{/other_user}","gists_url":"https://api.github.com/users/cbitstech/gists{/gist_id}","starred_url":"https://api.github.com/users/cbitstech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cbitstech/subscriptions","organizations_url":"https://api.github.com/users/cbitstech/orgs","repos_url":"https://api.github.com/users/cbitstech/repos","events_url":"https://api.github.com/users/cbitstech/events{/privacy}","received_events_url":"https://api.github.com/users/cbitstech/received_events","type":"User","site_admin":false},"repo":{"id":14692680,"name":"rogalski","full_name":"cbitstech/rogalski","owner":{"login":"cbitstech","id":864362,"avatar_url":"https://avatars.githubusercontent.com/u/864362?v=3","gravatar_id":"","url":"https://api.github.com/users/cbitstech","html_url":"https://github.com/cbitstech","followers_url":"https://api.github.com/users/cbitstech/followers","following_url":"https://api.github.com/users/cbitstech/following{/other_user}","gists_url":"https://api.github.com/users/cbitstech/gists{/gist_id}","starred_url":"https://api.github.com/users/cbitstech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cbitstech/subscriptions","organizations_url":"https://api.github.com/users/cbitstech/orgs","repos_url":"https://api.github.com/users/cbitstech/repos","events_url":"https://api.github.com/users/cbitstech/events{/privacy}","received_events_url":"https://api.github.com/users/cbitstech/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cbitstech/rogalski","description":"Web Application to aid people with aphasia","fork":false,"url":"https://api.github.com/repos/cbitstech/rogalski","forks_url":"https://api.github.com/repos/cbitstech/rogalski/forks","keys_url":"https://api.github.com/repos/cbitstech/rogalski/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cbitstech/rogalski/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cbitstech/rogalski/teams","hooks_url":"https://api.github.com/repos/cbitstech/rogalski/hooks","issue_events_url":"https://api.github.com/repos/cbitstech/rogalski/issues/events{/number}","events_url":"https://api.github.com/repos/cbitstech/rogalski/events","assignees_url":"https://api.github.com/repos/cbitstech/rogalski/assignees{/user}","branches_url":"https://api.github.com/repos/cbitstech/rogalski/branches{/branch}","tags_url":"https://api.github.com/repos/cbitstech/rogalski/tags","blobs_url":"https://api.github.com/repos/cbitstech/rogalski/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cbitstech/rogalski/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cbitstech/rogalski/git/refs{/sha}","trees_url":"https://api.github.com/repos/cbitstech/rogalski/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cbitstech/rogalski/statuses/{sha}","languages_url":"https://api.github.com/repos/cbitstech/rogalski/languages","stargazers_url":"https://api.github.com/repos/cbitstech/rogalski/stargazers","contributors_url":"https://api.github.com/repos/cbitstech/rogalski/contributors","subscribers_url":"https://api.github.com/repos/cbitstech/rogalski/subscribers","subscription_url":"https://api.github.com/repos/cbitstech/rogalski/subscription","commits_url":"https://api.github.com/repos/cbitstech/rogalski/commits{/sha}","git_commits_url":"https://api.github.com/repos/cbitstech/rogalski/git/commits{/sha}","comments_url":"https://api.github.com/repos/cbitstech/rogalski/comments{/number}","issue_comment_url":"https://api.github.com/repos/cbitstech/rogalski/issues/comments{/number}","contents_url":"https://api.github.com/repos/cbitstech/rogalski/contents/{+path}","compare_url":"https://api.github.com/repos/cbitstech/rogalski/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cbitstech/rogalski/merges","archive_url":"https://api.github.com/repos/cbitstech/rogalski/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cbitstech/rogalski/downloads","issues_url":"https://api.github.com/repos/cbitstech/rogalski/issues{/number}","pulls_url":"https://api.github.com/repos/cbitstech/rogalski/pulls{/number}","milestones_url":"https://api.github.com/repos/cbitstech/rogalski/milestones{/number}","notifications_url":"https://api.github.com/repos/cbitstech/rogalski/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cbitstech/rogalski/labels{/name}","releases_url":"https://api.github.com/repos/cbitstech/rogalski/releases{/id}","created_at":"2013-11-25T17:26:54Z","updated_at":"2015-05-08T20:22:39Z","pushed_at":"2015-10-19T19:12:18Z","git_url":"git://github.com/cbitstech/rogalski.git","ssh_url":"git@github.com:cbitstech/rogalski.git","clone_url":"https://github.com/cbitstech/rogalski.git","svn_url":"https://github.com/cbitstech/rogalski","homepage":null,"size":7224,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"cbitstech:master","ref":"master","sha":"ea8dfcdba17ca35822e849fc6e16a31f03b9d0bc","user":{"login":"cbitstech","id":864362,"avatar_url":"https://avatars.githubusercontent.com/u/864362?v=3","gravatar_id":"","url":"https://api.github.com/users/cbitstech","html_url":"https://github.com/cbitstech","followers_url":"https://api.github.com/users/cbitstech/followers","following_url":"https://api.github.com/users/cbitstech/following{/other_user}","gists_url":"https://api.github.com/users/cbitstech/gists{/gist_id}","starred_url":"https://api.github.com/users/cbitstech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cbitstech/subscriptions","organizations_url":"https://api.github.com/users/cbitstech/orgs","repos_url":"https://api.github.com/users/cbitstech/repos","events_url":"https://api.github.com/users/cbitstech/events{/privacy}","received_events_url":"https://api.github.com/users/cbitstech/received_events","type":"User","site_admin":false},"repo":{"id":14692680,"name":"rogalski","full_name":"cbitstech/rogalski","owner":{"login":"cbitstech","id":864362,"avatar_url":"https://avatars.githubusercontent.com/u/864362?v=3","gravatar_id":"","url":"https://api.github.com/users/cbitstech","html_url":"https://github.com/cbitstech","followers_url":"https://api.github.com/users/cbitstech/followers","following_url":"https://api.github.com/users/cbitstech/following{/other_user}","gists_url":"https://api.github.com/users/cbitstech/gists{/gist_id}","starred_url":"https://api.github.com/users/cbitstech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cbitstech/subscriptions","organizations_url":"https://api.github.com/users/cbitstech/orgs","repos_url":"https://api.github.com/users/cbitstech/repos","events_url":"https://api.github.com/users/cbitstech/events{/privacy}","received_events_url":"https://api.github.com/users/cbitstech/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cbitstech/rogalski","description":"Web Application to aid people with aphasia","fork":false,"url":"https://api.github.com/repos/cbitstech/rogalski","forks_url":"https://api.github.com/repos/cbitstech/rogalski/forks","keys_url":"https://api.github.com/repos/cbitstech/rogalski/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cbitstech/rogalski/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cbitstech/rogalski/teams","hooks_url":"https://api.github.com/repos/cbitstech/rogalski/hooks","issue_events_url":"https://api.github.com/repos/cbitstech/rogalski/issues/events{/number}","events_url":"https://api.github.com/repos/cbitstech/rogalski/events","assignees_url":"https://api.github.com/repos/cbitstech/rogalski/assignees{/user}","branches_url":"https://api.github.com/repos/cbitstech/rogalski/branches{/branch}","tags_url":"https://api.github.com/repos/cbitstech/rogalski/tags","blobs_url":"https://api.github.com/repos/cbitstech/rogalski/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cbitstech/rogalski/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cbitstech/rogalski/git/refs{/sha}","trees_url":"https://api.github.com/repos/cbitstech/rogalski/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cbitstech/rogalski/statuses/{sha}","languages_url":"https://api.github.com/repos/cbitstech/rogalski/languages","stargazers_url":"https://api.github.com/repos/cbitstech/rogalski/stargazers","contributors_url":"https://api.github.com/repos/cbitstech/rogalski/contributors","subscribers_url":"https://api.github.com/repos/cbitstech/rogalski/subscribers","subscription_url":"https://api.github.com/repos/cbitstech/rogalski/subscription","commits_url":"https://api.github.com/repos/cbitstech/rogalski/commits{/sha}","git_commits_url":"https://api.github.com/repos/cbitstech/rogalski/git/commits{/sha}","comments_url":"https://api.github.com/repos/cbitstech/rogalski/comments{/number}","issue_comment_url":"https://api.github.com/repos/cbitstech/rogalski/issues/comments{/number}","contents_url":"https://api.github.com/repos/cbitstech/rogalski/contents/{+path}","compare_url":"https://api.github.com/repos/cbitstech/rogalski/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cbitstech/rogalski/merges","archive_url":"https://api.github.com/repos/cbitstech/rogalski/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cbitstech/rogalski/downloads","issues_url":"https://api.github.com/repos/cbitstech/rogalski/issues{/number}","pulls_url":"https://api.github.com/repos/cbitstech/rogalski/pulls{/number}","milestones_url":"https://api.github.com/repos/cbitstech/rogalski/milestones{/number}","notifications_url":"https://api.github.com/repos/cbitstech/rogalski/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cbitstech/rogalski/labels{/name}","releases_url":"https://api.github.com/repos/cbitstech/rogalski/releases{/id}","created_at":"2013-11-25T17:26:54Z","updated_at":"2015-05-08T20:22:39Z","pushed_at":"2015-10-19T19:12:18Z","git_url":"git://github.com/cbitstech/rogalski.git","ssh_url":"git@github.com:cbitstech/rogalski.git","clone_url":"https://github.com/cbitstech/rogalski.git","svn_url":"https://github.com/cbitstech/rogalski","homepage":null,"size":7224,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cbitstech/rogalski/pulls/22"},"html":{"href":"https://github.com/cbitstech/rogalski/pull/22"},"issue":{"href":"https://api.github.com/repos/cbitstech/rogalski/issues/22"},"comments":{"href":"https://api.github.com/repos/cbitstech/rogalski/issues/22/comments"},"review_comments":{"href":"https://api.github.com/repos/cbitstech/rogalski/pulls/22/comments"},"review_comment":{"href":"https://api.github.com/repos/cbitstech/rogalski/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cbitstech/rogalski/pulls/22/commits"},"statuses":{"href":"https://api.github.com/repos/cbitstech/rogalski/statuses/72713117bec620b4325e1cf28b7f0cfbc5e65c24"}}}}