{"action":"created","comment":{"url":"https://api.github.com/repos/GrowMoi/moi/pulls/comments/108989631","pull_request_review_id":30061727,"id":108989631,"diff_hunk":"@@ -0,0 +1,61 @@\n+# == Schema Information\n+#\n+# Table name: users\n+#\n+#  id                     :integer          not null, primary key\n+#  email                  :string           default(\"\"), not null\n+#  encrypted_password     :string           default(\"\"), not null\n+#  reset_password_token   :string\n+#  reset_password_sent_at :datetime\n+#  remember_created_at    :datetime\n+#  sign_in_count          :integer          default(0), not null\n+#  current_sign_in_at     :datetime\n+#  last_sign_in_at        :datetime\n+#  current_sign_in_ip     :inet\n+#  last_sign_in_ip        :inet\n+#  created_at             :datetime\n+#  updated_at             :datetime\n+#  name                   :string\n+#  role                   :string           default(\"cliente\"), not null\n+#  uid                    :string           not null\n+#  provider               :string           default(\"email\"), not null\n+#  tokens                 :json\n+#  birthday               :date\n+#  city                   :string\n+#  country                :string\n+#\n+\n+module Api\n+  class UserProfileSerializer < ActiveModel::Serializer\n+    root false\n+\n+    attributes :id,\n+               :email,\n+               :name,\n+               :country,\n+               :birthday,\n+               :age,\n+               :city,\n+               :last_contents_learnt\n+\n+    def age\n+      birthday = object.birthday\n+      if birthday\n+        now = Time.now.utc.to_date\n+        now.year - birthday.year - ((now.month > birthday.month || (now.month == birthday.month && now.day >= birthday.day)) ? 0 : 1)","path":"app/serializers/api/user_profile_serializer.rb","position":45,"original_position":45,"commit_id":"f950f970c1eb5760f91d0cb37c0858dd9353e68d","original_commit_id":"f950f970c1eb5760f91d0cb37c0858dd9353e68d","user":{"login":"fabricioflores","id":3495122,"avatar_url":"https://avatars3.githubusercontent.com/u/3495122?v=3","gravatar_id":"","url":"https://api.github.com/users/fabricioflores","html_url":"https://github.com/fabricioflores","followers_url":"https://api.github.com/users/fabricioflores/followers","following_url":"https://api.github.com/users/fabricioflores/following{/other_user}","gists_url":"https://api.github.com/users/fabricioflores/gists{/gist_id}","starred_url":"https://api.github.com/users/fabricioflores/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabricioflores/subscriptions","organizations_url":"https://api.github.com/users/fabricioflores/orgs","repos_url":"https://api.github.com/users/fabricioflores/repos","events_url":"https://api.github.com/users/fabricioflores/events{/privacy}","received_events_url":"https://api.github.com/users/fabricioflores/received_events","type":"User","site_admin":false},"body":"creo q hay como calcular todo esto sin hacer este cálculo raro... ","created_at":"2017-03-30T17:38:44Z","updated_at":"2017-03-30T17:38:44Z","html_url":"https://github.com/GrowMoi/moi/pull/162#discussion_r108989631","pull_request_url":"https://api.github.com/repos/GrowMoi/moi/pulls/162","_links":{"self":{"href":"https://api.github.com/repos/GrowMoi/moi/pulls/comments/108989631"},"html":{"href":"https://github.com/GrowMoi/moi/pull/162#discussion_r108989631"},"pull_request":{"href":"https://api.github.com/repos/GrowMoi/moi/pulls/162"}}},"pull_request":{"url":"https://api.github.com/repos/GrowMoi/moi/pulls/162","id":113479237,"html_url":"https://github.com/GrowMoi/moi/pull/162","diff_url":"https://github.com/GrowMoi/moi/pull/162.diff","patch_url":"https://github.com/GrowMoi/moi/pull/162.patch","issue_url":"https://api.github.com/repos/GrowMoi/moi/issues/162","number":162,"state":"open","locked":false,"title":"Profile fields","user":{"login":"leninkp","id":7042591,"avatar_url":"https://avatars1.githubusercontent.com/u/7042591?v=3","gravatar_id":"","url":"https://api.github.com/users/leninkp","html_url":"https://github.com/leninkp","followers_url":"https://api.github.com/users/leninkp/followers","following_url":"https://api.github.com/users/leninkp/following{/other_user}","gists_url":"https://api.github.com/users/leninkp/gists{/gist_id}","starred_url":"https://api.github.com/users/leninkp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leninkp/subscriptions","organizations_url":"https://api.github.com/users/leninkp/orgs","repos_url":"https://api.github.com/users/leninkp/repos","events_url":"https://api.github.com/users/leninkp/events{/privacy}","received_events_url":"https://api.github.com/users/leninkp/received_events","type":"User","site_admin":false},"body":"@fabricioflores ","created_at":"2017-03-30T17:11:28Z","updated_at":"2017-03-30T17:38:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4ff6e965d4a683a06bb040faff54cc85f291e89d","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/GrowMoi/moi/pulls/162/commits","review_comments_url":"https://api.github.com/repos/GrowMoi/moi/pulls/162/comments","review_comment_url":"https://api.github.com/repos/GrowMoi/moi/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GrowMoi/moi/issues/162/comments","statuses_url":"https://api.github.com/repos/GrowMoi/moi/statuses/f950f970c1eb5760f91d0cb37c0858dd9353e68d","head":{"label":"GrowMoi:profile-fields","ref":"profile-fields","sha":"f950f970c1eb5760f91d0cb37c0858dd9353e68d","user":{"login":"GrowMoi","id":10735842,"avatar_url":"https://avatars1.githubusercontent.com/u/10735842?v=3","gravatar_id":"","url":"https://api.github.com/users/GrowMoi","html_url":"https://github.com/GrowMoi","followers_url":"https://api.github.com/users/GrowMoi/followers","following_url":"https://api.github.com/users/GrowMoi/following{/other_user}","gists_url":"https://api.github.com/users/GrowMoi/gists{/gist_id}","starred_url":"https://api.github.com/users/GrowMoi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GrowMoi/subscriptions","organizations_url":"https://api.github.com/users/GrowMoi/orgs","repos_url":"https://api.github.com/users/GrowMoi/repos","events_url":"https://api.github.com/users/GrowMoi/events{/privacy}","received_events_url":"https://api.github.com/users/GrowMoi/received_events","type":"Organization","site_admin":false},"repo":{"id":29950629,"name":"moi","full_name":"GrowMoi/moi","owner":{"login":"GrowMoi","id":10735842,"avatar_url":"https://avatars1.githubusercontent.com/u/10735842?v=3","gravatar_id":"","url":"https://api.github.com/users/GrowMoi","html_url":"https://github.com/GrowMoi","followers_url":"https://api.github.com/users/GrowMoi/followers","following_url":"https://api.github.com/users/GrowMoi/following{/other_user}","gists_url":"https://api.github.com/users/GrowMoi/gists{/gist_id}","starred_url":"https://api.github.com/users/GrowMoi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GrowMoi/subscriptions","organizations_url":"https://api.github.com/users/GrowMoi/orgs","repos_url":"https://api.github.com/users/GrowMoi/repos","events_url":"https://api.github.com/users/GrowMoi/events{/privacy}","received_events_url":"https://api.github.com/users/GrowMoi/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GrowMoi/moi","description":null,"fork":false,"url":"https://api.github.com/repos/GrowMoi/moi","forks_url":"https://api.github.com/repos/GrowMoi/moi/forks","keys_url":"https://api.github.com/repos/GrowMoi/moi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GrowMoi/moi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GrowMoi/moi/teams","hooks_url":"https://api.github.com/repos/GrowMoi/moi/hooks","issue_events_url":"https://api.github.com/repos/GrowMoi/moi/issues/events{/number}","events_url":"https://api.github.com/repos/GrowMoi/moi/events","assignees_url":"https://api.github.com/repos/GrowMoi/moi/assignees{/user}","branches_url":"https://api.github.com/repos/GrowMoi/moi/branches{/branch}","tags_url":"https://api.github.com/repos/GrowMoi/moi/tags","blobs_url":"https://api.github.com/repos/GrowMoi/moi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GrowMoi/moi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GrowMoi/moi/git/refs{/sha}","trees_url":"https://api.github.com/repos/GrowMoi/moi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GrowMoi/moi/statuses/{sha}","languages_url":"https://api.github.com/repos/GrowMoi/moi/languages","stargazers_url":"https://api.github.com/repos/GrowMoi/moi/stargazers","contributors_url":"https://api.github.com/repos/GrowMoi/moi/contributors","subscribers_url":"https://api.github.com/repos/GrowMoi/moi/subscribers","subscription_url":"https://api.github.com/repos/GrowMoi/moi/subscription","commits_url":"https://api.github.com/repos/GrowMoi/moi/commits{/sha}","git_commits_url":"https://api.github.com/repos/GrowMoi/moi/git/commits{/sha}","comments_url":"https://api.github.com/repos/GrowMoi/moi/comments{/number}","issue_comment_url":"https://api.github.com/repos/GrowMoi/moi/issues/comments{/number}","contents_url":"https://api.github.com/repos/GrowMoi/moi/contents/{+path}","compare_url":"https://api.github.com/repos/GrowMoi/moi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GrowMoi/moi/merges","archive_url":"https://api.github.com/repos/GrowMoi/moi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GrowMoi/moi/downloads","issues_url":"https://api.github.com/repos/GrowMoi/moi/issues{/number}","pulls_url":"https://api.github.com/repos/GrowMoi/moi/pulls{/number}","milestones_url":"https://api.github.com/repos/GrowMoi/moi/milestones{/number}","notifications_url":"https://api.github.com/repos/GrowMoi/moi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GrowMoi/moi/labels{/name}","releases_url":"https://api.github.com/repos/GrowMoi/moi/releases{/id}","deployments_url":"https://api.github.com/repos/GrowMoi/moi/deployments","created_at":"2015-01-28T04:32:47Z","updated_at":"2017-02-24T11:41:04Z","pushed_at":"2017-03-30T17:11:29Z","git_url":"git://github.com/GrowMoi/moi.git","ssh_url":"git@github.com:GrowMoi/moi.git","clone_url":"https://github.com/GrowMoi/moi.git","svn_url":"https://github.com/GrowMoi/moi","homepage":"http://moi.shiriculapo.com","size":1033,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":0,"default_branch":"master"}},"base":{"label":"GrowMoi:master","ref":"master","sha":"619bf07dd3c9a9efcc3ce950c16d889e35b715cb","user":{"login":"GrowMoi","id":10735842,"avatar_url":"https://avatars1.githubusercontent.com/u/10735842?v=3","gravatar_id":"","url":"https://api.github.com/users/GrowMoi","html_url":"https://github.com/GrowMoi","followers_url":"https://api.github.com/users/GrowMoi/followers","following_url":"https://api.github.com/users/GrowMoi/following{/other_user}","gists_url":"https://api.github.com/users/GrowMoi/gists{/gist_id}","starred_url":"https://api.github.com/users/GrowMoi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GrowMoi/subscriptions","organizations_url":"https://api.github.com/users/GrowMoi/orgs","repos_url":"https://api.github.com/users/GrowMoi/repos","events_url":"https://api.github.com/users/GrowMoi/events{/privacy}","received_events_url":"https://api.github.com/users/GrowMoi/received_events","type":"Organization","site_admin":false},"repo":{"id":29950629,"name":"moi","full_name":"GrowMoi/moi","owner":{"login":"GrowMoi","id":10735842,"avatar_url":"https://avatars1.githubusercontent.com/u/10735842?v=3","gravatar_id":"","url":"https://api.github.com/users/GrowMoi","html_url":"https://github.com/GrowMoi","followers_url":"https://api.github.com/users/GrowMoi/followers","following_url":"https://api.github.com/users/GrowMoi/following{/other_user}","gists_url":"https://api.github.com/users/GrowMoi/gists{/gist_id}","starred_url":"https://api.github.com/users/GrowMoi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GrowMoi/subscriptions","organizations_url":"https://api.github.com/users/GrowMoi/orgs","repos_url":"https://api.github.com/users/GrowMoi/repos","events_url":"https://api.github.com/users/GrowMoi/events{/privacy}","received_events_url":"https://api.github.com/users/GrowMoi/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GrowMoi/moi","description":null,"fork":false,"url":"https://api.github.com/repos/GrowMoi/moi","forks_url":"https://api.github.com/repos/GrowMoi/moi/forks","keys_url":"https://api.github.com/repos/GrowMoi/moi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GrowMoi/moi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GrowMoi/moi/teams","hooks_url":"https://api.github.com/repos/GrowMoi/moi/hooks","issue_events_url":"https://api.github.com/repos/GrowMoi/moi/issues/events{/number}","events_url":"https://api.github.com/repos/GrowMoi/moi/events","assignees_url":"https://api.github.com/repos/GrowMoi/moi/assignees{/user}","branches_url":"https://api.github.com/repos/GrowMoi/moi/branches{/branch}","tags_url":"https://api.github.com/repos/GrowMoi/moi/tags","blobs_url":"https://api.github.com/repos/GrowMoi/moi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GrowMoi/moi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GrowMoi/moi/git/refs{/sha}","trees_url":"https://api.github.com/repos/GrowMoi/moi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GrowMoi/moi/statuses/{sha}","languages_url":"https://api.github.com/repos/GrowMoi/moi/languages","stargazers_url":"https://api.github.com/repos/GrowMoi/moi/stargazers","contributors_url":"https://api.github.com/repos/GrowMoi/moi/contributors","subscribers_url":"https://api.github.com/repos/GrowMoi/moi/subscribers","subscription_url":"https://api.github.com/repos/GrowMoi/moi/subscription","commits_url":"https://api.github.com/repos/GrowMoi/moi/commits{/sha}","git_commits_url":"https://api.github.com/repos/GrowMoi/moi/git/commits{/sha}","comments_url":"https://api.github.com/repos/GrowMoi/moi/comments{/number}","issue_comment_url":"https://api.github.com/repos/GrowMoi/moi/issues/comments{/number}","contents_url":"https://api.github.com/repos/GrowMoi/moi/contents/{+path}","compare_url":"https://api.github.com/repos/GrowMoi/moi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GrowMoi/moi/merges","archive_url":"https://api.github.com/repos/GrowMoi/moi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GrowMoi/moi/downloads","issues_url":"https://api.github.com/repos/GrowMoi/moi/issues{/number}","pulls_url":"https://api.github.com/repos/GrowMoi/moi/pulls{/number}","milestones_url":"https://api.github.com/repos/GrowMoi/moi/milestones{/number}","notifications_url":"https://api.github.com/repos/GrowMoi/moi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GrowMoi/moi/labels{/name}","releases_url":"https://api.github.com/repos/GrowMoi/moi/releases{/id}","deployments_url":"https://api.github.com/repos/GrowMoi/moi/deployments","created_at":"2015-01-28T04:32:47Z","updated_at":"2017-02-24T11:41:04Z","pushed_at":"2017-03-30T17:11:29Z","git_url":"git://github.com/GrowMoi/moi.git","ssh_url":"git@github.com:GrowMoi/moi.git","clone_url":"https://github.com/GrowMoi/moi.git","svn_url":"https://github.com/GrowMoi/moi","homepage":"http://moi.shiriculapo.com","size":1033,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GrowMoi/moi/pulls/162"},"html":{"href":"https://github.com/GrowMoi/moi/pull/162"},"issue":{"href":"https://api.github.com/repos/GrowMoi/moi/issues/162"},"comments":{"href":"https://api.github.com/repos/GrowMoi/moi/issues/162/comments"},"review_comments":{"href":"https://api.github.com/repos/GrowMoi/moi/pulls/162/comments"},"review_comment":{"href":"https://api.github.com/repos/GrowMoi/moi/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GrowMoi/moi/pulls/162/commits"},"statuses":{"href":"https://api.github.com/repos/GrowMoi/moi/statuses/f950f970c1eb5760f91d0cb37c0858dd9353e68d"}}}}
{"actor":{"display_login":"fabricioflores"}}