Skip to content

Instantly share code, notes, and snippets.

@JFickel
Last active December 25, 2015 13:19
Show Gist options
  • Save JFickel/6982363 to your computer and use it in GitHub Desktop.
Save JFickel/6982363 to your computer and use it in GitHub Desktop.
Started PUT "/tournaments/1" for 127.0.0.1 at 2013-10-14 14:13:24 -0700
Processing by TournamentsController#update as */*
Parameters: {"position"=>["0", "0", "1"], "id"=>"1"}
User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
Tournament Load (0.4ms) SELECT "tournaments".* FROM "tournaments" WHERE "tournaments"."id" = $1 LIMIT 1 [["id", "1"]]
UserShowing Load (0.6ms) SELECT "user_showings".* FROM "user_showings" WHERE "user_showings"."match_id" = $1 [["match_id", 1]]
User Load (0.6ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 3]]
(0.3ms) BEGIN
SQL (0.4ms) INSERT INTO "matches" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", Mon, 14 Oct 2013 21:13:24 UTC +00:00], ["updated_at", Mon, 14 Oct 2013 21:13:24 UTC +00:00]]
(1.9ms) COMMIT
(0.3ms) BEGIN
SQL (0.4ms) INSERT INTO "user_showings" ("created_at", "match_id", "top", "updated_at", "user_id") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 14 Oct 2013 21:13:24 UTC +00:00], ["match_id", 5], ["top", true], ["updated_at", Mon, 14 Oct 2013 21:13:24 UTC +00:00], ["user_id", 3]]
(0.3ms) COMMIT
(0.1ms) BEGIN
SQL (0.7ms) UPDATE "matches" SET "tournament_id" = $1, "updated_at" = $2 WHERE "matches"."id" = 5 [["tournament_id", 1], ["updated_at", Mon, 14 Oct 2013 21:13:24 UTC +00:00]]
(0.3ms) COMMIT
/Users/jamesfickel/Desktop/projects/gameway/app/models/tournament.rb:80
debugger;1
[75, 84] in /Users/jamesfickel/Desktop/projects/gameway/app/models/tournament.rb
75 self.bracket[position[0]+1][position[0][1]/2] = m
76 self.matches << m
77 else
78 new_match.user_showings.push new_showing
79 end
=> 80 debugger;1
81 self.save
82 end
83 end
(rdb:1) request
*** NameError Exception: undefined local variable or method `request' for #<Tournament:0x007fc054cda430>
(rdb:1) match
#<Match id: 1, tournament_id: 1, created_at: "2013-10-14 21:11:45", updated_at: "2013-10-14 21:11:45">
(rdb:1) new_match
nil
(rdb:1) m
#<Match id: 5, tournament_id: 1, created_at: "2013-10-14 21:13:24", updated_at: "2013-10-14 21:13:24">
(rdb:1) new_showing
#<UserShowing id: 8, user_id: 3, match_id: 5, top: true, created_at: "2013-10-14 21:13:24", updated_at: "2013-10-14 21:13:24">
(rdb:1) c
(0.3ms) BEGIN
SQL (0.7ms) UPDATE "tournaments" SET "updated_at" = $1, "bracket" = $2 WHERE "tournaments"."id" = 1 [["updated_at", Mon, 14 Oct 2013 21:14:55 UTC +00:00], ["bracket", "---\n- - !ruby/object:Match\n attributes:\n id: 1\n tournament_id: 1\n created_at: 2013-10-14 21:11:45.952812000 Z\n updated_at: 2013-10-14 21:11:45.983421000 Z\n - !ruby/object:Match\n attributes:\n id: 2\n tournament_id: 1\n created_at: 2013-10-14 21:11:45.985868000 Z\n updated_at: 2013-10-14 21:11:45.990590000 Z\n - !ruby/object:Match\n attributes:\n id: 3\n tournament_id: 1\n created_at: 2013-10-14 21:11:45.992058000 Z\n updated_at: 2013-10-14 21:11:45.995877000 Z\n - \n- - !ruby/object:Match\n attributes:\n id: 5\n tournament_id: 1\n created_at: 2013-10-14 21:13:24.217184000 Z\n updated_at: 2013-10-14 21:13:24.225457000 Z\n - !ruby/object:Match\n attributes:\n id: 4\n tournament_id: 1\n created_at: 2013-10-14 21:11:45.998617000 Z\n updated_at: 2013-10-14 21:11:46.002428000 Z\n- - \n- - \n"]]
(1.9ms) COMMIT
Redirected to http://localhost:3000/tournaments/1
Completed 302 Found in 90867ms (ActiveRecord: 10.1ms)
Started PUT "/tournaments/1" for 127.0.0.1 at 2013-10-14 14:14:55 -0700
Processing by TournamentsController#update as */*
Parameters: {"position"=>["0", "0", "1"], "id"=>"1"}
User Load (0.6ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
Tournament Load (0.4ms) SELECT "tournaments".* FROM "tournaments" WHERE "tournaments"."id" = $1 LIMIT 1 [["id", "1"]]
UserShowing Load (0.4ms) SELECT "user_showings".* FROM "user_showings" WHERE "user_showings"."match_id" = $1 [["match_id", 1]]
User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 3]]
(0.2ms) BEGIN
SQL (0.5ms) INSERT INTO "user_showings" ("created_at", "match_id", "top", "updated_at", "user_id") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Mon, 14 Oct 2013 21:14:55 UTC +00:00], ["match_id", 5], ["top", true], ["updated_at", Mon, 14 Oct 2013 21:14:55 UTC +00:00], ["user_id", 3]]
(0.4ms) COMMIT
/Users/jamesfickel/Desktop/projects/gameway/app/models/tournament.rb:80
debugger;1
[75, 84] in /Users/jamesfickel/Desktop/projects/gameway/app/models/tournament.rb
75 self.bracket[position[0]+1][position[0][1]/2] = m
76 self.matches << m
77 else
78 new_match.user_showings.push new_showing
79 end
=> 80 debugger;1
81 self.save
82 end
83 end
(rdb:1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment