{"action":"created","comment":{"url":"https://api.github.com/repos/case-eee/bike-share/pulls/comments/93129058","pull_request_review_id":13651305,"id":93129058,"diff_hunk":"@@ -0,0 +1,114 @@\n+require_relative \"date_formater\"\n+\n+class Condition < ActiveRecord::Base\n+  include DateFormat\n+  has_many :trips, class_name: \"Trip\", primary_key: \"date\", foreign_key: \"start_date\"\n+\n+  validates :date,\n+            :max_temperature_f,\n+            :mean_temperature_f,\n+            :min_temperature_f,\n+            :mean_humidity,\n+            :mean_visibility_miles,\n+            :max_wind_speed_mph,\n+            :precipitation_inches,\n+              presence: true\n+\n+  def self.write(condition_details)\n+    find_or_create_by(condition_details)\n+  end\n+\n+  def self.days_with_high_temps_in(range)\n+    where(max_temperature_f: range)\n+  end\n+\n+  def self.grouped_by_date_number_of_trips\n+    joins(:trips).group(:date).count(\"id\")\n+  end\n+\n+  def self.grouped_days_in_range_max_temp(range)\n+    days_with_high_temps_in(range).joins(:trips).group(:date).count(\"id\")\n+  end\n+\n+  def self.average_number_of_rides_in_range_max_temp(range)","path":"app/models/condition.rb","position":33,"original_position":33,"commit_id":"b6ce2fc24a0d8a336ea18201cbd6fcacc739c715","original_commit_id":"b6ce2fc24a0d8a336ea18201cbd6fcacc739c715","user":{"login":"Laszlo-JFLMTCO","id":18202283,"avatar_url":"https://avatars.githubusercontent.com/u/18202283?v=3","gravatar_id":"","url":"https://api.github.com/users/Laszlo-JFLMTCO","html_url":"https://github.com/Laszlo-JFLMTCO","followers_url":"https://api.github.com/users/Laszlo-JFLMTCO/followers","following_url":"https://api.github.com/users/Laszlo-JFLMTCO/following{/other_user}","gists_url":"https://api.github.com/users/Laszlo-JFLMTCO/gists{/gist_id}","starred_url":"https://api.github.com/users/Laszlo-JFLMTCO/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Laszlo-JFLMTCO/subscriptions","organizations_url":"https://api.github.com/users/Laszlo-JFLMTCO/orgs","repos_url":"https://api.github.com/users/Laszlo-JFLMTCO/repos","events_url":"https://api.github.com/users/Laszlo-JFLMTCO/events{/privacy}","received_events_url":"https://api.github.com/users/Laszlo-JFLMTCO/received_events","type":"User","site_admin":false},"body":"Thank you @case-eee it is clear now. Tagging @MarisaMBurton @wlffann and @Sh1pley to make sure they see this thread.","created_at":"2016-12-19T22:00:55Z","updated_at":"2016-12-19T22:00:56Z","html_url":"https://github.com/case-eee/bike-share/pull/27#discussion_r93129058","pull_request_url":"https://api.github.com/repos/case-eee/bike-share/pulls/27","_links":{"self":{"href":"https://api.github.com/repos/case-eee/bike-share/pulls/comments/93129058"},"html":{"href":"https://github.com/case-eee/bike-share/pull/27#discussion_r93129058"},"pull_request":{"href":"https://api.github.com/repos/case-eee/bike-share/pulls/27"}}},"pull_request":{"url":"https://api.github.com/repos/case-eee/bike-share/pulls/27","id":98348586,"html_url":"https://github.com/case-eee/bike-share/pull/27","diff_url":"https://github.com/case-eee/bike-share/pull/27.diff","patch_url":"https://github.com/case-eee/bike-share/pull/27.patch","issue_url":"https://api.github.com/repos/case-eee/bike-share/issues/27","number":27,"state":"open","locked":false,"title":"Feedback PR only","user":{"login":"case-eee","id":6503717,"avatar_url":"https://avatars.githubusercontent.com/u/6503717?v=3","gravatar_id":"","url":"https://api.github.com/users/case-eee","html_url":"https://github.com/case-eee","followers_url":"https://api.github.com/users/case-eee/followers","following_url":"https://api.github.com/users/case-eee/following{/other_user}","gists_url":"https://api.github.com/users/case-eee/gists{/gist_id}","starred_url":"https://api.github.com/users/case-eee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/case-eee/subscriptions","organizations_url":"https://api.github.com/users/case-eee/orgs","repos_url":"https://api.github.com/users/case-eee/repos","events_url":"https://api.github.com/users/case-eee/events{/privacy}","received_events_url":"https://api.github.com/users/case-eee/received_events","type":"User","site_admin":false},"body":"**do not merge**","created_at":"2016-12-16T15:01:12Z","updated_at":"2016-12-19T22:00:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c30b98fcb9a578779ea1495947c90019a80093ab","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/case-eee/bike-share/pulls/27/commits","review_comments_url":"https://api.github.com/repos/case-eee/bike-share/pulls/27/comments","review_comment_url":"https://api.github.com/repos/case-eee/bike-share/pulls/comments{/number}","comments_url":"https://api.github.com/repos/case-eee/bike-share/issues/27/comments","statuses_url":"https://api.github.com/repos/case-eee/bike-share/statuses/b6ce2fc24a0d8a336ea18201cbd6fcacc739c715","head":{"label":"Sh1pley:master","ref":"master","sha":"b6ce2fc24a0d8a336ea18201cbd6fcacc739c715","user":{"login":"Sh1pley","id":12022194,"avatar_url":"https://avatars.githubusercontent.com/u/12022194?v=3","gravatar_id":"","url":"https://api.github.com/users/Sh1pley","html_url":"https://github.com/Sh1pley","followers_url":"https://api.github.com/users/Sh1pley/followers","following_url":"https://api.github.com/users/Sh1pley/following{/other_user}","gists_url":"https://api.github.com/users/Sh1pley/gists{/gist_id}","starred_url":"https://api.github.com/users/Sh1pley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sh1pley/subscriptions","organizations_url":"https://api.github.com/users/Sh1pley/orgs","repos_url":"https://api.github.com/users/Sh1pley/repos","events_url":"https://api.github.com/users/Sh1pley/events{/privacy}","received_events_url":"https://api.github.com/users/Sh1pley/received_events","type":"User","site_admin":false},"repo":{"id":75360897,"name":"bike-share","full_name":"Sh1pley/bike-share","owner":{"login":"Sh1pley","id":12022194,"avatar_url":"https://avatars.githubusercontent.com/u/12022194?v=3","gravatar_id":"","url":"https://api.github.com/users/Sh1pley","html_url":"https://github.com/Sh1pley","followers_url":"https://api.github.com/users/Sh1pley/followers","following_url":"https://api.github.com/users/Sh1pley/following{/other_user}","gists_url":"https://api.github.com/users/Sh1pley/gists{/gist_id}","starred_url":"https://api.github.com/users/Sh1pley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sh1pley/subscriptions","organizations_url":"https://api.github.com/users/Sh1pley/orgs","repos_url":"https://api.github.com/users/Sh1pley/repos","events_url":"https://api.github.com/users/Sh1pley/events{/privacy}","received_events_url":"https://api.github.com/users/Sh1pley/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Sh1pley/bike-share","description":null,"fork":true,"url":"https://api.github.com/repos/Sh1pley/bike-share","forks_url":"https://api.github.com/repos/Sh1pley/bike-share/forks","keys_url":"https://api.github.com/repos/Sh1pley/bike-share/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Sh1pley/bike-share/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Sh1pley/bike-share/teams","hooks_url":"https://api.github.com/repos/Sh1pley/bike-share/hooks","issue_events_url":"https://api.github.com/repos/Sh1pley/bike-share/issues/events{/number}","events_url":"https://api.github.com/repos/Sh1pley/bike-share/events","assignees_url":"https://api.github.com/repos/Sh1pley/bike-share/assignees{/user}","branches_url":"https://api.github.com/repos/Sh1pley/bike-share/branches{/branch}","tags_url":"https://api.github.com/repos/Sh1pley/bike-share/tags","blobs_url":"https://api.github.com/repos/Sh1pley/bike-share/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Sh1pley/bike-share/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Sh1pley/bike-share/git/refs{/sha}","trees_url":"https://api.github.com/repos/Sh1pley/bike-share/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Sh1pley/bike-share/statuses/{sha}","languages_url":"https://api.github.com/repos/Sh1pley/bike-share/languages","stargazers_url":"https://api.github.com/repos/Sh1pley/bike-share/stargazers","contributors_url":"https://api.github.com/repos/Sh1pley/bike-share/contributors","subscribers_url":"https://api.github.com/repos/Sh1pley/bike-share/subscribers","subscription_url":"https://api.github.com/repos/Sh1pley/bike-share/subscription","commits_url":"https://api.github.com/repos/Sh1pley/bike-share/commits{/sha}","git_commits_url":"https://api.github.com/repos/Sh1pley/bike-share/git/commits{/sha}","comments_url":"https://api.github.com/repos/Sh1pley/bike-share/comments{/number}","issue_comment_url":"https://api.github.com/repos/Sh1pley/bike-share/issues/comments{/number}","contents_url":"https://api.github.com/repos/Sh1pley/bike-share/contents/{+path}","compare_url":"https://api.github.com/repos/Sh1pley/bike-share/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Sh1pley/bike-share/merges","archive_url":"https://api.github.com/repos/Sh1pley/bike-share/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Sh1pley/bike-share/downloads","issues_url":"https://api.github.com/repos/Sh1pley/bike-share/issues{/number}","pulls_url":"https://api.github.com/repos/Sh1pley/bike-share/pulls{/number}","milestones_url":"https://api.github.com/repos/Sh1pley/bike-share/milestones{/number}","notifications_url":"https://api.github.com/repos/Sh1pley/bike-share/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Sh1pley/bike-share/labels{/name}","releases_url":"https://api.github.com/repos/Sh1pley/bike-share/releases{/id}","deployments_url":"https://api.github.com/repos/Sh1pley/bike-share/deployments","created_at":"2016-12-02T04:33:42Z","updated_at":"2016-12-02T23:05:07Z","pushed_at":"2016-12-08T15:58:41Z","git_url":"git://github.com/Sh1pley/bike-share.git","ssh_url":"git@github.com:Sh1pley/bike-share.git","clone_url":"https://github.com/Sh1pley/bike-share.git","svn_url":"https://github.com/Sh1pley/bike-share","homepage":null,"size":5662,"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":35,"forks":0,"open_issues":35,"watchers":0,"default_branch":"master"}},"base":{"label":"case-eee:master","ref":"master","sha":"be9483746473e8373b11076c85b7be02da4581c9","user":{"login":"case-eee","id":6503717,"avatar_url":"https://avatars.githubusercontent.com/u/6503717?v=3","gravatar_id":"","url":"https://api.github.com/users/case-eee","html_url":"https://github.com/case-eee","followers_url":"https://api.github.com/users/case-eee/followers","following_url":"https://api.github.com/users/case-eee/following{/other_user}","gists_url":"https://api.github.com/users/case-eee/gists{/gist_id}","starred_url":"https://api.github.com/users/case-eee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/case-eee/subscriptions","organizations_url":"https://api.github.com/users/case-eee/orgs","repos_url":"https://api.github.com/users/case-eee/repos","events_url":"https://api.github.com/users/case-eee/events{/privacy}","received_events_url":"https://api.github.com/users/case-eee/received_events","type":"User","site_admin":false},"repo":{"id":75223904,"name":"bike-share","full_name":"case-eee/bike-share","owner":{"login":"case-eee","id":6503717,"avatar_url":"https://avatars.githubusercontent.com/u/6503717?v=3","gravatar_id":"","url":"https://api.github.com/users/case-eee","html_url":"https://github.com/case-eee","followers_url":"https://api.github.com/users/case-eee/followers","following_url":"https://api.github.com/users/case-eee/following{/other_user}","gists_url":"https://api.github.com/users/case-eee/gists{/gist_id}","starred_url":"https://api.github.com/users/case-eee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/case-eee/subscriptions","organizations_url":"https://api.github.com/users/case-eee/orgs","repos_url":"https://api.github.com/users/case-eee/repos","events_url":"https://api.github.com/users/case-eee/events{/privacy}","received_events_url":"https://api.github.com/users/case-eee/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/case-eee/bike-share","description":null,"fork":false,"url":"https://api.github.com/repos/case-eee/bike-share","forks_url":"https://api.github.com/repos/case-eee/bike-share/forks","keys_url":"https://api.github.com/repos/case-eee/bike-share/keys{/key_id}","collaborators_url":"https://api.github.com/repos/case-eee/bike-share/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/case-eee/bike-share/teams","hooks_url":"https://api.github.com/repos/case-eee/bike-share/hooks","issue_events_url":"https://api.github.com/repos/case-eee/bike-share/issues/events{/number}","events_url":"https://api.github.com/repos/case-eee/bike-share/events","assignees_url":"https://api.github.com/repos/case-eee/bike-share/assignees{/user}","branches_url":"https://api.github.com/repos/case-eee/bike-share/branches{/branch}","tags_url":"https://api.github.com/repos/case-eee/bike-share/tags","blobs_url":"https://api.github.com/repos/case-eee/bike-share/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/case-eee/bike-share/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/case-eee/bike-share/git/refs{/sha}","trees_url":"https://api.github.com/repos/case-eee/bike-share/git/trees{/sha}","statuses_url":"https://api.github.com/repos/case-eee/bike-share/statuses/{sha}","languages_url":"https://api.github.com/repos/case-eee/bike-share/languages","stargazers_url":"https://api.github.com/repos/case-eee/bike-share/stargazers","contributors_url":"https://api.github.com/repos/case-eee/bike-share/contributors","subscribers_url":"https://api.github.com/repos/case-eee/bike-share/subscribers","subscription_url":"https://api.github.com/repos/case-eee/bike-share/subscription","commits_url":"https://api.github.com/repos/case-eee/bike-share/commits{/sha}","git_commits_url":"https://api.github.com/repos/case-eee/bike-share/git/commits{/sha}","comments_url":"https://api.github.com/repos/case-eee/bike-share/comments{/number}","issue_comment_url":"https://api.github.com/repos/case-eee/bike-share/issues/comments{/number}","contents_url":"https://api.github.com/repos/case-eee/bike-share/contents/{+path}","compare_url":"https://api.github.com/repos/case-eee/bike-share/compare/{base}...{head}","merges_url":"https://api.github.com/repos/case-eee/bike-share/merges","archive_url":"https://api.github.com/repos/case-eee/bike-share/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/case-eee/bike-share/downloads","issues_url":"https://api.github.com/repos/case-eee/bike-share/issues{/number}","pulls_url":"https://api.github.com/repos/case-eee/bike-share/pulls{/number}","milestones_url":"https://api.github.com/repos/case-eee/bike-share/milestones{/number}","notifications_url":"https://api.github.com/repos/case-eee/bike-share/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/case-eee/bike-share/labels{/name}","releases_url":"https://api.github.com/repos/case-eee/bike-share/releases{/id}","deployments_url":"https://api.github.com/repos/case-eee/bike-share/deployments","created_at":"2016-11-30T20:22:37Z","updated_at":"2016-11-30T20:31:21Z","pushed_at":"2016-12-16T15:01:27Z","git_url":"git://github.com/case-eee/bike-share.git","ssh_url":"git@github.com:case-eee/bike-share.git","clone_url":"https://github.com/case-eee/bike-share.git","svn_url":"https://github.com/case-eee/bike-share","homepage":null,"size":19,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"open_issues_count":6,"forks":9,"open_issues":6,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/case-eee/bike-share/pulls/27"},"html":{"href":"https://github.com/case-eee/bike-share/pull/27"},"issue":{"href":"https://api.github.com/repos/case-eee/bike-share/issues/27"},"comments":{"href":"https://api.github.com/repos/case-eee/bike-share/issues/27/comments"},"review_comments":{"href":"https://api.github.com/repos/case-eee/bike-share/pulls/27/comments"},"review_comment":{"href":"https://api.github.com/repos/case-eee/bike-share/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/case-eee/bike-share/pulls/27/commits"},"statuses":{"href":"https://api.github.com/repos/case-eee/bike-share/statuses/b6ce2fc24a0d8a336ea18201cbd6fcacc739c715"}}}}
{"actor":{"display_login":"Laszlo-JFLMTCO"}}