{"action":"created","comment":{"url":"https://api.github.com/repos/Evans-Munatsa/Restaurant/pulls/comments/48930525","id":48930525,"diff_hunk":"@@ -3,16 +3,17 @@ class ItemsController < ApplicationController\n   before_action :authenticate_admin!, only:[ :new, :edit, :update, :create, :destroy ]\n \n   def index\n-    if params[:menu].blank?\n+    if params[:id].blank?","path":"app/controllers/items_controller.rb","position":5,"original_position":5,"commit_id":"bec07500496d1d897b1dcd5eb013d48f27e7ca21","original_commit_id":"bec07500496d1d897b1dcd5eb013d48f27e7ca21","user":{"login":"Evans-Munatsa","id":13256592,"avatar_url":"https://avatars.githubusercontent.com/u/13256592?v=3","gravatar_id":"","url":"https://api.github.com/users/Evans-Munatsa","html_url":"https://github.com/Evans-Munatsa","followers_url":"https://api.github.com/users/Evans-Munatsa/followers","following_url":"https://api.github.com/users/Evans-Munatsa/following{/other_user}","gists_url":"https://api.github.com/users/Evans-Munatsa/gists{/gist_id}","starred_url":"https://api.github.com/users/Evans-Munatsa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Evans-Munatsa/subscriptions","organizations_url":"https://api.github.com/users/Evans-Munatsa/orgs","repos_url":"https://api.github.com/users/Evans-Munatsa/repos","events_url":"https://api.github.com/users/Evans-Munatsa/events{/privacy}","received_events_url":"https://api.github.com/users/Evans-Munatsa/received_events","type":"User","site_admin":false},"body":"the method (if params[:id].blank?) is to help the menu to find the items_id, however if l remove the method the whole app is going to crash, but l think l'm gonna stick with the method until l find a way to re-factor the code\r\n","created_at":"2016-01-06T06:12:09Z","updated_at":"2016-01-06T06:12:09Z","html_url":"https://github.com/Evans-Munatsa/Restaurant/pull/8#discussion_r48930525","pull_request_url":"https://api.github.com/repos/Evans-Munatsa/Restaurant/pulls/8","_links":{"self":{"href":"https://api.github.com/repos/Evans-Munatsa/Restaurant/pulls/comments/48930525"},"html":{"href":"https://github.com/Evans-Munatsa/Restaurant/pull/8#discussion_r48930525"},"pull_request":{"href":"https://api.github.com/repos/Evans-Munatsa/Restaurant/pulls/8"}}},"pull_request":{"url":"https://api.github.com/repos/Evans-Munatsa/Restaurant/pulls/8","id":54962160,"html_url":"https://github.com/Evans-Munatsa/Restaurant/pull/8","diff_url":"https://github.com/Evans-Munatsa/Restaurant/pull/8.diff","patch_url":"https://github.com/Evans-Munatsa/Restaurant/pull/8.patch","issue_url":"https://api.github.com/repos/Evans-Munatsa/Restaurant/issues/8","number":8,"state":"open","locked":false,"title":"Another try","user":{"login":"Evans-Munatsa","id":13256592,"avatar_url":"https://avatars.githubusercontent.com/u/13256592?v=3","gravatar_id":"","url":"https://api.github.com/users/Evans-Munatsa","html_url":"https://github.com/Evans-Munatsa","followers_url":"https://api.github.com/users/Evans-Munatsa/followers","following_url":"https://api.github.com/users/Evans-Munatsa/following{/other_user}","gists_url":"https://api.github.com/users/Evans-Munatsa/gists{/gist_id}","starred_url":"https://api.github.com/users/Evans-Munatsa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Evans-Munatsa/subscriptions","organizations_url":"https://api.github.com/users/Evans-Munatsa/orgs","repos_url":"https://api.github.com/users/Evans-Munatsa/repos","events_url":"https://api.github.com/users/Evans-Munatsa/events{/privacy}","received_events_url":"https://api.github.com/users/Evans-Munatsa/received_events","type":"User","site_admin":false},"body":"- added a join table migration called menu_items\r\n- added asociations\r\n- edited the items controller with more simpler code\r\n- edited the items form ","created_at":"2016-01-04T10:41:39Z","updated_at":"2016-01-06T06:12:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e99b2bad8dfe29a5bf02bea23226e7bb815b722d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Evans-Munatsa/Restaurant/pulls/8/commits","review_comments_url":"https://api.github.com/repos/Evans-Munatsa/Restaurant/pulls/8/comments","review_comment_url":"https://api.github.com/repos/Evans-Munatsa/Restaurant/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Evans-Munatsa/Restaurant/issues/8/comments","statuses_url":"https://api.github.com/repos/Evans-Munatsa/Restaurant/statuses/bec07500496d1d897b1dcd5eb013d48f27e7ca21","head":{"label":"Evans-Munatsa:another-try","ref":"another-try","sha":"bec07500496d1d897b1dcd5eb013d48f27e7ca21","user":{"login":"Evans-Munatsa","id":13256592,"avatar_url":"https://avatars.githubusercontent.com/u/13256592?v=3","gravatar_id":"","url":"https://api.github.com/users/Evans-Munatsa","html_url":"https://github.com/Evans-Munatsa","followers_url":"https://api.github.com/users/Evans-Munatsa/followers","following_url":"https://api.github.com/users/Evans-Munatsa/following{/other_user}","gists_url":"https://api.github.com/users/Evans-Munatsa/gists{/gist_id}","starred_url":"https://api.github.com/users/Evans-Munatsa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Evans-Munatsa/subscriptions","organizations_url":"https://api.github.com/users/Evans-Munatsa/orgs","repos_url":"https://api.github.com/users/Evans-Munatsa/repos","events_url":"https://api.github.com/users/Evans-Munatsa/events{/privacy}","received_events_url":"https://api.github.com/users/Evans-Munatsa/received_events","type":"User","site_admin":false},"repo":{"id":48024952,"name":"Restaurant","full_name":"Evans-Munatsa/Restaurant","owner":{"login":"Evans-Munatsa","id":13256592,"avatar_url":"https://avatars.githubusercontent.com/u/13256592?v=3","gravatar_id":"","url":"https://api.github.com/users/Evans-Munatsa","html_url":"https://github.com/Evans-Munatsa","followers_url":"https://api.github.com/users/Evans-Munatsa/followers","following_url":"https://api.github.com/users/Evans-Munatsa/following{/other_user}","gists_url":"https://api.github.com/users/Evans-Munatsa/gists{/gist_id}","starred_url":"https://api.github.com/users/Evans-Munatsa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Evans-Munatsa/subscriptions","organizations_url":"https://api.github.com/users/Evans-Munatsa/orgs","repos_url":"https://api.github.com/users/Evans-Munatsa/repos","events_url":"https://api.github.com/users/Evans-Munatsa/events{/privacy}","received_events_url":"https://api.github.com/users/Evans-Munatsa/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Evans-Munatsa/Restaurant","description":"","fork":false,"url":"https://api.github.com/repos/Evans-Munatsa/Restaurant","forks_url":"https://api.github.com/repos/Evans-Munatsa/Restaurant/forks","keys_url":"https://api.github.com/repos/Evans-Munatsa/Restaurant/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Evans-Munatsa/Restaurant/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Evans-Munatsa/Restaurant/teams","hooks_url":"https://api.github.com/repos/Evans-Munatsa/Restaurant/hooks","issue_events_url":"https://api.github.com/repos/Evans-Munatsa/Restaurant/issues/events{/number}","events_url":"https://api.github.com/repos/Evans-Munatsa/Restaurant/events","assignees_url":"https://api.github.com/repos/Evans-Munatsa/Restaurant/assignees{/user}","branches_url":"https://api.github.com/repos/Evans-Munatsa/Restaurant/branches{/branch}","tags_url":"https://api.github.com/repos/Evans-Munatsa/Restaurant/tags","blobs_url":"https://api.github.com/repos/Evans-Munatsa/Restaurant/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Evans-Munatsa/Restaurant/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Evans-Munatsa/Restaurant/git/refs{/sha}","trees_url":"https://api.github.com/repos/Evans-Munatsa/Restaurant/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Evans-Munatsa/Restaurant/statuses/{sha}","languages_url":"https://api.github.com/repos/Evans-Munatsa/Restaurant/languages","stargazers_url":"https://api.github.com/repos/Evans-Munatsa/Restaurant/stargazers","contributors_url":"https://api.github.com/repos/Evans-Munatsa/Restaurant/contributors","subscribers_url":"https://api.github.com/repos/Evans-Munatsa/Restaurant/subscribers","subscription_url":"https://api.github.com/repos/Evans-Munatsa/Restaurant/subscription","commits_url":"https://api.github.com/repos/Evans-Munatsa/Restaurant/commits{/sha}","git_commits_url":"https://api.github.com/repos/Evans-Munatsa/Restaurant/git/commits{/sha}","comments_url":"https://api.github.com/repos/Evans-Munatsa/Restaurant/comments{/number}","issue_comment_url":"https://api.github.com/repos/Evans-Munatsa/Restaurant/issues/comments{/number}","contents_url":"https://api.github.com/repos/Evans-Munatsa/Restaurant/contents/{+path}","compare_url":"https://api.github.com/repos/Evans-Munatsa/Restaurant/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Evans-Munatsa/Restaurant/merges","archive_url":"https://api.github.com/repos/Evans-Munatsa/Restaurant/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Evans-Munatsa/Restaurant/downloads","issues_url":"https://api.github.com/repos/Evans-Munatsa/Restaurant/issues{/number}","pulls_url":"https://api.github.com/repos/Evans-Munatsa/Restaurant/pulls{/number}","milestones_url":"https://api.github.com/repos/Evans-Munatsa/Restaurant/milestones{/number}","notifications_url":"https://api.github.com/repos/Evans-Munatsa/Restaurant/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Evans-Munatsa/Restaurant/labels{/name}","releases_url":"https://api.github.com/repos/Evans-Munatsa/Restaurant/releases{/id}","created_at":"2015-12-15T06:47:51Z","updated_at":"2015-12-15T06:48:14Z","pushed_at":"2016-01-05T09:21:56Z","git_url":"git://github.com/Evans-Munatsa/Restaurant.git","ssh_url":"git@github.com:Evans-Munatsa/Restaurant.git","clone_url":"https://github.com/Evans-Munatsa/Restaurant.git","svn_url":"https://github.com/Evans-Munatsa/Restaurant","homepage":null,"size":153,"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":"Evans-Munatsa:master","ref":"master","sha":"a05365556eebabc720e3f03aa1a5bc78965f378a","user":{"login":"Evans-Munatsa","id":13256592,"avatar_url":"https://avatars.githubusercontent.com/u/13256592?v=3","gravatar_id":"","url":"https://api.github.com/users/Evans-Munatsa","html_url":"https://github.com/Evans-Munatsa","followers_url":"https://api.github.com/users/Evans-Munatsa/followers","following_url":"https://api.github.com/users/Evans-Munatsa/following{/other_user}","gists_url":"https://api.github.com/users/Evans-Munatsa/gists{/gist_id}","starred_url":"https://api.github.com/users/Evans-Munatsa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Evans-Munatsa/subscriptions","organizations_url":"https://api.github.com/users/Evans-Munatsa/orgs","repos_url":"https://api.github.com/users/Evans-Munatsa/repos","events_url":"https://api.github.com/users/Evans-Munatsa/events{/privacy}","received_events_url":"https://api.github.com/users/Evans-Munatsa/received_events","type":"User","site_admin":false},"repo":{"id":48024952,"name":"Restaurant","full_name":"Evans-Munatsa/Restaurant","owner":{"login":"Evans-Munatsa","id":13256592,"avatar_url":"https://avatars.githubusercontent.com/u/13256592?v=3","gravatar_id":"","url":"https://api.github.com/users/Evans-Munatsa","html_url":"https://github.com/Evans-Munatsa","followers_url":"https://api.github.com/users/Evans-Munatsa/followers","following_url":"https://api.github.com/users/Evans-Munatsa/following{/other_user}","gists_url":"https://api.github.com/users/Evans-Munatsa/gists{/gist_id}","starred_url":"https://api.github.com/users/Evans-Munatsa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Evans-Munatsa/subscriptions","organizations_url":"https://api.github.com/users/Evans-Munatsa/orgs","repos_url":"https://api.github.com/users/Evans-Munatsa/repos","events_url":"https://api.github.com/users/Evans-Munatsa/events{/privacy}","received_events_url":"https://api.github.com/users/Evans-Munatsa/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Evans-Munatsa/Restaurant","description":"","fork":false,"url":"https://api.github.com/repos/Evans-Munatsa/Restaurant","forks_url":"https://api.github.com/repos/Evans-Munatsa/Restaurant/forks","keys_url":"https://api.github.com/repos/Evans-Munatsa/Restaurant/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Evans-Munatsa/Restaurant/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Evans-Munatsa/Restaurant/teams","hooks_url":"https://api.github.com/repos/Evans-Munatsa/Restaurant/hooks","issue_events_url":"https://api.github.com/repos/Evans-Munatsa/Restaurant/issues/events{/number}","events_url":"https://api.github.com/repos/Evans-Munatsa/Restaurant/events","assignees_url":"https://api.github.com/repos/Evans-Munatsa/Restaurant/assignees{/user}","branches_url":"https://api.github.com/repos/Evans-Munatsa/Restaurant/branches{/branch}","tags_url":"https://api.github.com/repos/Evans-Munatsa/Restaurant/tags","blobs_url":"https://api.github.com/repos/Evans-Munatsa/Restaurant/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Evans-Munatsa/Restaurant/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Evans-Munatsa/Restaurant/git/refs{/sha}","trees_url":"https://api.github.com/repos/Evans-Munatsa/Restaurant/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Evans-Munatsa/Restaurant/statuses/{sha}","languages_url":"https://api.github.com/repos/Evans-Munatsa/Restaurant/languages","stargazers_url":"https://api.github.com/repos/Evans-Munatsa/Restaurant/stargazers","contributors_url":"https://api.github.com/repos/Evans-Munatsa/Restaurant/contributors","subscribers_url":"https://api.github.com/repos/Evans-Munatsa/Restaurant/subscribers","subscription_url":"https://api.github.com/repos/Evans-Munatsa/Restaurant/subscription","commits_url":"https://api.github.com/repos/Evans-Munatsa/Restaurant/commits{/sha}","git_commits_url":"https://api.github.com/repos/Evans-Munatsa/Restaurant/git/commits{/sha}","comments_url":"https://api.github.com/repos/Evans-Munatsa/Restaurant/comments{/number}","issue_comment_url":"https://api.github.com/repos/Evans-Munatsa/Restaurant/issues/comments{/number}","contents_url":"https://api.github.com/repos/Evans-Munatsa/Restaurant/contents/{+path}","compare_url":"https://api.github.com/repos/Evans-Munatsa/Restaurant/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Evans-Munatsa/Restaurant/merges","archive_url":"https://api.github.com/repos/Evans-Munatsa/Restaurant/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Evans-Munatsa/Restaurant/downloads","issues_url":"https://api.github.com/repos/Evans-Munatsa/Restaurant/issues{/number}","pulls_url":"https://api.github.com/repos/Evans-Munatsa/Restaurant/pulls{/number}","milestones_url":"https://api.github.com/repos/Evans-Munatsa/Restaurant/milestones{/number}","notifications_url":"https://api.github.com/repos/Evans-Munatsa/Restaurant/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Evans-Munatsa/Restaurant/labels{/name}","releases_url":"https://api.github.com/repos/Evans-Munatsa/Restaurant/releases{/id}","created_at":"2015-12-15T06:47:51Z","updated_at":"2015-12-15T06:48:14Z","pushed_at":"2016-01-05T09:21:56Z","git_url":"git://github.com/Evans-Munatsa/Restaurant.git","ssh_url":"git@github.com:Evans-Munatsa/Restaurant.git","clone_url":"https://github.com/Evans-Munatsa/Restaurant.git","svn_url":"https://github.com/Evans-Munatsa/Restaurant","homepage":null,"size":153,"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/Evans-Munatsa/Restaurant/pulls/8"},"html":{"href":"https://github.com/Evans-Munatsa/Restaurant/pull/8"},"issue":{"href":"https://api.github.com/repos/Evans-Munatsa/Restaurant/issues/8"},"comments":{"href":"https://api.github.com/repos/Evans-Munatsa/Restaurant/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/Evans-Munatsa/Restaurant/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/Evans-Munatsa/Restaurant/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Evans-Munatsa/Restaurant/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/Evans-Munatsa/Restaurant/statuses/bec07500496d1d897b1dcd5eb013d48f27e7ca21"}}}}