{"action":"created","comment":{"url":"https://api.github.com/repos/ytolstyk/hema/pulls/comments/37155176","id":37155176,"diff_hunk":"@@ -20,4 +20,23 @@ class Match < ActiveRecord::Base\n   has_many :fighters,\n     through: :match_fighters,\n     source: :fighter\n+  has_one :match_info\n+\n+  after_create :create_match_info\n+\n+  def create_match_info\n+    match_info.create\n+  end\n+\n+  def completed?\n+    match_info.match_completed\n+  end\n+\n+  def started?\n+    match_info.match_started\n+  end\n+\n+  def elapsed_time","path":"app/models/match.rb","position":20,"original_position":20,"commit_id":"14841e656c29bfb677c1aa56d2f43a791eda155a","original_commit_id":"14841e656c29bfb677c1aa56d2f43a791eda155a","user":{"login":"azizova-leyla","id":1741747,"avatar_url":"https://avatars.githubusercontent.com/u/1741747?v=3","gravatar_id":"","url":"https://api.github.com/users/azizova-leyla","html_url":"https://github.com/azizova-leyla","followers_url":"https://api.github.com/users/azizova-leyla/followers","following_url":"https://api.github.com/users/azizova-leyla/following{/other_user}","gists_url":"https://api.github.com/users/azizova-leyla/gists{/gist_id}","starred_url":"https://api.github.com/users/azizova-leyla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azizova-leyla/subscriptions","organizations_url":"https://api.github.com/users/azizova-leyla/orgs","repos_url":"https://api.github.com/users/azizova-leyla/repos","events_url":"https://api.github.com/users/azizova-leyla/events{/privacy}","received_events_url":"https://api.github.com/users/azizova-leyla/received_events","type":"User","site_admin":false},"body":"How do you plan to use this? Total elapsed time might be more than timestamp on the last exchange.","created_at":"2015-08-17T02:22:41Z","updated_at":"2015-08-17T02:22:41Z","html_url":"https://github.com/ytolstyk/hema/pull/54#discussion_r37155176","pull_request_url":"https://api.github.com/repos/ytolstyk/hema/pulls/54","_links":{"self":{"href":"https://api.github.com/repos/ytolstyk/hema/pulls/comments/37155176"},"html":{"href":"https://github.com/ytolstyk/hema/pull/54#discussion_r37155176"},"pull_request":{"href":"https://api.github.com/repos/ytolstyk/hema/pulls/54"}}},"pull_request":{"url":"https://api.github.com/repos/ytolstyk/hema/pulls/54","id":42544922,"html_url":"https://github.com/ytolstyk/hema/pull/54","diff_url":"https://github.com/ytolstyk/hema/pull/54.diff","patch_url":"https://github.com/ytolstyk/hema/pull/54.patch","issue_url":"https://api.github.com/repos/ytolstyk/hema/issues/54","number":54,"state":"open","locked":false,"title":"Adding seconds to exchanges, creating match_infos","user":{"login":"ytolstyk","id":7061459,"avatar_url":"https://avatars.githubusercontent.com/u/7061459?v=3","gravatar_id":"","url":"https://api.github.com/users/ytolstyk","html_url":"https://github.com/ytolstyk","followers_url":"https://api.github.com/users/ytolstyk/followers","following_url":"https://api.github.com/users/ytolstyk/following{/other_user}","gists_url":"https://api.github.com/users/ytolstyk/gists{/gist_id}","starred_url":"https://api.github.com/users/ytolstyk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ytolstyk/subscriptions","organizations_url":"https://api.github.com/users/ytolstyk/orgs","repos_url":"https://api.github.com/users/ytolstyk/repos","events_url":"https://api.github.com/users/ytolstyk/events{/privacy}","received_events_url":"https://api.github.com/users/ytolstyk/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-08-16T22:38:38Z","updated_at":"2015-08-17T02:22:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c3af80a5e86d33a805bae7867de6f157d4712151","assignee":{"login":"azizova-leyla","id":1741747,"avatar_url":"https://avatars.githubusercontent.com/u/1741747?v=3","gravatar_id":"","url":"https://api.github.com/users/azizova-leyla","html_url":"https://github.com/azizova-leyla","followers_url":"https://api.github.com/users/azizova-leyla/followers","following_url":"https://api.github.com/users/azizova-leyla/following{/other_user}","gists_url":"https://api.github.com/users/azizova-leyla/gists{/gist_id}","starred_url":"https://api.github.com/users/azizova-leyla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azizova-leyla/subscriptions","organizations_url":"https://api.github.com/users/azizova-leyla/orgs","repos_url":"https://api.github.com/users/azizova-leyla/repos","events_url":"https://api.github.com/users/azizova-leyla/events{/privacy}","received_events_url":"https://api.github.com/users/azizova-leyla/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/ytolstyk/hema/pulls/54/commits","review_comments_url":"https://api.github.com/repos/ytolstyk/hema/pulls/54/comments","review_comment_url":"https://api.github.com/repos/ytolstyk/hema/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ytolstyk/hema/issues/54/comments","statuses_url":"https://api.github.com/repos/ytolstyk/hema/statuses/14841e656c29bfb677c1aa56d2f43a791eda155a","head":{"label":"ytolstyk:add-time-matches-info","ref":"add-time-matches-info","sha":"14841e656c29bfb677c1aa56d2f43a791eda155a","user":{"login":"ytolstyk","id":7061459,"avatar_url":"https://avatars.githubusercontent.com/u/7061459?v=3","gravatar_id":"","url":"https://api.github.com/users/ytolstyk","html_url":"https://github.com/ytolstyk","followers_url":"https://api.github.com/users/ytolstyk/followers","following_url":"https://api.github.com/users/ytolstyk/following{/other_user}","gists_url":"https://api.github.com/users/ytolstyk/gists{/gist_id}","starred_url":"https://api.github.com/users/ytolstyk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ytolstyk/subscriptions","organizations_url":"https://api.github.com/users/ytolstyk/orgs","repos_url":"https://api.github.com/users/ytolstyk/repos","events_url":"https://api.github.com/users/ytolstyk/events{/privacy}","received_events_url":"https://api.github.com/users/ytolstyk/received_events","type":"User","site_admin":false},"repo":{"id":38498818,"name":"hema","full_name":"ytolstyk/hema","owner":{"login":"ytolstyk","id":7061459,"avatar_url":"https://avatars.githubusercontent.com/u/7061459?v=3","gravatar_id":"","url":"https://api.github.com/users/ytolstyk","html_url":"https://github.com/ytolstyk","followers_url":"https://api.github.com/users/ytolstyk/followers","following_url":"https://api.github.com/users/ytolstyk/following{/other_user}","gists_url":"https://api.github.com/users/ytolstyk/gists{/gist_id}","starred_url":"https://api.github.com/users/ytolstyk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ytolstyk/subscriptions","organizations_url":"https://api.github.com/users/ytolstyk/orgs","repos_url":"https://api.github.com/users/ytolstyk/repos","events_url":"https://api.github.com/users/ytolstyk/events{/privacy}","received_events_url":"https://api.github.com/users/ytolstyk/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ytolstyk/hema","description":"Tournament scoring app for HEMA conventions","fork":false,"url":"https://api.github.com/repos/ytolstyk/hema","forks_url":"https://api.github.com/repos/ytolstyk/hema/forks","keys_url":"https://api.github.com/repos/ytolstyk/hema/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ytolstyk/hema/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ytolstyk/hema/teams","hooks_url":"https://api.github.com/repos/ytolstyk/hema/hooks","issue_events_url":"https://api.github.com/repos/ytolstyk/hema/issues/events{/number}","events_url":"https://api.github.com/repos/ytolstyk/hema/events","assignees_url":"https://api.github.com/repos/ytolstyk/hema/assignees{/user}","branches_url":"https://api.github.com/repos/ytolstyk/hema/branches{/branch}","tags_url":"https://api.github.com/repos/ytolstyk/hema/tags","blobs_url":"https://api.github.com/repos/ytolstyk/hema/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ytolstyk/hema/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ytolstyk/hema/git/refs{/sha}","trees_url":"https://api.github.com/repos/ytolstyk/hema/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ytolstyk/hema/statuses/{sha}","languages_url":"https://api.github.com/repos/ytolstyk/hema/languages","stargazers_url":"https://api.github.com/repos/ytolstyk/hema/stargazers","contributors_url":"https://api.github.com/repos/ytolstyk/hema/contributors","subscribers_url":"https://api.github.com/repos/ytolstyk/hema/subscribers","subscription_url":"https://api.github.com/repos/ytolstyk/hema/subscription","commits_url":"https://api.github.com/repos/ytolstyk/hema/commits{/sha}","git_commits_url":"https://api.github.com/repos/ytolstyk/hema/git/commits{/sha}","comments_url":"https://api.github.com/repos/ytolstyk/hema/comments{/number}","issue_comment_url":"https://api.github.com/repos/ytolstyk/hema/issues/comments{/number}","contents_url":"https://api.github.com/repos/ytolstyk/hema/contents/{+path}","compare_url":"https://api.github.com/repos/ytolstyk/hema/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ytolstyk/hema/merges","archive_url":"https://api.github.com/repos/ytolstyk/hema/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ytolstyk/hema/downloads","issues_url":"https://api.github.com/repos/ytolstyk/hema/issues{/number}","pulls_url":"https://api.github.com/repos/ytolstyk/hema/pulls{/number}","milestones_url":"https://api.github.com/repos/ytolstyk/hema/milestones{/number}","notifications_url":"https://api.github.com/repos/ytolstyk/hema/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ytolstyk/hema/labels{/name}","releases_url":"https://api.github.com/repos/ytolstyk/hema/releases{/id}","created_at":"2015-07-03T15:17:39Z","updated_at":"2015-07-03T19:08:10Z","pushed_at":"2015-08-17T02:20:44Z","git_url":"git://github.com/ytolstyk/hema.git","ssh_url":"git@github.com:ytolstyk/hema.git","clone_url":"https://github.com/ytolstyk/hema.git","svn_url":"https://github.com/ytolstyk/hema","homepage":null,"size":580,"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":16,"forks":0,"open_issues":16,"watchers":0,"default_branch":"master"}},"base":{"label":"ytolstyk:master","ref":"master","sha":"e4d3792bde51174721c310313bbdb459d6b506c3","user":{"login":"ytolstyk","id":7061459,"avatar_url":"https://avatars.githubusercontent.com/u/7061459?v=3","gravatar_id":"","url":"https://api.github.com/users/ytolstyk","html_url":"https://github.com/ytolstyk","followers_url":"https://api.github.com/users/ytolstyk/followers","following_url":"https://api.github.com/users/ytolstyk/following{/other_user}","gists_url":"https://api.github.com/users/ytolstyk/gists{/gist_id}","starred_url":"https://api.github.com/users/ytolstyk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ytolstyk/subscriptions","organizations_url":"https://api.github.com/users/ytolstyk/orgs","repos_url":"https://api.github.com/users/ytolstyk/repos","events_url":"https://api.github.com/users/ytolstyk/events{/privacy}","received_events_url":"https://api.github.com/users/ytolstyk/received_events","type":"User","site_admin":false},"repo":{"id":38498818,"name":"hema","full_name":"ytolstyk/hema","owner":{"login":"ytolstyk","id":7061459,"avatar_url":"https://avatars.githubusercontent.com/u/7061459?v=3","gravatar_id":"","url":"https://api.github.com/users/ytolstyk","html_url":"https://github.com/ytolstyk","followers_url":"https://api.github.com/users/ytolstyk/followers","following_url":"https://api.github.com/users/ytolstyk/following{/other_user}","gists_url":"https://api.github.com/users/ytolstyk/gists{/gist_id}","starred_url":"https://api.github.com/users/ytolstyk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ytolstyk/subscriptions","organizations_url":"https://api.github.com/users/ytolstyk/orgs","repos_url":"https://api.github.com/users/ytolstyk/repos","events_url":"https://api.github.com/users/ytolstyk/events{/privacy}","received_events_url":"https://api.github.com/users/ytolstyk/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ytolstyk/hema","description":"Tournament scoring app for HEMA conventions","fork":false,"url":"https://api.github.com/repos/ytolstyk/hema","forks_url":"https://api.github.com/repos/ytolstyk/hema/forks","keys_url":"https://api.github.com/repos/ytolstyk/hema/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ytolstyk/hema/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ytolstyk/hema/teams","hooks_url":"https://api.github.com/repos/ytolstyk/hema/hooks","issue_events_url":"https://api.github.com/repos/ytolstyk/hema/issues/events{/number}","events_url":"https://api.github.com/repos/ytolstyk/hema/events","assignees_url":"https://api.github.com/repos/ytolstyk/hema/assignees{/user}","branches_url":"https://api.github.com/repos/ytolstyk/hema/branches{/branch}","tags_url":"https://api.github.com/repos/ytolstyk/hema/tags","blobs_url":"https://api.github.com/repos/ytolstyk/hema/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ytolstyk/hema/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ytolstyk/hema/git/refs{/sha}","trees_url":"https://api.github.com/repos/ytolstyk/hema/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ytolstyk/hema/statuses/{sha}","languages_url":"https://api.github.com/repos/ytolstyk/hema/languages","stargazers_url":"https://api.github.com/repos/ytolstyk/hema/stargazers","contributors_url":"https://api.github.com/repos/ytolstyk/hema/contributors","subscribers_url":"https://api.github.com/repos/ytolstyk/hema/subscribers","subscription_url":"https://api.github.com/repos/ytolstyk/hema/subscription","commits_url":"https://api.github.com/repos/ytolstyk/hema/commits{/sha}","git_commits_url":"https://api.github.com/repos/ytolstyk/hema/git/commits{/sha}","comments_url":"https://api.github.com/repos/ytolstyk/hema/comments{/number}","issue_comment_url":"https://api.github.com/repos/ytolstyk/hema/issues/comments{/number}","contents_url":"https://api.github.com/repos/ytolstyk/hema/contents/{+path}","compare_url":"https://api.github.com/repos/ytolstyk/hema/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ytolstyk/hema/merges","archive_url":"https://api.github.com/repos/ytolstyk/hema/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ytolstyk/hema/downloads","issues_url":"https://api.github.com/repos/ytolstyk/hema/issues{/number}","pulls_url":"https://api.github.com/repos/ytolstyk/hema/pulls{/number}","milestones_url":"https://api.github.com/repos/ytolstyk/hema/milestones{/number}","notifications_url":"https://api.github.com/repos/ytolstyk/hema/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ytolstyk/hema/labels{/name}","releases_url":"https://api.github.com/repos/ytolstyk/hema/releases{/id}","created_at":"2015-07-03T15:17:39Z","updated_at":"2015-07-03T19:08:10Z","pushed_at":"2015-08-17T02:20:44Z","git_url":"git://github.com/ytolstyk/hema.git","ssh_url":"git@github.com:ytolstyk/hema.git","clone_url":"https://github.com/ytolstyk/hema.git","svn_url":"https://github.com/ytolstyk/hema","homepage":null,"size":580,"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":16,"forks":0,"open_issues":16,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ytolstyk/hema/pulls/54"},"html":{"href":"https://github.com/ytolstyk/hema/pull/54"},"issue":{"href":"https://api.github.com/repos/ytolstyk/hema/issues/54"},"comments":{"href":"https://api.github.com/repos/ytolstyk/hema/issues/54/comments"},"review_comments":{"href":"https://api.github.com/repos/ytolstyk/hema/pulls/54/comments"},"review_comment":{"href":"https://api.github.com/repos/ytolstyk/hema/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ytolstyk/hema/pulls/54/commits"},"statuses":{"href":"https://api.github.com/repos/ytolstyk/hema/statuses/14841e656c29bfb677c1aa56d2f43a791eda155a"}}}}