GitHub PullRequestReviewCommentEvent at 2014-03-27 15:54:13
Repository: GoodCleanGames
Actor: lupnix
Payload: {"comment":{"url":"https://api.github.com/repos/lupnix/GoodCleanGames/pulls/comments/11029402","id":11029402,"diff_hunk":"@@ -0,0 +1,136 @@\n+class GamesController < ApplicationController\n+  before_filter :authenticate_user!\n+  helper_method :card_image\n+  helper_method :game_types\n+\n+  def index\n+    @game_slots_sorted = GameSlot.where.not(status: GameSlot::Statuses::Over).order(status: :desc)\n+  end\n+\n+  def show\n+    game_slot = GameSlot.find(params[:id])\n+    @id = game_slot.id\n+    @players = game_slot.players\n+    @player_index = @players.index(current_user.username)\n+    @opponents = @players.select {|player| player != current_user.username}\n+\n+    respond_to do |format|\n+      format.html do\n+        if game_slot.round_results.last.try(:game_over)\n+          game_over(@id) if game_slot.status != GameSlot::Statuses::Over\n+          render :winners\n+        end\n+\n+        if game_slot.status == GameSlot::Statuses::Waiting\n+          render :waiting\n+        end\n+        @id\n+        @players\n+        @player_index\n+        @opponents\n+\n+        #remove later (to be replaced by angular)\n+        @round_results = game_slot.round_results\n+        @last_result = @round_results.last\n+      end\n+\n+      format.json do\n+         render json: {\n+           game: game_slot.game,","path":"app/controllers/games_controller.rb","position":39,"original_position":39,"commit_id":"31fc76e269966b1780f174c0b400d0d4e80fafce","original_commit_id":"31fc76e269966b1780f174c0b400d0d4e80fafce","user":{"login":"lupnix","id":5635082,"avatar_url":"https://avatars.githubusercontent.com/u/5635082?","gravatar_id":"c1cda03ddb65e5436b8e69ac868ec3eb","url":"https://api.github.com/users/lupnix","html_url":"https://github.com/lupnix","followers_url":"https://api.github.com/users/lupnix/followers","following_url":"https://api.github.com/users/lupnix/following{/other_user}","gists_url":"https://api.github.com/users/lupnix/gists{/gist_id}","starred_url":"https://api.github.com/users/lupnix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lupnix/subscriptions","organizations_url":"https://api.github.com/users/lupnix/orgs","repos_url":"https://api.github.com/users/lupnix/repos","events_url":"https://api.github.com/users/lupnix/events{/privacy}","received_events_url":"https://api.github.com/users/lupnix/received_events","type":"User","site_admin":false},"body":"What about moving it into the GameSlot and adding a few options to allow it to calculate the rest? Since most of these work of of something in GameSlot\r\n","created_at":"2014-03-27T15:54:13Z","updated_at":"2014-03-27T15:54:13Z","html_url":"https://github.com/lupnix/GoodCleanGames/pull/16#discussion_r11029402","pull_request_url":"https://api.github.com/repos/lupnix/GoodCleanGames/pulls/16","_links":{"self":{"href":"https://api.github.com/repos/lupnix/GoodCleanGames/pulls/comments/11029402"},"html":{"href":"https://github.com/lupnix/GoodCleanGames/pull/16#discussion_r11029402"},"pull_request":{"href":"https://api.github.com/repos/lupnix/GoodCleanGames/pulls/16"}}}}