{"action":"created","comment":{"url":"https://api.github.com/repos/smashingboxes/epa-prototype-api/pulls/comments/47935607","id":47935607,"diff_hunk":"@@ -0,0 +1,33 @@\n+class ActivitiesController < ApplicationController\n+  def create\n+    Activity.transaction do\n+      params[:activities].each do |activity|\n+        @last_activity = Activity.new(activity_params(activity))\n+        @last_activity.save!\n+      end\n+    end\n+\n+    rescue ActiveRecord::RecordInvalid\n+    render json: @last_activity.errors.to_hash","path":"app/controllers/activities_controller.rb","position":11,"original_position":11,"commit_id":"ceb6d5dd7c553750390b9a4412bb99a7597eb378","original_commit_id":"ceb6d5dd7c553750390b9a4412bb99a7597eb378","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"User","site_admin":false},"body":"Use 2 (not 0) spaces for indentation.","created_at":"2015-12-17T17:38:21Z","updated_at":"2015-12-17T17:38:21Z","html_url":"https://github.com/smashingboxes/epa-prototype-api/pull/4#discussion_r47935607","pull_request_url":"https://api.github.com/repos/smashingboxes/epa-prototype-api/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/smashingboxes/epa-prototype-api/pulls/comments/47935607"},"html":{"href":"https://github.com/smashingboxes/epa-prototype-api/pull/4#discussion_r47935607"},"pull_request":{"href":"https://api.github.com/repos/smashingboxes/epa-prototype-api/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/smashingboxes/epa-prototype-api/pulls/4","id":54005416,"html_url":"https://github.com/smashingboxes/epa-prototype-api/pull/4","diff_url":"https://github.com/smashingboxes/epa-prototype-api/pull/4.diff","patch_url":"https://github.com/smashingboxes/epa-prototype-api/pull/4.patch","issue_url":"https://api.github.com/repos/smashingboxes/epa-prototype-api/issues/4","number":4,"state":"open","locked":false,"title":"Post workout data","user":{"login":"BrandonMathis","id":362269,"avatar_url":"https://avatars.githubusercontent.com/u/362269?v=3","gravatar_id":"","url":"https://api.github.com/users/BrandonMathis","html_url":"https://github.com/BrandonMathis","followers_url":"https://api.github.com/users/BrandonMathis/followers","following_url":"https://api.github.com/users/BrandonMathis/following{/other_user}","gists_url":"https://api.github.com/users/BrandonMathis/gists{/gist_id}","starred_url":"https://api.github.com/users/BrandonMathis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BrandonMathis/subscriptions","organizations_url":"https://api.github.com/users/BrandonMathis/orgs","repos_url":"https://api.github.com/users/BrandonMathis/repos","events_url":"https://api.github.com/users/BrandonMathis/events{/privacy}","received_events_url":"https://api.github.com/users/BrandonMathis/received_events","type":"User","site_admin":false},"body":"## What Changed\r\n* Created endpoint for android app to post data to\r\n\r\n## Why\r\n* So that we can keep up with type of activity","created_at":"2015-12-17T17:21:33Z","updated_at":"2015-12-17T17:38:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1879d327ab0b48991fc207948158b34219927a25","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/smashingboxes/epa-prototype-api/pulls/4/commits","review_comments_url":"https://api.github.com/repos/smashingboxes/epa-prototype-api/pulls/4/comments","review_comment_url":"https://api.github.com/repos/smashingboxes/epa-prototype-api/pulls/comments{/number}","comments_url":"https://api.github.com/repos/smashingboxes/epa-prototype-api/issues/4/comments","statuses_url":"https://api.github.com/repos/smashingboxes/epa-prototype-api/statuses/ceb6d5dd7c553750390b9a4412bb99a7597eb378","head":{"label":"smashingboxes:post-workout-data","ref":"post-workout-data","sha":"ceb6d5dd7c553750390b9a4412bb99a7597eb378","user":{"login":"smashingboxes","id":784473,"avatar_url":"https://avatars.githubusercontent.com/u/784473?v=3","gravatar_id":"","url":"https://api.github.com/users/smashingboxes","html_url":"https://github.com/smashingboxes","followers_url":"https://api.github.com/users/smashingboxes/followers","following_url":"https://api.github.com/users/smashingboxes/following{/other_user}","gists_url":"https://api.github.com/users/smashingboxes/gists{/gist_id}","starred_url":"https://api.github.com/users/smashingboxes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smashingboxes/subscriptions","organizations_url":"https://api.github.com/users/smashingboxes/orgs","repos_url":"https://api.github.com/users/smashingboxes/repos","events_url":"https://api.github.com/users/smashingboxes/events{/privacy}","received_events_url":"https://api.github.com/users/smashingboxes/received_events","type":"Organization","site_admin":false},"repo":{"id":48000919,"name":"epa-prototype-api","full_name":"smashingboxes/epa-prototype-api","owner":{"login":"smashingboxes","id":784473,"avatar_url":"https://avatars.githubusercontent.com/u/784473?v=3","gravatar_id":"","url":"https://api.github.com/users/smashingboxes","html_url":"https://github.com/smashingboxes","followers_url":"https://api.github.com/users/smashingboxes/followers","following_url":"https://api.github.com/users/smashingboxes/following{/other_user}","gists_url":"https://api.github.com/users/smashingboxes/gists{/gist_id}","starred_url":"https://api.github.com/users/smashingboxes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smashingboxes/subscriptions","organizations_url":"https://api.github.com/users/smashingboxes/orgs","repos_url":"https://api.github.com/users/smashingboxes/repos","events_url":"https://api.github.com/users/smashingboxes/events{/privacy}","received_events_url":"https://api.github.com/users/smashingboxes/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/smashingboxes/epa-prototype-api","description":"","fork":false,"url":"https://api.github.com/repos/smashingboxes/epa-prototype-api","forks_url":"https://api.github.com/repos/smashingboxes/epa-prototype-api/forks","keys_url":"https://api.github.com/repos/smashingboxes/epa-prototype-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/smashingboxes/epa-prototype-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/smashingboxes/epa-prototype-api/teams","hooks_url":"https://api.github.com/repos/smashingboxes/epa-prototype-api/hooks","issue_events_url":"https://api.github.com/repos/smashingboxes/epa-prototype-api/issues/events{/number}","events_url":"https://api.github.com/repos/smashingboxes/epa-prototype-api/events","assignees_url":"https://api.github.com/repos/smashingboxes/epa-prototype-api/assignees{/user}","branches_url":"https://api.github.com/repos/smashingboxes/epa-prototype-api/branches{/branch}","tags_url":"https://api.github.com/repos/smashingboxes/epa-prototype-api/tags","blobs_url":"https://api.github.com/repos/smashingboxes/epa-prototype-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/smashingboxes/epa-prototype-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/smashingboxes/epa-prototype-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/smashingboxes/epa-prototype-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/smashingboxes/epa-prototype-api/statuses/{sha}","languages_url":"https://api.github.com/repos/smashingboxes/epa-prototype-api/languages","stargazers_url":"https://api.github.com/repos/smashingboxes/epa-prototype-api/stargazers","contributors_url":"https://api.github.com/repos/smashingboxes/epa-prototype-api/contributors","subscribers_url":"https://api.github.com/repos/smashingboxes/epa-prototype-api/subscribers","subscription_url":"https://api.github.com/repos/smashingboxes/epa-prototype-api/subscription","commits_url":"https://api.github.com/repos/smashingboxes/epa-prototype-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/smashingboxes/epa-prototype-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/smashingboxes/epa-prototype-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/smashingboxes/epa-prototype-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/smashingboxes/epa-prototype-api/contents/{+path}","compare_url":"https://api.github.com/repos/smashingboxes/epa-prototype-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/smashingboxes/epa-prototype-api/merges","archive_url":"https://api.github.com/repos/smashingboxes/epa-prototype-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/smashingboxes/epa-prototype-api/downloads","issues_url":"https://api.github.com/repos/smashingboxes/epa-prototype-api/issues{/number}","pulls_url":"https://api.github.com/repos/smashingboxes/epa-prototype-api/pulls{/number}","milestones_url":"https://api.github.com/repos/smashingboxes/epa-prototype-api/milestones{/number}","notifications_url":"https://api.github.com/repos/smashingboxes/epa-prototype-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/smashingboxes/epa-prototype-api/labels{/name}","releases_url":"https://api.github.com/repos/smashingboxes/epa-prototype-api/releases{/id}","created_at":"2015-12-14T20:59:41Z","updated_at":"2015-12-15T21:34:15Z","pushed_at":"2015-12-17T17:38:18Z","git_url":"git://github.com/smashingboxes/epa-prototype-api.git","ssh_url":"git@github.com:smashingboxes/epa-prototype-api.git","clone_url":"https://github.com/smashingboxes/epa-prototype-api.git","svn_url":"https://github.com/smashingboxes/epa-prototype-api","homepage":null,"size":54,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"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":"smashingboxes:master","ref":"master","sha":"7654bf5ae31d1047e89e7d567820a7124137c0c1","user":{"login":"smashingboxes","id":784473,"avatar_url":"https://avatars.githubusercontent.com/u/784473?v=3","gravatar_id":"","url":"https://api.github.com/users/smashingboxes","html_url":"https://github.com/smashingboxes","followers_url":"https://api.github.com/users/smashingboxes/followers","following_url":"https://api.github.com/users/smashingboxes/following{/other_user}","gists_url":"https://api.github.com/users/smashingboxes/gists{/gist_id}","starred_url":"https://api.github.com/users/smashingboxes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smashingboxes/subscriptions","organizations_url":"https://api.github.com/users/smashingboxes/orgs","repos_url":"https://api.github.com/users/smashingboxes/repos","events_url":"https://api.github.com/users/smashingboxes/events{/privacy}","received_events_url":"https://api.github.com/users/smashingboxes/received_events","type":"Organization","site_admin":false},"repo":{"id":48000919,"name":"epa-prototype-api","full_name":"smashingboxes/epa-prototype-api","owner":{"login":"smashingboxes","id":784473,"avatar_url":"https://avatars.githubusercontent.com/u/784473?v=3","gravatar_id":"","url":"https://api.github.com/users/smashingboxes","html_url":"https://github.com/smashingboxes","followers_url":"https://api.github.com/users/smashingboxes/followers","following_url":"https://api.github.com/users/smashingboxes/following{/other_user}","gists_url":"https://api.github.com/users/smashingboxes/gists{/gist_id}","starred_url":"https://api.github.com/users/smashingboxes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smashingboxes/subscriptions","organizations_url":"https://api.github.com/users/smashingboxes/orgs","repos_url":"https://api.github.com/users/smashingboxes/repos","events_url":"https://api.github.com/users/smashingboxes/events{/privacy}","received_events_url":"https://api.github.com/users/smashingboxes/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/smashingboxes/epa-prototype-api","description":"","fork":false,"url":"https://api.github.com/repos/smashingboxes/epa-prototype-api","forks_url":"https://api.github.com/repos/smashingboxes/epa-prototype-api/forks","keys_url":"https://api.github.com/repos/smashingboxes/epa-prototype-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/smashingboxes/epa-prototype-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/smashingboxes/epa-prototype-api/teams","hooks_url":"https://api.github.com/repos/smashingboxes/epa-prototype-api/hooks","issue_events_url":"https://api.github.com/repos/smashingboxes/epa-prototype-api/issues/events{/number}","events_url":"https://api.github.com/repos/smashingboxes/epa-prototype-api/events","assignees_url":"https://api.github.com/repos/smashingboxes/epa-prototype-api/assignees{/user}","branches_url":"https://api.github.com/repos/smashingboxes/epa-prototype-api/branches{/branch}","tags_url":"https://api.github.com/repos/smashingboxes/epa-prototype-api/tags","blobs_url":"https://api.github.com/repos/smashingboxes/epa-prototype-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/smashingboxes/epa-prototype-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/smashingboxes/epa-prototype-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/smashingboxes/epa-prototype-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/smashingboxes/epa-prototype-api/statuses/{sha}","languages_url":"https://api.github.com/repos/smashingboxes/epa-prototype-api/languages","stargazers_url":"https://api.github.com/repos/smashingboxes/epa-prototype-api/stargazers","contributors_url":"https://api.github.com/repos/smashingboxes/epa-prototype-api/contributors","subscribers_url":"https://api.github.com/repos/smashingboxes/epa-prototype-api/subscribers","subscription_url":"https://api.github.com/repos/smashingboxes/epa-prototype-api/subscription","commits_url":"https://api.github.com/repos/smashingboxes/epa-prototype-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/smashingboxes/epa-prototype-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/smashingboxes/epa-prototype-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/smashingboxes/epa-prototype-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/smashingboxes/epa-prototype-api/contents/{+path}","compare_url":"https://api.github.com/repos/smashingboxes/epa-prototype-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/smashingboxes/epa-prototype-api/merges","archive_url":"https://api.github.com/repos/smashingboxes/epa-prototype-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/smashingboxes/epa-prototype-api/downloads","issues_url":"https://api.github.com/repos/smashingboxes/epa-prototype-api/issues{/number}","pulls_url":"https://api.github.com/repos/smashingboxes/epa-prototype-api/pulls{/number}","milestones_url":"https://api.github.com/repos/smashingboxes/epa-prototype-api/milestones{/number}","notifications_url":"https://api.github.com/repos/smashingboxes/epa-prototype-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/smashingboxes/epa-prototype-api/labels{/name}","releases_url":"https://api.github.com/repos/smashingboxes/epa-prototype-api/releases{/id}","created_at":"2015-12-14T20:59:41Z","updated_at":"2015-12-15T21:34:15Z","pushed_at":"2015-12-17T17:38:18Z","git_url":"git://github.com/smashingboxes/epa-prototype-api.git","ssh_url":"git@github.com:smashingboxes/epa-prototype-api.git","clone_url":"https://github.com/smashingboxes/epa-prototype-api.git","svn_url":"https://github.com/smashingboxes/epa-prototype-api","homepage":null,"size":54,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"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/smashingboxes/epa-prototype-api/pulls/4"},"html":{"href":"https://github.com/smashingboxes/epa-prototype-api/pull/4"},"issue":{"href":"https://api.github.com/repos/smashingboxes/epa-prototype-api/issues/4"},"comments":{"href":"https://api.github.com/repos/smashingboxes/epa-prototype-api/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/smashingboxes/epa-prototype-api/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/smashingboxes/epa-prototype-api/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/smashingboxes/epa-prototype-api/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/smashingboxes/epa-prototype-api/statuses/ceb6d5dd7c553750390b9a4412bb99a7597eb378"}}}}