{"action":"created","comment":{"url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/pulls/comments/69774849","id":69774849,"diff_hunk":"@@ -0,0 +1,41 @@\n+class Api::TacosController < ApplicationController\n+\n+  before_action do\n+    request.format = :json\n+  end\n+\n+  protect_from_forgery with: :null_session\n+\n+  def index\n+    q = Taco.all\n+    q = q.where(\"name ILIKE ?\", \"%#{params[:query]}%\") if params[:query].present?\n+    q = q.where(\"price >= ?\", params[:price_min].to_f) if params[:price_min].present?\n+    q = q.where(\"price <= ?\", params[:price_max].to_f) if params[:price_max].present?\n+    @tacos = q\n+    # render json: @tacos\n+  end\n+\n+  def show\n+    @taco = Taco.find_by id: params[:id]\n+    # render json: @taco\n+  end\n+\n+  def create\n+    @taco = Taco.new\n+    @taco.name = params[:taco][:name]\n+    @taco.price = params[:taco][:price]\n+    @taco.photo_url = params[:taco][:photo_url]\n+    @taco.user = User.first # for now, until we can authenticate\n+    if @taco.save\n+      render :show, status: 201 #created\n+    else\n+      render json: {errors: @taco.errors}, status: 422 #error","path":"app/controllers/api/tacos_controller.rb","position":32,"original_position":32,"commit_id":"351fbfc950e9d8f318ef1f44fa3c2c3e27b6e63d","original_commit_id":"351fbfc950e9d8f318ef1f44fa3c2c3e27b6e63d","user":{"login":"houndci-bot","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"Missing space after #.<br>Space inside { missing.<br>Space inside } missing.","created_at":"2016-07-06T17:30:45Z","updated_at":"2016-07-06T17:30:45Z","html_url":"https://github.com/tiy-hou-q2-2016-rails/taco-stand/pull/13#discussion_r69774849","pull_request_url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/pulls/13","_links":{"self":{"href":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/pulls/comments/69774849"},"html":{"href":"https://github.com/tiy-hou-q2-2016-rails/taco-stand/pull/13#discussion_r69774849"},"pull_request":{"href":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/pulls/13"}}},"pull_request":{"url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/pulls/13","id":76470393,"html_url":"https://github.com/tiy-hou-q2-2016-rails/taco-stand/pull/13","diff_url":"https://github.com/tiy-hou-q2-2016-rails/taco-stand/pull/13.diff","patch_url":"https://github.com/tiy-hou-q2-2016-rails/taco-stand/pull/13.patch","issue_url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/issues/13","number":13,"state":"open","locked":false,"title":"API for tacos, non authenticated","user":{"login":"jwo","id":123075,"avatar_url":"https://avatars.githubusercontent.com/u/123075?v=3","gravatar_id":"","url":"https://api.github.com/users/jwo","html_url":"https://github.com/jwo","followers_url":"https://api.github.com/users/jwo/followers","following_url":"https://api.github.com/users/jwo/following{/other_user}","gists_url":"https://api.github.com/users/jwo/gists{/gist_id}","starred_url":"https://api.github.com/users/jwo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwo/subscriptions","organizations_url":"https://api.github.com/users/jwo/orgs","repos_url":"https://api.github.com/users/jwo/repos","events_url":"https://api.github.com/users/jwo/events{/privacy}","received_events_url":"https://api.github.com/users/jwo/received_events","type":"User","site_admin":false},"body":null,"created_at":"2016-07-06T17:30:38Z","updated_at":"2016-07-06T17:30:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"361c2880f2b40cd28753c0627da92891166d3909","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/pulls/13/commits","review_comments_url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/pulls/13/comments","review_comment_url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/issues/13/comments","statuses_url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/statuses/351fbfc950e9d8f318ef1f44fa3c2c3e27b6e63d","head":{"label":"tiy-hou-q2-2016-rails:add-api","ref":"add-api","sha":"351fbfc950e9d8f318ef1f44fa3c2c3e27b6e63d","user":{"login":"tiy-hou-q2-2016-rails","id":19534531,"avatar_url":"https://avatars.githubusercontent.com/u/19534531?v=3","gravatar_id":"","url":"https://api.github.com/users/tiy-hou-q2-2016-rails","html_url":"https://github.com/tiy-hou-q2-2016-rails","followers_url":"https://api.github.com/users/tiy-hou-q2-2016-rails/followers","following_url":"https://api.github.com/users/tiy-hou-q2-2016-rails/following{/other_user}","gists_url":"https://api.github.com/users/tiy-hou-q2-2016-rails/gists{/gist_id}","starred_url":"https://api.github.com/users/tiy-hou-q2-2016-rails/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tiy-hou-q2-2016-rails/subscriptions","organizations_url":"https://api.github.com/users/tiy-hou-q2-2016-rails/orgs","repos_url":"https://api.github.com/users/tiy-hou-q2-2016-rails/repos","events_url":"https://api.github.com/users/tiy-hou-q2-2016-rails/events{/privacy}","received_events_url":"https://api.github.com/users/tiy-hou-q2-2016-rails/received_events","type":"Organization","site_admin":false},"repo":{"id":62150275,"name":"taco-stand","full_name":"tiy-hou-q2-2016-rails/taco-stand","owner":{"login":"tiy-hou-q2-2016-rails","id":19534531,"avatar_url":"https://avatars.githubusercontent.com/u/19534531?v=3","gravatar_id":"","url":"https://api.github.com/users/tiy-hou-q2-2016-rails","html_url":"https://github.com/tiy-hou-q2-2016-rails","followers_url":"https://api.github.com/users/tiy-hou-q2-2016-rails/followers","following_url":"https://api.github.com/users/tiy-hou-q2-2016-rails/following{/other_user}","gists_url":"https://api.github.com/users/tiy-hou-q2-2016-rails/gists{/gist_id}","starred_url":"https://api.github.com/users/tiy-hou-q2-2016-rails/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tiy-hou-q2-2016-rails/subscriptions","organizations_url":"https://api.github.com/users/tiy-hou-q2-2016-rails/orgs","repos_url":"https://api.github.com/users/tiy-hou-q2-2016-rails/repos","events_url":"https://api.github.com/users/tiy-hou-q2-2016-rails/events{/privacy}","received_events_url":"https://api.github.com/users/tiy-hou-q2-2016-rails/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tiy-hou-q2-2016-rails/taco-stand","description":null,"fork":false,"url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand","forks_url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/forks","keys_url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/teams","hooks_url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/hooks","issue_events_url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/issues/events{/number}","events_url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/events","assignees_url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/assignees{/user}","branches_url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/branches{/branch}","tags_url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/tags","blobs_url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/git/refs{/sha}","trees_url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/statuses/{sha}","languages_url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/languages","stargazers_url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/stargazers","contributors_url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/contributors","subscribers_url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/subscribers","subscription_url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/subscription","commits_url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/commits{/sha}","git_commits_url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/git/commits{/sha}","comments_url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/comments{/number}","issue_comment_url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/issues/comments{/number}","contents_url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/contents/{+path}","compare_url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/merges","archive_url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/downloads","issues_url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/issues{/number}","pulls_url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/pulls{/number}","milestones_url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/milestones{/number}","notifications_url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/labels{/name}","releases_url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/releases{/id}","deployments_url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/deployments","created_at":"2016-06-28T14:57:28Z","updated_at":"2016-06-29T19:04:52Z","pushed_at":"2016-07-06T17:30:38Z","git_url":"git://github.com/tiy-hou-q2-2016-rails/taco-stand.git","ssh_url":"git@github.com:tiy-hou-q2-2016-rails/taco-stand.git","clone_url":"https://github.com/tiy-hou-q2-2016-rails/taco-stand.git","svn_url":"https://github.com/tiy-hou-q2-2016-rails/taco-stand","homepage":null,"size":71,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":1,"forks":2,"open_issues":1,"watchers":1,"default_branch":"master"}},"base":{"label":"tiy-hou-q2-2016-rails:master","ref":"master","sha":"4964902c0941bf310bb463f5477ab72461ca318f","user":{"login":"tiy-hou-q2-2016-rails","id":19534531,"avatar_url":"https://avatars.githubusercontent.com/u/19534531?v=3","gravatar_id":"","url":"https://api.github.com/users/tiy-hou-q2-2016-rails","html_url":"https://github.com/tiy-hou-q2-2016-rails","followers_url":"https://api.github.com/users/tiy-hou-q2-2016-rails/followers","following_url":"https://api.github.com/users/tiy-hou-q2-2016-rails/following{/other_user}","gists_url":"https://api.github.com/users/tiy-hou-q2-2016-rails/gists{/gist_id}","starred_url":"https://api.github.com/users/tiy-hou-q2-2016-rails/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tiy-hou-q2-2016-rails/subscriptions","organizations_url":"https://api.github.com/users/tiy-hou-q2-2016-rails/orgs","repos_url":"https://api.github.com/users/tiy-hou-q2-2016-rails/repos","events_url":"https://api.github.com/users/tiy-hou-q2-2016-rails/events{/privacy}","received_events_url":"https://api.github.com/users/tiy-hou-q2-2016-rails/received_events","type":"Organization","site_admin":false},"repo":{"id":62150275,"name":"taco-stand","full_name":"tiy-hou-q2-2016-rails/taco-stand","owner":{"login":"tiy-hou-q2-2016-rails","id":19534531,"avatar_url":"https://avatars.githubusercontent.com/u/19534531?v=3","gravatar_id":"","url":"https://api.github.com/users/tiy-hou-q2-2016-rails","html_url":"https://github.com/tiy-hou-q2-2016-rails","followers_url":"https://api.github.com/users/tiy-hou-q2-2016-rails/followers","following_url":"https://api.github.com/users/tiy-hou-q2-2016-rails/following{/other_user}","gists_url":"https://api.github.com/users/tiy-hou-q2-2016-rails/gists{/gist_id}","starred_url":"https://api.github.com/users/tiy-hou-q2-2016-rails/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tiy-hou-q2-2016-rails/subscriptions","organizations_url":"https://api.github.com/users/tiy-hou-q2-2016-rails/orgs","repos_url":"https://api.github.com/users/tiy-hou-q2-2016-rails/repos","events_url":"https://api.github.com/users/tiy-hou-q2-2016-rails/events{/privacy}","received_events_url":"https://api.github.com/users/tiy-hou-q2-2016-rails/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tiy-hou-q2-2016-rails/taco-stand","description":null,"fork":false,"url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand","forks_url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/forks","keys_url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/teams","hooks_url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/hooks","issue_events_url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/issues/events{/number}","events_url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/events","assignees_url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/assignees{/user}","branches_url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/branches{/branch}","tags_url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/tags","blobs_url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/git/refs{/sha}","trees_url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/statuses/{sha}","languages_url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/languages","stargazers_url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/stargazers","contributors_url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/contributors","subscribers_url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/subscribers","subscription_url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/subscription","commits_url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/commits{/sha}","git_commits_url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/git/commits{/sha}","comments_url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/comments{/number}","issue_comment_url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/issues/comments{/number}","contents_url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/contents/{+path}","compare_url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/merges","archive_url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/downloads","issues_url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/issues{/number}","pulls_url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/pulls{/number}","milestones_url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/milestones{/number}","notifications_url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/labels{/name}","releases_url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/releases{/id}","deployments_url":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/deployments","created_at":"2016-06-28T14:57:28Z","updated_at":"2016-06-29T19:04:52Z","pushed_at":"2016-07-06T17:30:38Z","git_url":"git://github.com/tiy-hou-q2-2016-rails/taco-stand.git","ssh_url":"git@github.com:tiy-hou-q2-2016-rails/taco-stand.git","clone_url":"https://github.com/tiy-hou-q2-2016-rails/taco-stand.git","svn_url":"https://github.com/tiy-hou-q2-2016-rails/taco-stand","homepage":null,"size":71,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":1,"forks":2,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/pulls/13"},"html":{"href":"https://github.com/tiy-hou-q2-2016-rails/taco-stand/pull/13"},"issue":{"href":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/issues/13"},"comments":{"href":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/issues/13/comments"},"review_comments":{"href":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/pulls/13/comments"},"review_comment":{"href":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/pulls/13/commits"},"statuses":{"href":"https://api.github.com/repos/tiy-hou-q2-2016-rails/taco-stand/statuses/351fbfc950e9d8f318ef1f44fa3c2c3e27b6e63d"}}}}
{"actor":{"display_login":"houndci-bot"}}