{"action":"created","comment":{"url":"https://api.github.com/repos/RoadBytes/myflix/pulls/comments/33157912","id":33157912,"diff_hunk":"@@ -6,8 +6,40 @@\n       .video_info.col-sm-3\n         %header\n           %h3= @video.title\n-          %span Rating: #{@video.rating}/5.0\n+          - if @video.review_count == 0\n+            %span Rating: Not Yet Rated\n+          - else\n+            %span Rating: #{@video.average_rating}/5.0\n         %p= @video.description\n         .actions\n           %a.btn.btn-primary(href=\"\") Watch Now\n           %a.btn.btn-default(href=\"\") + My Queue\n+\n+%section.reviews.container\n+  .row\n+    .col-sm-10.col-sm-offset-1\n+      = bootstrap_form_for([@video, @review], control_col: \"col-sm-10 col-sm-offset-1\") do |f|\n+        %fieldset\n+          .row\n+            .col-sm-3\n+              - rating_values = [[\"5 Stars\", 5], [\"4 Stars\", 4], [\"3 Stars\", 3], \n+                                 [\"2 Stars\", 2], [\"1 Star\" , 1], [\"0 Stars\", 0]]\n+              = f.select(:rating, rating_values, label: \"Rate this Video\")\n+          .row\n+            .col-sm-8\n+              = f.text_area :message, label: \"Write Review\", size: \"24x6\"\n+        %fieldset.form-group.actions.clearfix\n+          = f.submit \"Submit\", class: \"btn\"\n+          = link_to \"Cancel\", video_path(@video)\n+      %header\n+        %h3 User Reviews(#{@video.review_count})\n+      %ul\n+        - if @video.review_count > 0\n+          - @video.reviews.each do |review|\n+            %article.review\n+              %li.row\n+                .col-sm-2\n+                  %span Rating: #{review.rating} / 5\n+                  %p by <a href=\"\">#{review.user.full_name}</a>","path":"app/views/videos/show.html.haml","position":39,"original_position":39,"commit_id":"c31813d84292ac03c5d2028dc0aff32d0bf8448f","original_commit_id":"c31813d84292ac03c5d2028dc0aff32d0bf8448f","user":{"login":"tomtomecek","id":7385469,"avatar_url":"https://avatars.githubusercontent.com/u/7385469?v=3","gravatar_id":"","url":"https://api.github.com/users/tomtomecek","html_url":"https://github.com/tomtomecek","followers_url":"https://api.github.com/users/tomtomecek/followers","following_url":"https://api.github.com/users/tomtomecek/following{/other_user}","gists_url":"https://api.github.com/users/tomtomecek/gists{/gist_id}","starred_url":"https://api.github.com/users/tomtomecek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomtomecek/subscriptions","organizations_url":"https://api.github.com/users/tomtomecek/orgs","repos_url":"https://api.github.com/users/tomtomecek/repos","events_url":"https://api.github.com/users/tomtomecek/events{/privacy}","received_events_url":"https://api.github.com/users/tomtomecek/received_events","type":"User","site_admin":false},"body":"This could be a `link_to` :)","created_at":"2015-06-24T15:13:14Z","updated_at":"2015-06-24T15:13:14Z","html_url":"https://github.com/RoadBytes/myflix/pull/4#discussion_r33157912","pull_request_url":"https://api.github.com/repos/RoadBytes/myflix/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/RoadBytes/myflix/pulls/comments/33157912"},"html":{"href":"https://github.com/RoadBytes/myflix/pull/4#discussion_r33157912"},"pull_request":{"href":"https://api.github.com/repos/RoadBytes/myflix/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/RoadBytes/myflix/pulls/4","id":38413064,"html_url":"https://github.com/RoadBytes/myflix/pull/4","diff_url":"https://github.com/RoadBytes/myflix/pull/4.diff","patch_url":"https://github.com/RoadBytes/myflix/pull/4.patch","issue_url":"https://api.github.com/repos/RoadBytes/myflix/issues/4","number":4,"state":"open","locked":false,"title":"Adding review features","user":{"login":"RoadBytes","id":6753275,"avatar_url":"https://avatars.githubusercontent.com/u/6753275?v=3","gravatar_id":"","url":"https://api.github.com/users/RoadBytes","html_url":"https://github.com/RoadBytes","followers_url":"https://api.github.com/users/RoadBytes/followers","following_url":"https://api.github.com/users/RoadBytes/following{/other_user}","gists_url":"https://api.github.com/users/RoadBytes/gists{/gist_id}","starred_url":"https://api.github.com/users/RoadBytes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RoadBytes/subscriptions","organizations_url":"https://api.github.com/users/RoadBytes/orgs","repos_url":"https://api.github.com/users/RoadBytes/repos","events_url":"https://api.github.com/users/RoadBytes/events{/privacy}","received_events_url":"https://api.github.com/users/RoadBytes/received_events","type":"User","site_admin":false},"body":"I'll work on committing more, but this is my code for now.  Cheers!","created_at":"2015-06-24T07:02:56Z","updated_at":"2015-06-24T15:13:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f8819d89906b7d1ea2069676fd7eae858cc1f4b7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/RoadBytes/myflix/pulls/4/commits","review_comments_url":"https://api.github.com/repos/RoadBytes/myflix/pulls/4/comments","review_comment_url":"https://api.github.com/repos/RoadBytes/myflix/pulls/comments{/number}","comments_url":"https://api.github.com/repos/RoadBytes/myflix/issues/4/comments","statuses_url":"https://api.github.com/repos/RoadBytes/myflix/statuses/c31813d84292ac03c5d2028dc0aff32d0bf8448f","head":{"label":"RoadBytes:adding_review_features","ref":"adding_review_features","sha":"c31813d84292ac03c5d2028dc0aff32d0bf8448f","user":{"login":"RoadBytes","id":6753275,"avatar_url":"https://avatars.githubusercontent.com/u/6753275?v=3","gravatar_id":"","url":"https://api.github.com/users/RoadBytes","html_url":"https://github.com/RoadBytes","followers_url":"https://api.github.com/users/RoadBytes/followers","following_url":"https://api.github.com/users/RoadBytes/following{/other_user}","gists_url":"https://api.github.com/users/RoadBytes/gists{/gist_id}","starred_url":"https://api.github.com/users/RoadBytes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RoadBytes/subscriptions","organizations_url":"https://api.github.com/users/RoadBytes/orgs","repos_url":"https://api.github.com/users/RoadBytes/repos","events_url":"https://api.github.com/users/RoadBytes/events{/privacy}","received_events_url":"https://api.github.com/users/RoadBytes/received_events","type":"User","site_admin":false},"repo":{"id":36588755,"name":"myflix","full_name":"RoadBytes/myflix","owner":{"login":"RoadBytes","id":6753275,"avatar_url":"https://avatars.githubusercontent.com/u/6753275?v=3","gravatar_id":"","url":"https://api.github.com/users/RoadBytes","html_url":"https://github.com/RoadBytes","followers_url":"https://api.github.com/users/RoadBytes/followers","following_url":"https://api.github.com/users/RoadBytes/following{/other_user}","gists_url":"https://api.github.com/users/RoadBytes/gists{/gist_id}","starred_url":"https://api.github.com/users/RoadBytes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RoadBytes/subscriptions","organizations_url":"https://api.github.com/users/RoadBytes/orgs","repos_url":"https://api.github.com/users/RoadBytes/repos","events_url":"https://api.github.com/users/RoadBytes/events{/privacy}","received_events_url":"https://api.github.com/users/RoadBytes/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/RoadBytes/myflix","description":"","fork":false,"url":"https://api.github.com/repos/RoadBytes/myflix","forks_url":"https://api.github.com/repos/RoadBytes/myflix/forks","keys_url":"https://api.github.com/repos/RoadBytes/myflix/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RoadBytes/myflix/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RoadBytes/myflix/teams","hooks_url":"https://api.github.com/repos/RoadBytes/myflix/hooks","issue_events_url":"https://api.github.com/repos/RoadBytes/myflix/issues/events{/number}","events_url":"https://api.github.com/repos/RoadBytes/myflix/events","assignees_url":"https://api.github.com/repos/RoadBytes/myflix/assignees{/user}","branches_url":"https://api.github.com/repos/RoadBytes/myflix/branches{/branch}","tags_url":"https://api.github.com/repos/RoadBytes/myflix/tags","blobs_url":"https://api.github.com/repos/RoadBytes/myflix/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RoadBytes/myflix/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RoadBytes/myflix/git/refs{/sha}","trees_url":"https://api.github.com/repos/RoadBytes/myflix/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RoadBytes/myflix/statuses/{sha}","languages_url":"https://api.github.com/repos/RoadBytes/myflix/languages","stargazers_url":"https://api.github.com/repos/RoadBytes/myflix/stargazers","contributors_url":"https://api.github.com/repos/RoadBytes/myflix/contributors","subscribers_url":"https://api.github.com/repos/RoadBytes/myflix/subscribers","subscription_url":"https://api.github.com/repos/RoadBytes/myflix/subscription","commits_url":"https://api.github.com/repos/RoadBytes/myflix/commits{/sha}","git_commits_url":"https://api.github.com/repos/RoadBytes/myflix/git/commits{/sha}","comments_url":"https://api.github.com/repos/RoadBytes/myflix/comments{/number}","issue_comment_url":"https://api.github.com/repos/RoadBytes/myflix/issues/comments{/number}","contents_url":"https://api.github.com/repos/RoadBytes/myflix/contents/{+path}","compare_url":"https://api.github.com/repos/RoadBytes/myflix/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RoadBytes/myflix/merges","archive_url":"https://api.github.com/repos/RoadBytes/myflix/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RoadBytes/myflix/downloads","issues_url":"https://api.github.com/repos/RoadBytes/myflix/issues{/number}","pulls_url":"https://api.github.com/repos/RoadBytes/myflix/pulls{/number}","milestones_url":"https://api.github.com/repos/RoadBytes/myflix/milestones{/number}","notifications_url":"https://api.github.com/repos/RoadBytes/myflix/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RoadBytes/myflix/labels{/name}","releases_url":"https://api.github.com/repos/RoadBytes/myflix/releases{/id}","created_at":"2015-05-31T05:04:08Z","updated_at":"2015-06-11T10:54:47Z","pushed_at":"2015-06-24T07:02:56Z","git_url":"git://github.com/RoadBytes/myflix.git","ssh_url":"git@github.com:RoadBytes/myflix.git","clone_url":"https://github.com/RoadBytes/myflix.git","svn_url":"https://github.com/RoadBytes/myflix","homepage":null,"size":392,"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":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"RoadBytes:master","ref":"master","sha":"c778722e3e3f4f2efdea323bf591de9a5e8478ec","user":{"login":"RoadBytes","id":6753275,"avatar_url":"https://avatars.githubusercontent.com/u/6753275?v=3","gravatar_id":"","url":"https://api.github.com/users/RoadBytes","html_url":"https://github.com/RoadBytes","followers_url":"https://api.github.com/users/RoadBytes/followers","following_url":"https://api.github.com/users/RoadBytes/following{/other_user}","gists_url":"https://api.github.com/users/RoadBytes/gists{/gist_id}","starred_url":"https://api.github.com/users/RoadBytes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RoadBytes/subscriptions","organizations_url":"https://api.github.com/users/RoadBytes/orgs","repos_url":"https://api.github.com/users/RoadBytes/repos","events_url":"https://api.github.com/users/RoadBytes/events{/privacy}","received_events_url":"https://api.github.com/users/RoadBytes/received_events","type":"User","site_admin":false},"repo":{"id":36588755,"name":"myflix","full_name":"RoadBytes/myflix","owner":{"login":"RoadBytes","id":6753275,"avatar_url":"https://avatars.githubusercontent.com/u/6753275?v=3","gravatar_id":"","url":"https://api.github.com/users/RoadBytes","html_url":"https://github.com/RoadBytes","followers_url":"https://api.github.com/users/RoadBytes/followers","following_url":"https://api.github.com/users/RoadBytes/following{/other_user}","gists_url":"https://api.github.com/users/RoadBytes/gists{/gist_id}","starred_url":"https://api.github.com/users/RoadBytes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RoadBytes/subscriptions","organizations_url":"https://api.github.com/users/RoadBytes/orgs","repos_url":"https://api.github.com/users/RoadBytes/repos","events_url":"https://api.github.com/users/RoadBytes/events{/privacy}","received_events_url":"https://api.github.com/users/RoadBytes/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/RoadBytes/myflix","description":"","fork":false,"url":"https://api.github.com/repos/RoadBytes/myflix","forks_url":"https://api.github.com/repos/RoadBytes/myflix/forks","keys_url":"https://api.github.com/repos/RoadBytes/myflix/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RoadBytes/myflix/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RoadBytes/myflix/teams","hooks_url":"https://api.github.com/repos/RoadBytes/myflix/hooks","issue_events_url":"https://api.github.com/repos/RoadBytes/myflix/issues/events{/number}","events_url":"https://api.github.com/repos/RoadBytes/myflix/events","assignees_url":"https://api.github.com/repos/RoadBytes/myflix/assignees{/user}","branches_url":"https://api.github.com/repos/RoadBytes/myflix/branches{/branch}","tags_url":"https://api.github.com/repos/RoadBytes/myflix/tags","blobs_url":"https://api.github.com/repos/RoadBytes/myflix/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RoadBytes/myflix/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RoadBytes/myflix/git/refs{/sha}","trees_url":"https://api.github.com/repos/RoadBytes/myflix/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RoadBytes/myflix/statuses/{sha}","languages_url":"https://api.github.com/repos/RoadBytes/myflix/languages","stargazers_url":"https://api.github.com/repos/RoadBytes/myflix/stargazers","contributors_url":"https://api.github.com/repos/RoadBytes/myflix/contributors","subscribers_url":"https://api.github.com/repos/RoadBytes/myflix/subscribers","subscription_url":"https://api.github.com/repos/RoadBytes/myflix/subscription","commits_url":"https://api.github.com/repos/RoadBytes/myflix/commits{/sha}","git_commits_url":"https://api.github.com/repos/RoadBytes/myflix/git/commits{/sha}","comments_url":"https://api.github.com/repos/RoadBytes/myflix/comments{/number}","issue_comment_url":"https://api.github.com/repos/RoadBytes/myflix/issues/comments{/number}","contents_url":"https://api.github.com/repos/RoadBytes/myflix/contents/{+path}","compare_url":"https://api.github.com/repos/RoadBytes/myflix/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RoadBytes/myflix/merges","archive_url":"https://api.github.com/repos/RoadBytes/myflix/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RoadBytes/myflix/downloads","issues_url":"https://api.github.com/repos/RoadBytes/myflix/issues{/number}","pulls_url":"https://api.github.com/repos/RoadBytes/myflix/pulls{/number}","milestones_url":"https://api.github.com/repos/RoadBytes/myflix/milestones{/number}","notifications_url":"https://api.github.com/repos/RoadBytes/myflix/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RoadBytes/myflix/labels{/name}","releases_url":"https://api.github.com/repos/RoadBytes/myflix/releases{/id}","created_at":"2015-05-31T05:04:08Z","updated_at":"2015-06-11T10:54:47Z","pushed_at":"2015-06-24T07:02:56Z","git_url":"git://github.com/RoadBytes/myflix.git","ssh_url":"git@github.com:RoadBytes/myflix.git","clone_url":"https://github.com/RoadBytes/myflix.git","svn_url":"https://github.com/RoadBytes/myflix","homepage":null,"size":392,"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":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/RoadBytes/myflix/pulls/4"},"html":{"href":"https://github.com/RoadBytes/myflix/pull/4"},"issue":{"href":"https://api.github.com/repos/RoadBytes/myflix/issues/4"},"comments":{"href":"https://api.github.com/repos/RoadBytes/myflix/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/RoadBytes/myflix/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/RoadBytes/myflix/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/RoadBytes/myflix/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/RoadBytes/myflix/statuses/c31813d84292ac03c5d2028dc0aff32d0bf8448f"}}}}