{"action":"created","comment":{"url":"https://api.github.com/repos/framgia/fdf_16/pulls/comments/81896683","pull_request_review_id":2842476,"id":81896683,"diff_hunk":"@@ -5,4 +5,17 @@ class Product < ApplicationRecord\n   has_many :ratings, dependent: :destroy\n   has_many :carts_details, dependent: :destroy\n   has_many :carts, through: :carts_details\n+  mount_uploader :picture, PictureUploader\n+  scope :recent, ->{order created_at: :desc}\n+  validate  :picture_size\n+  validates :name, presence: true\n+  validates :price, presence: true\n+  validates :species, presence: true\n+\n+  private\n+  def picture_size\n+    if picture.size > Settings.size.megabytes\n+      errors.add(:picture, \"should be less than 5MB\")","path":"app/models/product.rb","position":14,"original_position":14,"commit_id":"554f5bc34b4683ebe268dcc64fc77aac921c2266","original_commit_id":"554f5bc34b4683ebe268dcc64fc77aac921c2266","user":{"login":"nvtanh","id":5591946,"avatar_url":"https://avatars.githubusercontent.com/u/5591946?v=3","gravatar_id":"","url":"https://api.github.com/users/nvtanh","html_url":"https://github.com/nvtanh","followers_url":"https://api.github.com/users/nvtanh/followers","following_url":"https://api.github.com/users/nvtanh/following{/other_user}","gists_url":"https://api.github.com/users/nvtanh/gists{/gist_id}","starred_url":"https://api.github.com/users/nvtanh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nvtanh/subscriptions","organizations_url":"https://api.github.com/users/nvtanh/orgs","repos_url":"https://api.github.com/users/nvtanh/repos","events_url":"https://api.github.com/users/nvtanh/events{/privacy}","received_events_url":"https://api.github.com/users/nvtanh/received_events","type":"User","site_admin":false},"body":"I18n","created_at":"2016-10-05T03:48:31Z","updated_at":"2016-10-05T03:48:31Z","html_url":"https://github.com/framgia/fdf_16/pull/23#discussion_r81896683","pull_request_url":"https://api.github.com/repos/framgia/fdf_16/pulls/23","_links":{"self":{"href":"https://api.github.com/repos/framgia/fdf_16/pulls/comments/81896683"},"html":{"href":"https://github.com/framgia/fdf_16/pull/23#discussion_r81896683"},"pull_request":{"href":"https://api.github.com/repos/framgia/fdf_16/pulls/23"}}},"pull_request":{"url":"https://api.github.com/repos/framgia/fdf_16/pulls/23","id":87858115,"html_url":"https://github.com/framgia/fdf_16/pull/23","diff_url":"https://github.com/framgia/fdf_16/pull/23.diff","patch_url":"https://github.com/framgia/fdf_16/pull/23.patch","issue_url":"https://api.github.com/repos/framgia/fdf_16/issues/23","number":23,"state":"open","locked":false,"title":"show index create","user":{"login":"tamnguyenxuan25","id":22023298,"avatar_url":"https://avatars.githubusercontent.com/u/22023298?v=3","gravatar_id":"","url":"https://api.github.com/users/tamnguyenxuan25","html_url":"https://github.com/tamnguyenxuan25","followers_url":"https://api.github.com/users/tamnguyenxuan25/followers","following_url":"https://api.github.com/users/tamnguyenxuan25/following{/other_user}","gists_url":"https://api.github.com/users/tamnguyenxuan25/gists{/gist_id}","starred_url":"https://api.github.com/users/tamnguyenxuan25/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tamnguyenxuan25/subscriptions","organizations_url":"https://api.github.com/users/tamnguyenxuan25/orgs","repos_url":"https://api.github.com/users/tamnguyenxuan25/repos","events_url":"https://api.github.com/users/tamnguyenxuan25/events{/privacy}","received_events_url":"https://api.github.com/users/tamnguyenxuan25/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-10-04T09:16:55Z","updated_at":"2016-10-05T03:49:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"16b3c08000feb9dd69b238ad7e4b3fb68aa62f18","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/framgia/fdf_16/pulls/23/commits","review_comments_url":"https://api.github.com/repos/framgia/fdf_16/pulls/23/comments","review_comment_url":"https://api.github.com/repos/framgia/fdf_16/pulls/comments{/number}","comments_url":"https://api.github.com/repos/framgia/fdf_16/issues/23/comments","statuses_url":"https://api.github.com/repos/framgia/fdf_16/statuses/554f5bc34b4683ebe268dcc64fc77aac921c2266","head":{"label":"tamnguyenxuan25:user","ref":"user","sha":"554f5bc34b4683ebe268dcc64fc77aac921c2266","user":{"login":"tamnguyenxuan25","id":22023298,"avatar_url":"https://avatars.githubusercontent.com/u/22023298?v=3","gravatar_id":"","url":"https://api.github.com/users/tamnguyenxuan25","html_url":"https://github.com/tamnguyenxuan25","followers_url":"https://api.github.com/users/tamnguyenxuan25/followers","following_url":"https://api.github.com/users/tamnguyenxuan25/following{/other_user}","gists_url":"https://api.github.com/users/tamnguyenxuan25/gists{/gist_id}","starred_url":"https://api.github.com/users/tamnguyenxuan25/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tamnguyenxuan25/subscriptions","organizations_url":"https://api.github.com/users/tamnguyenxuan25/orgs","repos_url":"https://api.github.com/users/tamnguyenxuan25/repos","events_url":"https://api.github.com/users/tamnguyenxuan25/events{/privacy}","received_events_url":"https://api.github.com/users/tamnguyenxuan25/received_events","type":"User","site_admin":false},"repo":{"id":69651156,"name":"fdf_16","full_name":"tamnguyenxuan25/fdf_16","owner":{"login":"tamnguyenxuan25","id":22023298,"avatar_url":"https://avatars.githubusercontent.com/u/22023298?v=3","gravatar_id":"","url":"https://api.github.com/users/tamnguyenxuan25","html_url":"https://github.com/tamnguyenxuan25","followers_url":"https://api.github.com/users/tamnguyenxuan25/followers","following_url":"https://api.github.com/users/tamnguyenxuan25/following{/other_user}","gists_url":"https://api.github.com/users/tamnguyenxuan25/gists{/gist_id}","starred_url":"https://api.github.com/users/tamnguyenxuan25/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tamnguyenxuan25/subscriptions","organizations_url":"https://api.github.com/users/tamnguyenxuan25/orgs","repos_url":"https://api.github.com/users/tamnguyenxuan25/repos","events_url":"https://api.github.com/users/tamnguyenxuan25/events{/privacy}","received_events_url":"https://api.github.com/users/tamnguyenxuan25/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tamnguyenxuan25/fdf_16","description":"Foods & Drinks (training)","fork":true,"url":"https://api.github.com/repos/tamnguyenxuan25/fdf_16","forks_url":"https://api.github.com/repos/tamnguyenxuan25/fdf_16/forks","keys_url":"https://api.github.com/repos/tamnguyenxuan25/fdf_16/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tamnguyenxuan25/fdf_16/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tamnguyenxuan25/fdf_16/teams","hooks_url":"https://api.github.com/repos/tamnguyenxuan25/fdf_16/hooks","issue_events_url":"https://api.github.com/repos/tamnguyenxuan25/fdf_16/issues/events{/number}","events_url":"https://api.github.com/repos/tamnguyenxuan25/fdf_16/events","assignees_url":"https://api.github.com/repos/tamnguyenxuan25/fdf_16/assignees{/user}","branches_url":"https://api.github.com/repos/tamnguyenxuan25/fdf_16/branches{/branch}","tags_url":"https://api.github.com/repos/tamnguyenxuan25/fdf_16/tags","blobs_url":"https://api.github.com/repos/tamnguyenxuan25/fdf_16/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tamnguyenxuan25/fdf_16/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tamnguyenxuan25/fdf_16/git/refs{/sha}","trees_url":"https://api.github.com/repos/tamnguyenxuan25/fdf_16/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tamnguyenxuan25/fdf_16/statuses/{sha}","languages_url":"https://api.github.com/repos/tamnguyenxuan25/fdf_16/languages","stargazers_url":"https://api.github.com/repos/tamnguyenxuan25/fdf_16/stargazers","contributors_url":"https://api.github.com/repos/tamnguyenxuan25/fdf_16/contributors","subscribers_url":"https://api.github.com/repos/tamnguyenxuan25/fdf_16/subscribers","subscription_url":"https://api.github.com/repos/tamnguyenxuan25/fdf_16/subscription","commits_url":"https://api.github.com/repos/tamnguyenxuan25/fdf_16/commits{/sha}","git_commits_url":"https://api.github.com/repos/tamnguyenxuan25/fdf_16/git/commits{/sha}","comments_url":"https://api.github.com/repos/tamnguyenxuan25/fdf_16/comments{/number}","issue_comment_url":"https://api.github.com/repos/tamnguyenxuan25/fdf_16/issues/comments{/number}","contents_url":"https://api.github.com/repos/tamnguyenxuan25/fdf_16/contents/{+path}","compare_url":"https://api.github.com/repos/tamnguyenxuan25/fdf_16/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tamnguyenxuan25/fdf_16/merges","archive_url":"https://api.github.com/repos/tamnguyenxuan25/fdf_16/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tamnguyenxuan25/fdf_16/downloads","issues_url":"https://api.github.com/repos/tamnguyenxuan25/fdf_16/issues{/number}","pulls_url":"https://api.github.com/repos/tamnguyenxuan25/fdf_16/pulls{/number}","milestones_url":"https://api.github.com/repos/tamnguyenxuan25/fdf_16/milestones{/number}","notifications_url":"https://api.github.com/repos/tamnguyenxuan25/fdf_16/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tamnguyenxuan25/fdf_16/labels{/name}","releases_url":"https://api.github.com/repos/tamnguyenxuan25/fdf_16/releases{/id}","deployments_url":"https://api.github.com/repos/tamnguyenxuan25/fdf_16/deployments","created_at":"2016-09-30T08:58:46Z","updated_at":"2016-09-27T09:05:11Z","pushed_at":"2016-10-05T00:49:52Z","git_url":"git://github.com/tamnguyenxuan25/fdf_16.git","ssh_url":"git@github.com:tamnguyenxuan25/fdf_16.git","clone_url":"https://github.com/tamnguyenxuan25/fdf_16.git","svn_url":"https://github.com/tamnguyenxuan25/fdf_16","homepage":null,"size":44,"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":"a81e3c55dd866411b854a7e5c75f1fe2eaf2d4e2","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":69338690,"name":"fdf_16","full_name":"framgia/fdf_16","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/fdf_16","description":"Foods & Drinks (training)","fork":false,"url":"https://api.github.com/repos/framgia/fdf_16","forks_url":"https://api.github.com/repos/framgia/fdf_16/forks","keys_url":"https://api.github.com/repos/framgia/fdf_16/keys{/key_id}","collaborators_url":"https://api.github.com/repos/framgia/fdf_16/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/framgia/fdf_16/teams","hooks_url":"https://api.github.com/repos/framgia/fdf_16/hooks","issue_events_url":"https://api.github.com/repos/framgia/fdf_16/issues/events{/number}","events_url":"https://api.github.com/repos/framgia/fdf_16/events","assignees_url":"https://api.github.com/repos/framgia/fdf_16/assignees{/user}","branches_url":"https://api.github.com/repos/framgia/fdf_16/branches{/branch}","tags_url":"https://api.github.com/repos/framgia/fdf_16/tags","blobs_url":"https://api.github.com/repos/framgia/fdf_16/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/framgia/fdf_16/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/framgia/fdf_16/git/refs{/sha}","trees_url":"https://api.github.com/repos/framgia/fdf_16/git/trees{/sha}","statuses_url":"https://api.github.com/repos/framgia/fdf_16/statuses/{sha}","languages_url":"https://api.github.com/repos/framgia/fdf_16/languages","stargazers_url":"https://api.github.com/repos/framgia/fdf_16/stargazers","contributors_url":"https://api.github.com/repos/framgia/fdf_16/contributors","subscribers_url":"https://api.github.com/repos/framgia/fdf_16/subscribers","subscription_url":"https://api.github.com/repos/framgia/fdf_16/subscription","commits_url":"https://api.github.com/repos/framgia/fdf_16/commits{/sha}","git_commits_url":"https://api.github.com/repos/framgia/fdf_16/git/commits{/sha}","comments_url":"https://api.github.com/repos/framgia/fdf_16/comments{/number}","issue_comment_url":"https://api.github.com/repos/framgia/fdf_16/issues/comments{/number}","contents_url":"https://api.github.com/repos/framgia/fdf_16/contents/{+path}","compare_url":"https://api.github.com/repos/framgia/fdf_16/compare/{base}...{head}","merges_url":"https://api.github.com/repos/framgia/fdf_16/merges","archive_url":"https://api.github.com/repos/framgia/fdf_16/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/framgia/fdf_16/downloads","issues_url":"https://api.github.com/repos/framgia/fdf_16/issues{/number}","pulls_url":"https://api.github.com/repos/framgia/fdf_16/pulls{/number}","milestones_url":"https://api.github.com/repos/framgia/fdf_16/milestones{/number}","notifications_url":"https://api.github.com/repos/framgia/fdf_16/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/framgia/fdf_16/labels{/name}","releases_url":"https://api.github.com/repos/framgia/fdf_16/releases{/id}","deployments_url":"https://api.github.com/repos/framgia/fdf_16/deployments","created_at":"2016-09-27T09:05:11Z","updated_at":"2016-09-27T09:05:11Z","pushed_at":"2016-10-05T01:22:12Z","git_url":"git://github.com/framgia/fdf_16.git","ssh_url":"git@github.com:framgia/fdf_16.git","clone_url":"https://github.com/framgia/fdf_16.git","svn_url":"https://github.com/framgia/fdf_16","homepage":null,"size":80,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":2,"forks":2,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/framgia/fdf_16/pulls/23"},"html":{"href":"https://github.com/framgia/fdf_16/pull/23"},"issue":{"href":"https://api.github.com/repos/framgia/fdf_16/issues/23"},"comments":{"href":"https://api.github.com/repos/framgia/fdf_16/issues/23/comments"},"review_comments":{"href":"https://api.github.com/repos/framgia/fdf_16/pulls/23/comments"},"review_comment":{"href":"https://api.github.com/repos/framgia/fdf_16/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/framgia/fdf_16/pulls/23/commits"},"statuses":{"href":"https://api.github.com/repos/framgia/fdf_16/statuses/554f5bc34b4683ebe268dcc64fc77aac921c2266"}}}}
{"actor":{"display_login":"nvtanh"}}