{"action":"created","comment":{"url":"https://api.github.com/repos/framgia/fbt_4/pulls/comments/88626293","pull_request_review_id":9194340,"id":88626293,"diff_hunk":"@@ -0,0 +1,44 @@\n+class Admin::BookingsController < ApplicationController\n+  load_and_authorize_resource\n+  before_action :find_booking, only: [:show, :update]\n+\n+  def index\n+    @bookings = Booking.all\n+  end\n+\n+  def show\n+  end\n+\n+  def update\n+    if allow_status? && @book.update_attributes(booking_params)\n+      flash[:success] = t \"admin.bookings.change_success\"\n+      redirect_to [:admin, @book]\n+    end\n+  end\n+\n+  private\n+  def find_booking\n+    @book = Booking.find_by id: params[:id]\n+    unless @book\n+      flash[:danger] = t \"admin.bookings.not_found\"\n+      redirect_to root_path\n+    end\n+  end\n+\n+  def booking_params\n+    params.require(:booking).permit :status\n+  end\n+\n+  def allow_status?\n+    if status = booking_params[:status]\n+      params[:booking][:status] = status.to_i","path":"app/controllers/admin/bookings_controller.rb","position":34,"original_position":34,"commit_id":"38062355e0f94e69d6b9cab1e81e6235ce816373","original_commit_id":"38062355e0f94e69d6b9cab1e81e6235ce816373","user":{"login":"chienbigstar","id":12505398,"avatar_url":"https://avatars.githubusercontent.com/u/12505398?v=3","gravatar_id":"","url":"https://api.github.com/users/chienbigstar","html_url":"https://github.com/chienbigstar","followers_url":"https://api.github.com/users/chienbigstar/followers","following_url":"https://api.github.com/users/chienbigstar/following{/other_user}","gists_url":"https://api.github.com/users/chienbigstar/gists{/gist_id}","starred_url":"https://api.github.com/users/chienbigstar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chienbigstar/subscriptions","organizations_url":"https://api.github.com/users/chienbigstar/orgs","repos_url":"https://api.github.com/users/chienbigstar/repos","events_url":"https://api.github.com/users/chienbigstar/events{/privacy}","received_events_url":"https://api.github.com/users/chienbigstar/received_events","type":"User","site_admin":false},"body":"em đã fixed","created_at":"2016-11-18T09:46:48Z","updated_at":"2016-11-18T09:46:48Z","html_url":"https://github.com/framgia/fbt_4/pull/19#discussion_r88626293","pull_request_url":"https://api.github.com/repos/framgia/fbt_4/pulls/19","_links":{"self":{"href":"https://api.github.com/repos/framgia/fbt_4/pulls/comments/88626293"},"html":{"href":"https://github.com/framgia/fbt_4/pull/19#discussion_r88626293"},"pull_request":{"href":"https://api.github.com/repos/framgia/fbt_4/pulls/19"}}},"pull_request":{"url":"https://api.github.com/repos/framgia/fbt_4/pulls/19","id":94312061,"html_url":"https://github.com/framgia/fbt_4/pull/19","diff_url":"https://github.com/framgia/fbt_4/pull/19.diff","patch_url":"https://github.com/framgia/fbt_4/pull/19.patch","issue_url":"https://api.github.com/repos/framgia/fbt_4/issues/19","number":19,"state":"open","locked":false,"title":"admin_view_order","user":{"login":"chienbigstar","id":12505398,"avatar_url":"https://avatars.githubusercontent.com/u/12505398?v=3","gravatar_id":"","url":"https://api.github.com/users/chienbigstar","html_url":"https://github.com/chienbigstar","followers_url":"https://api.github.com/users/chienbigstar/followers","following_url":"https://api.github.com/users/chienbigstar/following{/other_user}","gists_url":"https://api.github.com/users/chienbigstar/gists{/gist_id}","starred_url":"https://api.github.com/users/chienbigstar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chienbigstar/subscriptions","organizations_url":"https://api.github.com/users/chienbigstar/orgs","repos_url":"https://api.github.com/users/chienbigstar/repos","events_url":"https://api.github.com/users/chienbigstar/events{/privacy}","received_events_url":"https://api.github.com/users/chienbigstar/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-11-18T06:58:09Z","updated_at":"2016-11-18T09:46:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dd12c5642ad57839d6e68f422ef8231f4da00e59","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/framgia/fbt_4/pulls/19/commits","review_comments_url":"https://api.github.com/repos/framgia/fbt_4/pulls/19/comments","review_comment_url":"https://api.github.com/repos/framgia/fbt_4/pulls/comments{/number}","comments_url":"https://api.github.com/repos/framgia/fbt_4/issues/19/comments","statuses_url":"https://api.github.com/repos/framgia/fbt_4/statuses/38062355e0f94e69d6b9cab1e81e6235ce816373","head":{"label":"chienbigstar:manage_order","ref":"manage_order","sha":"38062355e0f94e69d6b9cab1e81e6235ce816373","user":{"login":"chienbigstar","id":12505398,"avatar_url":"https://avatars.githubusercontent.com/u/12505398?v=3","gravatar_id":"","url":"https://api.github.com/users/chienbigstar","html_url":"https://github.com/chienbigstar","followers_url":"https://api.github.com/users/chienbigstar/followers","following_url":"https://api.github.com/users/chienbigstar/following{/other_user}","gists_url":"https://api.github.com/users/chienbigstar/gists{/gist_id}","starred_url":"https://api.github.com/users/chienbigstar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chienbigstar/subscriptions","organizations_url":"https://api.github.com/users/chienbigstar/orgs","repos_url":"https://api.github.com/users/chienbigstar/repos","events_url":"https://api.github.com/users/chienbigstar/events{/privacy}","received_events_url":"https://api.github.com/users/chienbigstar/received_events","type":"User","site_admin":false},"repo":{"id":73263583,"name":"fbt_4","full_name":"chienbigstar/fbt_4","owner":{"login":"chienbigstar","id":12505398,"avatar_url":"https://avatars.githubusercontent.com/u/12505398?v=3","gravatar_id":"","url":"https://api.github.com/users/chienbigstar","html_url":"https://github.com/chienbigstar","followers_url":"https://api.github.com/users/chienbigstar/followers","following_url":"https://api.github.com/users/chienbigstar/following{/other_user}","gists_url":"https://api.github.com/users/chienbigstar/gists{/gist_id}","starred_url":"https://api.github.com/users/chienbigstar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chienbigstar/subscriptions","organizations_url":"https://api.github.com/users/chienbigstar/orgs","repos_url":"https://api.github.com/users/chienbigstar/repos","events_url":"https://api.github.com/users/chienbigstar/events{/privacy}","received_events_url":"https://api.github.com/users/chienbigstar/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/chienbigstar/fbt_4","description":"Framgia Booking Tours (training)","fork":true,"url":"https://api.github.com/repos/chienbigstar/fbt_4","forks_url":"https://api.github.com/repos/chienbigstar/fbt_4/forks","keys_url":"https://api.github.com/repos/chienbigstar/fbt_4/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chienbigstar/fbt_4/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chienbigstar/fbt_4/teams","hooks_url":"https://api.github.com/repos/chienbigstar/fbt_4/hooks","issue_events_url":"https://api.github.com/repos/chienbigstar/fbt_4/issues/events{/number}","events_url":"https://api.github.com/repos/chienbigstar/fbt_4/events","assignees_url":"https://api.github.com/repos/chienbigstar/fbt_4/assignees{/user}","branches_url":"https://api.github.com/repos/chienbigstar/fbt_4/branches{/branch}","tags_url":"https://api.github.com/repos/chienbigstar/fbt_4/tags","blobs_url":"https://api.github.com/repos/chienbigstar/fbt_4/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chienbigstar/fbt_4/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chienbigstar/fbt_4/git/refs{/sha}","trees_url":"https://api.github.com/repos/chienbigstar/fbt_4/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chienbigstar/fbt_4/statuses/{sha}","languages_url":"https://api.github.com/repos/chienbigstar/fbt_4/languages","stargazers_url":"https://api.github.com/repos/chienbigstar/fbt_4/stargazers","contributors_url":"https://api.github.com/repos/chienbigstar/fbt_4/contributors","subscribers_url":"https://api.github.com/repos/chienbigstar/fbt_4/subscribers","subscription_url":"https://api.github.com/repos/chienbigstar/fbt_4/subscription","commits_url":"https://api.github.com/repos/chienbigstar/fbt_4/commits{/sha}","git_commits_url":"https://api.github.com/repos/chienbigstar/fbt_4/git/commits{/sha}","comments_url":"https://api.github.com/repos/chienbigstar/fbt_4/comments{/number}","issue_comment_url":"https://api.github.com/repos/chienbigstar/fbt_4/issues/comments{/number}","contents_url":"https://api.github.com/repos/chienbigstar/fbt_4/contents/{+path}","compare_url":"https://api.github.com/repos/chienbigstar/fbt_4/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chienbigstar/fbt_4/merges","archive_url":"https://api.github.com/repos/chienbigstar/fbt_4/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chienbigstar/fbt_4/downloads","issues_url":"https://api.github.com/repos/chienbigstar/fbt_4/issues{/number}","pulls_url":"https://api.github.com/repos/chienbigstar/fbt_4/pulls{/number}","milestones_url":"https://api.github.com/repos/chienbigstar/fbt_4/milestones{/number}","notifications_url":"https://api.github.com/repos/chienbigstar/fbt_4/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chienbigstar/fbt_4/labels{/name}","releases_url":"https://api.github.com/repos/chienbigstar/fbt_4/releases{/id}","deployments_url":"https://api.github.com/repos/chienbigstar/fbt_4/deployments","created_at":"2016-11-09T08:10:32Z","updated_at":"2016-11-09T07:55:55Z","pushed_at":"2016-11-18T08:42:00Z","git_url":"git://github.com/chienbigstar/fbt_4.git","ssh_url":"git@github.com:chienbigstar/fbt_4.git","clone_url":"https://github.com/chienbigstar/fbt_4.git","svn_url":"https://github.com/chienbigstar/fbt_4","homepage":null,"size":2136,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"framgia:develop","ref":"develop","sha":"81e804a04f717945d099a10e303a2a550586a177","user":{"login":"framgia","id":2322183,"avatar_url":"https://avatars.githubusercontent.com/u/2322183?v=3","gravatar_id":"","url":"https://api.github.com/users/framgia","html_url":"https://github.com/framgia","followers_url":"https://api.github.com/users/framgia/followers","following_url":"https://api.github.com/users/framgia/following{/other_user}","gists_url":"https://api.github.com/users/framgia/gists{/gist_id}","starred_url":"https://api.github.com/users/framgia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/framgia/subscriptions","organizations_url":"https://api.github.com/users/framgia/orgs","repos_url":"https://api.github.com/users/framgia/repos","events_url":"https://api.github.com/users/framgia/events{/privacy}","received_events_url":"https://api.github.com/users/framgia/received_events","type":"Organization","site_admin":false},"repo":{"id":73262673,"name":"fbt_4","full_name":"framgia/fbt_4","owner":{"login":"framgia","id":2322183,"avatar_url":"https://avatars.githubusercontent.com/u/2322183?v=3","gravatar_id":"","url":"https://api.github.com/users/framgia","html_url":"https://github.com/framgia","followers_url":"https://api.github.com/users/framgia/followers","following_url":"https://api.github.com/users/framgia/following{/other_user}","gists_url":"https://api.github.com/users/framgia/gists{/gist_id}","starred_url":"https://api.github.com/users/framgia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/framgia/subscriptions","organizations_url":"https://api.github.com/users/framgia/orgs","repos_url":"https://api.github.com/users/framgia/repos","events_url":"https://api.github.com/users/framgia/events{/privacy}","received_events_url":"https://api.github.com/users/framgia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/framgia/fbt_4","description":"Framgia Booking Tours (training)","fork":false,"url":"https://api.github.com/repos/framgia/fbt_4","forks_url":"https://api.github.com/repos/framgia/fbt_4/forks","keys_url":"https://api.github.com/repos/framgia/fbt_4/keys{/key_id}","collaborators_url":"https://api.github.com/repos/framgia/fbt_4/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/framgia/fbt_4/teams","hooks_url":"https://api.github.com/repos/framgia/fbt_4/hooks","issue_events_url":"https://api.github.com/repos/framgia/fbt_4/issues/events{/number}","events_url":"https://api.github.com/repos/framgia/fbt_4/events","assignees_url":"https://api.github.com/repos/framgia/fbt_4/assignees{/user}","branches_url":"https://api.github.com/repos/framgia/fbt_4/branches{/branch}","tags_url":"https://api.github.com/repos/framgia/fbt_4/tags","blobs_url":"https://api.github.com/repos/framgia/fbt_4/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/framgia/fbt_4/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/framgia/fbt_4/git/refs{/sha}","trees_url":"https://api.github.com/repos/framgia/fbt_4/git/trees{/sha}","statuses_url":"https://api.github.com/repos/framgia/fbt_4/statuses/{sha}","languages_url":"https://api.github.com/repos/framgia/fbt_4/languages","stargazers_url":"https://api.github.com/repos/framgia/fbt_4/stargazers","contributors_url":"https://api.github.com/repos/framgia/fbt_4/contributors","subscribers_url":"https://api.github.com/repos/framgia/fbt_4/subscribers","subscription_url":"https://api.github.com/repos/framgia/fbt_4/subscription","commits_url":"https://api.github.com/repos/framgia/fbt_4/commits{/sha}","git_commits_url":"https://api.github.com/repos/framgia/fbt_4/git/commits{/sha}","comments_url":"https://api.github.com/repos/framgia/fbt_4/comments{/number}","issue_comment_url":"https://api.github.com/repos/framgia/fbt_4/issues/comments{/number}","contents_url":"https://api.github.com/repos/framgia/fbt_4/contents/{+path}","compare_url":"https://api.github.com/repos/framgia/fbt_4/compare/{base}...{head}","merges_url":"https://api.github.com/repos/framgia/fbt_4/merges","archive_url":"https://api.github.com/repos/framgia/fbt_4/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/framgia/fbt_4/downloads","issues_url":"https://api.github.com/repos/framgia/fbt_4/issues{/number}","pulls_url":"https://api.github.com/repos/framgia/fbt_4/pulls{/number}","milestones_url":"https://api.github.com/repos/framgia/fbt_4/milestones{/number}","notifications_url":"https://api.github.com/repos/framgia/fbt_4/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/framgia/fbt_4/labels{/name}","releases_url":"https://api.github.com/repos/framgia/fbt_4/releases{/id}","deployments_url":"https://api.github.com/repos/framgia/fbt_4/deployments","created_at":"2016-11-09T07:55:55Z","updated_at":"2016-11-09T07:55:55Z","pushed_at":"2016-11-18T08:42:01Z","git_url":"git://github.com/framgia/fbt_4.git","ssh_url":"git@github.com:framgia/fbt_4.git","clone_url":"https://github.com/framgia/fbt_4.git","svn_url":"https://github.com/framgia/fbt_4","homepage":null,"size":2135,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":2,"forks":3,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/framgia/fbt_4/pulls/19"},"html":{"href":"https://github.com/framgia/fbt_4/pull/19"},"issue":{"href":"https://api.github.com/repos/framgia/fbt_4/issues/19"},"comments":{"href":"https://api.github.com/repos/framgia/fbt_4/issues/19/comments"},"review_comments":{"href":"https://api.github.com/repos/framgia/fbt_4/pulls/19/comments"},"review_comment":{"href":"https://api.github.com/repos/framgia/fbt_4/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/framgia/fbt_4/pulls/19/commits"},"statuses":{"href":"https://api.github.com/repos/framgia/fbt_4/statuses/38062355e0f94e69d6b9cab1e81e6235ce816373"}}}}
{"actor":{"display_login":"chienbigstar"}}