{"action":"created","comment":{"url":"https://api.github.com/repos/Mei152/hours_import/pulls/comments/48241593","id":48241593,"diff_hunk":"@@ -0,0 +1,25 @@\n+class UploadedFile < ActiveRecord::Base\n+  belongs_to :user\n+  belongs_to :location\n+  validates :user_id, presence: true\n+  validates :location_id, presence: true\n+  validates :file, presence: true\n+\n+  def self.import(file:, location:, user:)\n+    return false if file.nil?","path":"app/models/uploaded_file.rb","position":null,"original_position":9,"commit_id":"2636e6e2dd16e965629baaf69b43eb48a1a2b4b7","original_commit_id":"e0d045ed14db1062bc7a62edb998f5f525a26f08","user":{"login":"mkwiatkowski","id":51481,"avatar_url":"https://avatars.githubusercontent.com/u/51481?v=3","gravatar_id":"","url":"https://api.github.com/users/mkwiatkowski","html_url":"https://github.com/mkwiatkowski","followers_url":"https://api.github.com/users/mkwiatkowski/followers","following_url":"https://api.github.com/users/mkwiatkowski/following{/other_user}","gists_url":"https://api.github.com/users/mkwiatkowski/gists{/gist_id}","starred_url":"https://api.github.com/users/mkwiatkowski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkwiatkowski/subscriptions","organizations_url":"https://api.github.com/users/mkwiatkowski/orgs","repos_url":"https://api.github.com/users/mkwiatkowski/repos","events_url":"https://api.github.com/users/mkwiatkowski/events{/privacy}","received_events_url":"https://api.github.com/users/mkwiatkowski/received_events","type":"User","site_admin":false},"body":"Fair enough. As I said: it's not necessarily bad, just wanted to bring that to your attention to double check.","created_at":"2015-12-22T10:38:23Z","updated_at":"2015-12-22T10:38:23Z","html_url":"https://github.com/Mei152/hours_import/pull/19#discussion_r48241593","pull_request_url":"https://api.github.com/repos/Mei152/hours_import/pulls/19","_links":{"self":{"href":"https://api.github.com/repos/Mei152/hours_import/pulls/comments/48241593"},"html":{"href":"https://github.com/Mei152/hours_import/pull/19#discussion_r48241593"},"pull_request":{"href":"https://api.github.com/repos/Mei152/hours_import/pulls/19"}}},"pull_request":{"url":"https://api.github.com/repos/Mei152/hours_import/pulls/19","id":54180977,"html_url":"https://github.com/Mei152/hours_import/pull/19","diff_url":"https://github.com/Mei152/hours_import/pull/19.diff","patch_url":"https://github.com/Mei152/hours_import/pull/19.patch","issue_url":"https://api.github.com/repos/Mei152/hours_import/issues/19","number":19,"state":"open","locked":false,"title":"Import hours","user":{"login":"Mei152","id":11021008,"avatar_url":"https://avatars.githubusercontent.com/u/11021008?v=3","gravatar_id":"","url":"https://api.github.com/users/Mei152","html_url":"https://github.com/Mei152","followers_url":"https://api.github.com/users/Mei152/followers","following_url":"https://api.github.com/users/Mei152/following{/other_user}","gists_url":"https://api.github.com/users/Mei152/gists{/gist_id}","starred_url":"https://api.github.com/users/Mei152/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mei152/subscriptions","organizations_url":"https://api.github.com/users/Mei152/orgs","repos_url":"https://api.github.com/users/Mei152/repos","events_url":"https://api.github.com/users/Mei152/events{/privacy}","received_events_url":"https://api.github.com/users/Mei152/received_events","type":"User","site_admin":false},"body":"Styling of uploaded_files/index view needs more refinement.\r\nI would like to eventually add validation on the file's MIME type.","created_at":"2015-12-19T15:55:11Z","updated_at":"2015-12-22T10:38:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6802b7ad5c48ed0d93fc3a8fa1f9ba2b1ffc67ed","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Mei152/hours_import/pulls/19/commits","review_comments_url":"https://api.github.com/repos/Mei152/hours_import/pulls/19/comments","review_comment_url":"https://api.github.com/repos/Mei152/hours_import/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Mei152/hours_import/issues/19/comments","statuses_url":"https://api.github.com/repos/Mei152/hours_import/statuses/2636e6e2dd16e965629baaf69b43eb48a1a2b4b7","head":{"label":"Mei152:import-hours","ref":"import-hours","sha":"2636e6e2dd16e965629baaf69b43eb48a1a2b4b7","user":{"login":"Mei152","id":11021008,"avatar_url":"https://avatars.githubusercontent.com/u/11021008?v=3","gravatar_id":"","url":"https://api.github.com/users/Mei152","html_url":"https://github.com/Mei152","followers_url":"https://api.github.com/users/Mei152/followers","following_url":"https://api.github.com/users/Mei152/following{/other_user}","gists_url":"https://api.github.com/users/Mei152/gists{/gist_id}","starred_url":"https://api.github.com/users/Mei152/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mei152/subscriptions","organizations_url":"https://api.github.com/users/Mei152/orgs","repos_url":"https://api.github.com/users/Mei152/repos","events_url":"https://api.github.com/users/Mei152/events{/privacy}","received_events_url":"https://api.github.com/users/Mei152/received_events","type":"User","site_admin":false},"repo":{"id":47157834,"name":"hours_import","full_name":"Mei152/hours_import","owner":{"login":"Mei152","id":11021008,"avatar_url":"https://avatars.githubusercontent.com/u/11021008?v=3","gravatar_id":"","url":"https://api.github.com/users/Mei152","html_url":"https://github.com/Mei152","followers_url":"https://api.github.com/users/Mei152/followers","following_url":"https://api.github.com/users/Mei152/following{/other_user}","gists_url":"https://api.github.com/users/Mei152/gists{/gist_id}","starred_url":"https://api.github.com/users/Mei152/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mei152/subscriptions","organizations_url":"https://api.github.com/users/Mei152/orgs","repos_url":"https://api.github.com/users/Mei152/repos","events_url":"https://api.github.com/users/Mei152/events{/privacy}","received_events_url":"https://api.github.com/users/Mei152/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Mei152/hours_import","description":"","fork":false,"url":"https://api.github.com/repos/Mei152/hours_import","forks_url":"https://api.github.com/repos/Mei152/hours_import/forks","keys_url":"https://api.github.com/repos/Mei152/hours_import/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Mei152/hours_import/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Mei152/hours_import/teams","hooks_url":"https://api.github.com/repos/Mei152/hours_import/hooks","issue_events_url":"https://api.github.com/repos/Mei152/hours_import/issues/events{/number}","events_url":"https://api.github.com/repos/Mei152/hours_import/events","assignees_url":"https://api.github.com/repos/Mei152/hours_import/assignees{/user}","branches_url":"https://api.github.com/repos/Mei152/hours_import/branches{/branch}","tags_url":"https://api.github.com/repos/Mei152/hours_import/tags","blobs_url":"https://api.github.com/repos/Mei152/hours_import/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Mei152/hours_import/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Mei152/hours_import/git/refs{/sha}","trees_url":"https://api.github.com/repos/Mei152/hours_import/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Mei152/hours_import/statuses/{sha}","languages_url":"https://api.github.com/repos/Mei152/hours_import/languages","stargazers_url":"https://api.github.com/repos/Mei152/hours_import/stargazers","contributors_url":"https://api.github.com/repos/Mei152/hours_import/contributors","subscribers_url":"https://api.github.com/repos/Mei152/hours_import/subscribers","subscription_url":"https://api.github.com/repos/Mei152/hours_import/subscription","commits_url":"https://api.github.com/repos/Mei152/hours_import/commits{/sha}","git_commits_url":"https://api.github.com/repos/Mei152/hours_import/git/commits{/sha}","comments_url":"https://api.github.com/repos/Mei152/hours_import/comments{/number}","issue_comment_url":"https://api.github.com/repos/Mei152/hours_import/issues/comments{/number}","contents_url":"https://api.github.com/repos/Mei152/hours_import/contents/{+path}","compare_url":"https://api.github.com/repos/Mei152/hours_import/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Mei152/hours_import/merges","archive_url":"https://api.github.com/repos/Mei152/hours_import/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Mei152/hours_import/downloads","issues_url":"https://api.github.com/repos/Mei152/hours_import/issues{/number}","pulls_url":"https://api.github.com/repos/Mei152/hours_import/pulls{/number}","milestones_url":"https://api.github.com/repos/Mei152/hours_import/milestones{/number}","notifications_url":"https://api.github.com/repos/Mei152/hours_import/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Mei152/hours_import/labels{/name}","releases_url":"https://api.github.com/repos/Mei152/hours_import/releases{/id}","created_at":"2015-12-01T01:44:16Z","updated_at":"2015-12-01T03:59:20Z","pushed_at":"2015-12-22T03:36:36Z","git_url":"git://github.com/Mei152/hours_import.git","ssh_url":"git@github.com:Mei152/hours_import.git","clone_url":"https://github.com/Mei152/hours_import.git","svn_url":"https://github.com/Mei152/hours_import","homepage":null,"size":60,"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":17,"forks":0,"open_issues":17,"watchers":0,"default_branch":"master"}},"base":{"label":"Mei152:master","ref":"master","sha":"4f9f5cc0ab4e87d75682a0c8f58555eaa87f1ea8","user":{"login":"Mei152","id":11021008,"avatar_url":"https://avatars.githubusercontent.com/u/11021008?v=3","gravatar_id":"","url":"https://api.github.com/users/Mei152","html_url":"https://github.com/Mei152","followers_url":"https://api.github.com/users/Mei152/followers","following_url":"https://api.github.com/users/Mei152/following{/other_user}","gists_url":"https://api.github.com/users/Mei152/gists{/gist_id}","starred_url":"https://api.github.com/users/Mei152/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mei152/subscriptions","organizations_url":"https://api.github.com/users/Mei152/orgs","repos_url":"https://api.github.com/users/Mei152/repos","events_url":"https://api.github.com/users/Mei152/events{/privacy}","received_events_url":"https://api.github.com/users/Mei152/received_events","type":"User","site_admin":false},"repo":{"id":47157834,"name":"hours_import","full_name":"Mei152/hours_import","owner":{"login":"Mei152","id":11021008,"avatar_url":"https://avatars.githubusercontent.com/u/11021008?v=3","gravatar_id":"","url":"https://api.github.com/users/Mei152","html_url":"https://github.com/Mei152","followers_url":"https://api.github.com/users/Mei152/followers","following_url":"https://api.github.com/users/Mei152/following{/other_user}","gists_url":"https://api.github.com/users/Mei152/gists{/gist_id}","starred_url":"https://api.github.com/users/Mei152/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mei152/subscriptions","organizations_url":"https://api.github.com/users/Mei152/orgs","repos_url":"https://api.github.com/users/Mei152/repos","events_url":"https://api.github.com/users/Mei152/events{/privacy}","received_events_url":"https://api.github.com/users/Mei152/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Mei152/hours_import","description":"","fork":false,"url":"https://api.github.com/repos/Mei152/hours_import","forks_url":"https://api.github.com/repos/Mei152/hours_import/forks","keys_url":"https://api.github.com/repos/Mei152/hours_import/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Mei152/hours_import/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Mei152/hours_import/teams","hooks_url":"https://api.github.com/repos/Mei152/hours_import/hooks","issue_events_url":"https://api.github.com/repos/Mei152/hours_import/issues/events{/number}","events_url":"https://api.github.com/repos/Mei152/hours_import/events","assignees_url":"https://api.github.com/repos/Mei152/hours_import/assignees{/user}","branches_url":"https://api.github.com/repos/Mei152/hours_import/branches{/branch}","tags_url":"https://api.github.com/repos/Mei152/hours_import/tags","blobs_url":"https://api.github.com/repos/Mei152/hours_import/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Mei152/hours_import/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Mei152/hours_import/git/refs{/sha}","trees_url":"https://api.github.com/repos/Mei152/hours_import/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Mei152/hours_import/statuses/{sha}","languages_url":"https://api.github.com/repos/Mei152/hours_import/languages","stargazers_url":"https://api.github.com/repos/Mei152/hours_import/stargazers","contributors_url":"https://api.github.com/repos/Mei152/hours_import/contributors","subscribers_url":"https://api.github.com/repos/Mei152/hours_import/subscribers","subscription_url":"https://api.github.com/repos/Mei152/hours_import/subscription","commits_url":"https://api.github.com/repos/Mei152/hours_import/commits{/sha}","git_commits_url":"https://api.github.com/repos/Mei152/hours_import/git/commits{/sha}","comments_url":"https://api.github.com/repos/Mei152/hours_import/comments{/number}","issue_comment_url":"https://api.github.com/repos/Mei152/hours_import/issues/comments{/number}","contents_url":"https://api.github.com/repos/Mei152/hours_import/contents/{+path}","compare_url":"https://api.github.com/repos/Mei152/hours_import/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Mei152/hours_import/merges","archive_url":"https://api.github.com/repos/Mei152/hours_import/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Mei152/hours_import/downloads","issues_url":"https://api.github.com/repos/Mei152/hours_import/issues{/number}","pulls_url":"https://api.github.com/repos/Mei152/hours_import/pulls{/number}","milestones_url":"https://api.github.com/repos/Mei152/hours_import/milestones{/number}","notifications_url":"https://api.github.com/repos/Mei152/hours_import/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Mei152/hours_import/labels{/name}","releases_url":"https://api.github.com/repos/Mei152/hours_import/releases{/id}","created_at":"2015-12-01T01:44:16Z","updated_at":"2015-12-01T03:59:20Z","pushed_at":"2015-12-22T03:36:36Z","git_url":"git://github.com/Mei152/hours_import.git","ssh_url":"git@github.com:Mei152/hours_import.git","clone_url":"https://github.com/Mei152/hours_import.git","svn_url":"https://github.com/Mei152/hours_import","homepage":null,"size":60,"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":17,"forks":0,"open_issues":17,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Mei152/hours_import/pulls/19"},"html":{"href":"https://github.com/Mei152/hours_import/pull/19"},"issue":{"href":"https://api.github.com/repos/Mei152/hours_import/issues/19"},"comments":{"href":"https://api.github.com/repos/Mei152/hours_import/issues/19/comments"},"review_comments":{"href":"https://api.github.com/repos/Mei152/hours_import/pulls/19/comments"},"review_comment":{"href":"https://api.github.com/repos/Mei152/hours_import/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Mei152/hours_import/pulls/19/commits"},"statuses":{"href":"https://api.github.com/repos/Mei152/hours_import/statuses/2636e6e2dd16e965629baaf69b43eb48a1a2b4b7"}}}}