{"action":"created","comment":{"url":"https://api.github.com/repos/sammcgrail/mydga/pulls/comments/34856011","id":34856011,"diff_hunk":"@@ -0,0 +1,60 @@\n+class SamplesController < ApplicationController\n+  def index\n+    @samples = Sample.all\n+  end\n+\n+  def show\n+    @sample = Sample.find(params[:id])\n+    @id = params[:id]\n+    @transformer_id = @sample.transformer_id\n+    @transformer = @sample.transformer\n+  end\n+\n+  def new\n+    @transformer = Transformer.find(params[:transformer_id])\n+    @sample = Sample.new\n+  end\n+\n+  def create\n+    @sample = Sample.new(sample_params)\n+    @sample.transformer = Transformer.find(params[:transformer_id])\n+    @sample.user = current_user\n+\n+    if @sample.save\n+      redirect_to transformer_path(params[:transformer_id]), notice: \"Sample was successfully created.\"\n+    else\n+      render :new, notice: \"Your sample could not be saved.\"\n+    end\n+  end\n+\n+  def edit\n+    @sample = Sample.find(params[:id])\n+    @transformer = @sample.transformer\n+  end\n+\n+  def update\n+    @sample = Sample.find(params[:id])\n+    @transformer = @sample.transformer\n+    if @sample.update(sample_params)\n+      flash[:success] = 'Sample edited successfully.'\n+    redirect_to sample_path(@sample)\n+    else\n+      flash[:warning] = 'Sample was not edited.'\n+    render :edit\n+    end\n+  end\n+\n+  def destroy\n+    @sample = Sample.find(params[:id])\n+    @sample.destroy\n+    redirect_to samples_path\n+  end\n+\n+  private\n+\n+  def sample_params\n+    params.require(:sample).permit(\n+      :date, :hydrogen, :oxygen, :nitrogen, :methane, :carbon_monoxide, :ethane, :carbon_dioxide, :ethylene, :acetylene, :user_id","path":"app/controllers/samples_controller.rb","position":57,"original_position":57,"commit_id":"3642eb89b58a7979316da11c332104113a0d5102","original_commit_id":"3642eb89b58a7979316da11c332104113a0d5102","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":"Line is too long. [129/80]","created_at":"2015-07-17T01:35:29Z","updated_at":"2015-07-17T01:35:29Z","html_url":"https://github.com/sammcgrail/mydga/pull/2#discussion_r34856011","pull_request_url":"https://api.github.com/repos/sammcgrail/mydga/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/sammcgrail/mydga/pulls/comments/34856011"},"html":{"href":"https://github.com/sammcgrail/mydga/pull/2#discussion_r34856011"},"pull_request":{"href":"https://api.github.com/repos/sammcgrail/mydga/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/sammcgrail/mydga/pulls/2","id":39943568,"html_url":"https://github.com/sammcgrail/mydga/pull/2","diff_url":"https://github.com/sammcgrail/mydga/pull/2.diff","patch_url":"https://github.com/sammcgrail/mydga/pull/2.patch","issue_url":"https://api.github.com/repos/sammcgrail/mydga/issues/2","number":2,"state":"open","locked":false,"title":"Controllers models views","user":{"login":"sammcgrail","id":6109568,"avatar_url":"https://avatars.githubusercontent.com/u/6109568?v=3","gravatar_id":"","url":"https://api.github.com/users/sammcgrail","html_url":"https://github.com/sammcgrail","followers_url":"https://api.github.com/users/sammcgrail/followers","following_url":"https://api.github.com/users/sammcgrail/following{/other_user}","gists_url":"https://api.github.com/users/sammcgrail/gists{/gist_id}","starred_url":"https://api.github.com/users/sammcgrail/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sammcgrail/subscriptions","organizations_url":"https://api.github.com/users/sammcgrail/orgs","repos_url":"https://api.github.com/users/sammcgrail/repos","events_url":"https://api.github.com/users/sammcgrail/events{/privacy}","received_events_url":"https://api.github.com/users/sammcgrail/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-07-14T17:58:27Z","updated_at":"2015-07-17T01:35:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a3981fa59fc49483692ea415be82a848fef83858","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sammcgrail/mydga/pulls/2/commits","review_comments_url":"https://api.github.com/repos/sammcgrail/mydga/pulls/2/comments","review_comment_url":"https://api.github.com/repos/sammcgrail/mydga/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sammcgrail/mydga/issues/2/comments","statuses_url":"https://api.github.com/repos/sammcgrail/mydga/statuses/3642eb89b58a7979316da11c332104113a0d5102","head":{"label":"sammcgrail:controllers_models_views","ref":"controllers_models_views","sha":"3642eb89b58a7979316da11c332104113a0d5102","user":{"login":"sammcgrail","id":6109568,"avatar_url":"https://avatars.githubusercontent.com/u/6109568?v=3","gravatar_id":"","url":"https://api.github.com/users/sammcgrail","html_url":"https://github.com/sammcgrail","followers_url":"https://api.github.com/users/sammcgrail/followers","following_url":"https://api.github.com/users/sammcgrail/following{/other_user}","gists_url":"https://api.github.com/users/sammcgrail/gists{/gist_id}","starred_url":"https://api.github.com/users/sammcgrail/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sammcgrail/subscriptions","organizations_url":"https://api.github.com/users/sammcgrail/orgs","repos_url":"https://api.github.com/users/sammcgrail/repos","events_url":"https://api.github.com/users/sammcgrail/events{/privacy}","received_events_url":"https://api.github.com/users/sammcgrail/received_events","type":"User","site_admin":false},"repo":{"id":39031174,"name":"mydga","full_name":"sammcgrail/mydga","owner":{"login":"sammcgrail","id":6109568,"avatar_url":"https://avatars.githubusercontent.com/u/6109568?v=3","gravatar_id":"","url":"https://api.github.com/users/sammcgrail","html_url":"https://github.com/sammcgrail","followers_url":"https://api.github.com/users/sammcgrail/followers","following_url":"https://api.github.com/users/sammcgrail/following{/other_user}","gists_url":"https://api.github.com/users/sammcgrail/gists{/gist_id}","starred_url":"https://api.github.com/users/sammcgrail/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sammcgrail/subscriptions","organizations_url":"https://api.github.com/users/sammcgrail/orgs","repos_url":"https://api.github.com/users/sammcgrail/repos","events_url":"https://api.github.com/users/sammcgrail/events{/privacy}","received_events_url":"https://api.github.com/users/sammcgrail/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sammcgrail/mydga","description":null,"fork":false,"url":"https://api.github.com/repos/sammcgrail/mydga","forks_url":"https://api.github.com/repos/sammcgrail/mydga/forks","keys_url":"https://api.github.com/repos/sammcgrail/mydga/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sammcgrail/mydga/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sammcgrail/mydga/teams","hooks_url":"https://api.github.com/repos/sammcgrail/mydga/hooks","issue_events_url":"https://api.github.com/repos/sammcgrail/mydga/issues/events{/number}","events_url":"https://api.github.com/repos/sammcgrail/mydga/events","assignees_url":"https://api.github.com/repos/sammcgrail/mydga/assignees{/user}","branches_url":"https://api.github.com/repos/sammcgrail/mydga/branches{/branch}","tags_url":"https://api.github.com/repos/sammcgrail/mydga/tags","blobs_url":"https://api.github.com/repos/sammcgrail/mydga/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sammcgrail/mydga/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sammcgrail/mydga/git/refs{/sha}","trees_url":"https://api.github.com/repos/sammcgrail/mydga/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sammcgrail/mydga/statuses/{sha}","languages_url":"https://api.github.com/repos/sammcgrail/mydga/languages","stargazers_url":"https://api.github.com/repos/sammcgrail/mydga/stargazers","contributors_url":"https://api.github.com/repos/sammcgrail/mydga/contributors","subscribers_url":"https://api.github.com/repos/sammcgrail/mydga/subscribers","subscription_url":"https://api.github.com/repos/sammcgrail/mydga/subscription","commits_url":"https://api.github.com/repos/sammcgrail/mydga/commits{/sha}","git_commits_url":"https://api.github.com/repos/sammcgrail/mydga/git/commits{/sha}","comments_url":"https://api.github.com/repos/sammcgrail/mydga/comments{/number}","issue_comment_url":"https://api.github.com/repos/sammcgrail/mydga/issues/comments{/number}","contents_url":"https://api.github.com/repos/sammcgrail/mydga/contents/{+path}","compare_url":"https://api.github.com/repos/sammcgrail/mydga/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sammcgrail/mydga/merges","archive_url":"https://api.github.com/repos/sammcgrail/mydga/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sammcgrail/mydga/downloads","issues_url":"https://api.github.com/repos/sammcgrail/mydga/issues{/number}","pulls_url":"https://api.github.com/repos/sammcgrail/mydga/pulls{/number}","milestones_url":"https://api.github.com/repos/sammcgrail/mydga/milestones{/number}","notifications_url":"https://api.github.com/repos/sammcgrail/mydga/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sammcgrail/mydga/labels{/name}","releases_url":"https://api.github.com/repos/sammcgrail/mydga/releases{/id}","created_at":"2015-07-13T18:55:23Z","updated_at":"2015-07-14T15:24:48Z","pushed_at":"2015-07-17T01:35:14Z","git_url":"git://github.com/sammcgrail/mydga.git","ssh_url":"git@github.com:sammcgrail/mydga.git","clone_url":"https://github.com/sammcgrail/mydga.git","svn_url":"https://github.com/sammcgrail/mydga","homepage":null,"size":0,"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":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"sammcgrail:master","ref":"master","sha":"6f4ffc99699c25721d707193c88af25b5d4ae63c","user":{"login":"sammcgrail","id":6109568,"avatar_url":"https://avatars.githubusercontent.com/u/6109568?v=3","gravatar_id":"","url":"https://api.github.com/users/sammcgrail","html_url":"https://github.com/sammcgrail","followers_url":"https://api.github.com/users/sammcgrail/followers","following_url":"https://api.github.com/users/sammcgrail/following{/other_user}","gists_url":"https://api.github.com/users/sammcgrail/gists{/gist_id}","starred_url":"https://api.github.com/users/sammcgrail/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sammcgrail/subscriptions","organizations_url":"https://api.github.com/users/sammcgrail/orgs","repos_url":"https://api.github.com/users/sammcgrail/repos","events_url":"https://api.github.com/users/sammcgrail/events{/privacy}","received_events_url":"https://api.github.com/users/sammcgrail/received_events","type":"User","site_admin":false},"repo":{"id":39031174,"name":"mydga","full_name":"sammcgrail/mydga","owner":{"login":"sammcgrail","id":6109568,"avatar_url":"https://avatars.githubusercontent.com/u/6109568?v=3","gravatar_id":"","url":"https://api.github.com/users/sammcgrail","html_url":"https://github.com/sammcgrail","followers_url":"https://api.github.com/users/sammcgrail/followers","following_url":"https://api.github.com/users/sammcgrail/following{/other_user}","gists_url":"https://api.github.com/users/sammcgrail/gists{/gist_id}","starred_url":"https://api.github.com/users/sammcgrail/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sammcgrail/subscriptions","organizations_url":"https://api.github.com/users/sammcgrail/orgs","repos_url":"https://api.github.com/users/sammcgrail/repos","events_url":"https://api.github.com/users/sammcgrail/events{/privacy}","received_events_url":"https://api.github.com/users/sammcgrail/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sammcgrail/mydga","description":null,"fork":false,"url":"https://api.github.com/repos/sammcgrail/mydga","forks_url":"https://api.github.com/repos/sammcgrail/mydga/forks","keys_url":"https://api.github.com/repos/sammcgrail/mydga/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sammcgrail/mydga/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sammcgrail/mydga/teams","hooks_url":"https://api.github.com/repos/sammcgrail/mydga/hooks","issue_events_url":"https://api.github.com/repos/sammcgrail/mydga/issues/events{/number}","events_url":"https://api.github.com/repos/sammcgrail/mydga/events","assignees_url":"https://api.github.com/repos/sammcgrail/mydga/assignees{/user}","branches_url":"https://api.github.com/repos/sammcgrail/mydga/branches{/branch}","tags_url":"https://api.github.com/repos/sammcgrail/mydga/tags","blobs_url":"https://api.github.com/repos/sammcgrail/mydga/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sammcgrail/mydga/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sammcgrail/mydga/git/refs{/sha}","trees_url":"https://api.github.com/repos/sammcgrail/mydga/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sammcgrail/mydga/statuses/{sha}","languages_url":"https://api.github.com/repos/sammcgrail/mydga/languages","stargazers_url":"https://api.github.com/repos/sammcgrail/mydga/stargazers","contributors_url":"https://api.github.com/repos/sammcgrail/mydga/contributors","subscribers_url":"https://api.github.com/repos/sammcgrail/mydga/subscribers","subscription_url":"https://api.github.com/repos/sammcgrail/mydga/subscription","commits_url":"https://api.github.com/repos/sammcgrail/mydga/commits{/sha}","git_commits_url":"https://api.github.com/repos/sammcgrail/mydga/git/commits{/sha}","comments_url":"https://api.github.com/repos/sammcgrail/mydga/comments{/number}","issue_comment_url":"https://api.github.com/repos/sammcgrail/mydga/issues/comments{/number}","contents_url":"https://api.github.com/repos/sammcgrail/mydga/contents/{+path}","compare_url":"https://api.github.com/repos/sammcgrail/mydga/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sammcgrail/mydga/merges","archive_url":"https://api.github.com/repos/sammcgrail/mydga/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sammcgrail/mydga/downloads","issues_url":"https://api.github.com/repos/sammcgrail/mydga/issues{/number}","pulls_url":"https://api.github.com/repos/sammcgrail/mydga/pulls{/number}","milestones_url":"https://api.github.com/repos/sammcgrail/mydga/milestones{/number}","notifications_url":"https://api.github.com/repos/sammcgrail/mydga/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sammcgrail/mydga/labels{/name}","releases_url":"https://api.github.com/repos/sammcgrail/mydga/releases{/id}","created_at":"2015-07-13T18:55:23Z","updated_at":"2015-07-14T15:24:48Z","pushed_at":"2015-07-17T01:35:14Z","git_url":"git://github.com/sammcgrail/mydga.git","ssh_url":"git@github.com:sammcgrail/mydga.git","clone_url":"https://github.com/sammcgrail/mydga.git","svn_url":"https://github.com/sammcgrail/mydga","homepage":null,"size":0,"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":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sammcgrail/mydga/pulls/2"},"html":{"href":"https://github.com/sammcgrail/mydga/pull/2"},"issue":{"href":"https://api.github.com/repos/sammcgrail/mydga/issues/2"},"comments":{"href":"https://api.github.com/repos/sammcgrail/mydga/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/sammcgrail/mydga/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/sammcgrail/mydga/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sammcgrail/mydga/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/sammcgrail/mydga/statuses/3642eb89b58a7979316da11c332104113a0d5102"}}}}