(0.3ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-15 14:42:42.649344"], ["updated_at", "2014-03-15 14:42:42.649344"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-15 14:42:42.696119"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-15 14:42:42.696119"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-15 14:42:42.699719"], ["updated_at", "2014-03-15 14:42:42.699719"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-15 14:42:42.734539"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-15 14:42:42.734539"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 30ms (ActiveRecord: 1.1ms)  (0.1ms) SELECT COUNT(*) FROM "gamification_rewards"  (1.9ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-15 14:42:42.741348"], ["updated_at", "2014-03-15 14:42:42.741348"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-15 14:42:42.744050"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-15 14:42:42.744050"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-15 14:42:42.746632"], ["updated_at", "2014-03-15 14:42:42.746632"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-15 14:42:42.753616"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-15 14:42:42.753616"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 6ms (ActiveRecord: 0.5ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-15 14:42:42.757648"], ["points", 1], ["updated_at", "2014-03-15 14:42:42.757648"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-15 14:42:42.758974"], ["updated_at", "2014-03-15 14:42:42.758974"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-15 14:42:42.764670"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-15 14:42:42.764670"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 5ms (ActiveRecord: 0.4ms)  (0.1ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.5ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-15 14:42:42.768549"], ["points", 1], ["updated_at", "2014-03-15 14:42:42.768549"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-15 14:42:42.769902"], ["updated_at", "2014-03-15 14:42:42.769902"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-15 14:42:42.775679"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-15 14:42:42.775679"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 5ms (ActiveRecord: 0.4ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-15 14:42:42.779993"], ["updated_at", "2014-03-15 14:42:42.779993"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_medals" ("created_at", "image", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-03-15 14:42:42.789369"], ["image", nil], ["name", "MyString"], ["updated_at", "2014-03-15 14:42:42.789369"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-15 14:42:42.794210"], ["points", 1], ["updated_at", "2014-03-15 14:42:42.794210"]] SQL (0.1ms) UPDATE "gamification_medals" SET "goal_id" = ?, "updated_at" = ? WHERE "gamification_medals"."id" = 1 [["goal_id", 1], ["updated_at", "2014-03-15 14:42:42.795305"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-15 14:42:42.798371"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-15 14:42:42.798371"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? [["rewardable_id", 1], ["rewardable_type", "User"]]  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-15 14:42:42.803720"], ["updated_at", "2014-03-15 14:42:42.803720"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-15 14:42:42.805081"], ["updated_at", "2014-03-15 14:42:42.805081"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-15 14:42:42.847218"], ["updated_at", "2014-03-15 14:42:42.847218"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ArticlesController#show as HTML Parameters: {"id"=>"1"} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Completed 200 OK in 6ms (Views: 4.9ms | ActiveRecord: 0.0ms)  (0.4ms) rollback transaction  (0.3ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-15 14:42:57.518974"], ["updated_at", "2014-03-15 14:42:57.518974"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "gamification_medals" ("created_at", "image", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-03-15 14:42:57.565614"], ["image", nil], ["name", "MyString"], ["updated_at", "2014-03-15 14:42:57.565614"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-15 14:42:57.578229"], ["points", 1], ["updated_at", "2014-03-15 14:42:57.578229"]] SQL (0.1ms) UPDATE "gamification_medals" SET "goal_id" = ?, "updated_at" = ? WHERE "gamification_medals"."id" = 1 [["goal_id", 1], ["updated_at", "2014-03-15 14:42:57.579488"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.2ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-15 14:42:57.597838"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-15 14:42:57.597838"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]]  (1.9ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-15 14:42:57.612800"], ["updated_at", "2014-03-15 14:42:57.612800"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-15 14:42:57.616622"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-15 14:42:57.616622"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-15 14:42:57.618034"], ["updated_at", "2014-03-15 14:42:57.618034"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-15 14:42:57.630923"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-15 14:42:57.630923"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 11ms (ActiveRecord: 0.8ms)  (0.1ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-15 14:42:57.635534"], ["updated_at", "2014-03-15 14:42:57.635534"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-15 14:42:57.637294"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-15 14:42:57.637294"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-15 14:42:57.638666"], ["updated_at", "2014-03-15 14:42:57.638666"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-15 14:42:57.645514"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-15 14:42:57.645514"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 6ms (ActiveRecord: 0.5ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-15 14:42:57.649904"], ["points", 1], ["updated_at", "2014-03-15 14:42:57.649904"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-15 14:42:57.651343"], ["updated_at", "2014-03-15 14:42:57.651343"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-15 14:42:57.657105"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-15 14:42:57.657105"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 5ms (ActiveRecord: 0.4ms)  (0.1ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-15 14:42:57.661194"], ["points", 1], ["updated_at", "2014-03-15 14:42:57.661194"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-15 14:42:57.662588"], ["updated_at", "2014-03-15 14:42:57.662588"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-15 14:42:57.668342"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-15 14:42:57.668342"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 5ms (ActiveRecord: 0.4ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-15 14:42:57.672431"], ["updated_at", "2014-03-15 14:42:57.672431"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ArticlesController#show as HTML Parameters: {"id"=>"1"} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Completed 200 OK in 6ms (Views: 5.7ms | ActiveRecord: 0.0ms)  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-15 14:42:57.686028"], ["updated_at", "2014-03-15 14:42:57.686028"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-15 14:42:57.687508"], ["updated_at", "2014-03-15 14:42:57.687508"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.4ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-16 23:00:22.359603"], ["updated_at", "2014-03-16 23:00:22.359603"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ArticlesController#show as HTML Parameters: {"id"=>"1"} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Rendered articles/show.html.erb within layouts/application (0.3ms) Completed 200 OK in 9ms (Views: 6.1ms | ActiveRecord: 0.1ms)  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-16 23:00:22.379903"], ["updated_at", "2014-03-16 23:00:22.379903"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-16 23:00:22.383437"], ["updated_at", "2014-03-16 23:00:22.383437"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-16 23:00:22.419193"], ["points", 1], ["updated_at", "2014-03-16 23:00:22.419193"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-16 23:00:22.420982"], ["points", 1], ["updated_at", "2014-03-16 23:00:22.420982"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-16 23:00:22.422073"], ["points", 1], ["updated_at", "2014-03-16 23:00:22.422073"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-16 23:00:22.422960"], ["updated_at", "2014-03-16 23:00:22.422960"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-16 23:00:22.438357"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-16 23:00:22.438357"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-16 23:00:22.442468"], ["points", 1], ["updated_at", "2014-03-16 23:00:22.442468"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-16 23:00:22.443716"], ["updated_at", "2014-03-16 23:00:22.443716"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-16 23:00:22.445777"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-16 23:00:22.445777"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-16 23:00:22.449263"], ["points", 1], ["updated_at", "2014-03-16 23:00:22.449263"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-16 23:00:22.450611"], ["updated_at", "2014-03-16 23:00:22.450611"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-16 23:00:22.492430"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-16 23:00:22.492430"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-16 23:00:22.496961"], ["points", 1], ["updated_at", "2014-03-16 23:00:22.496961"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-16 23:00:22.498493"], ["updated_at", "2014-03-16 23:00:22.498493"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-16 23:00:22.502100"], ["points", 1], ["updated_at", "2014-03-16 23:00:22.502100"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-16 23:00:22.503375"], ["updated_at", "2014-03-16 23:00:22.503375"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-16 23:00:22.505466"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-16 23:00:22.505466"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.4ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-16 23:00:22.509083"], ["points", 1], ["updated_at", "2014-03-16 23:00:22.509083"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-16 23:00:22.510366"], ["points", 1], ["updated_at", "2014-03-16 23:00:22.510366"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-16 23:00:22.511463"], ["updated_at", "2014-03-16 23:00:22.511463"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-16 23:00:22.513645"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-16 23:00:22.513645"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-16 23:00:22.516991"], ["points", 1], ["updated_at", "2014-03-16 23:00:22.516991"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-16 23:00:22.518236"], ["points", 1], ["updated_at", "2014-03-16 23:00:22.518236"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-16 23:00:22.521888"], ["updated_at", "2014-03-16 23:00:22.521888"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "gamification_medals" ("created_at", "image", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-03-16 23:00:22.530243"], ["image", nil], ["name", "MyString"], ["updated_at", "2014-03-16 23:00:22.530243"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-16 23:00:22.534678"], ["points", 1], ["updated_at", "2014-03-16 23:00:22.534678"]] SQL (0.1ms) UPDATE "gamification_medals" SET "goal_id" = ?, "updated_at" = ? WHERE "gamification_medals"."id" = 1 [["goal_id", 1], ["updated_at", "2014-03-16 23:00:22.535622"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-16 23:00:22.538096"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-16 23:00:22.538096"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]]  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-16 23:00:22.544322"], ["points", 1], ["updated_at", "2014-03-16 23:00:22.544322"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-16 23:00:22.545654"], ["updated_at", "2014-03-16 23:00:22.545654"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-16 23:00:22.551727"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-16 23:00:22.551727"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 5ms (ActiveRecord: 0.4ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-16 23:00:22.556074"], ["points", 1], ["updated_at", "2014-03-16 23:00:22.556074"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-16 23:00:22.557917"], ["updated_at", "2014-03-16 23:00:22.557917"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-16 23:00:22.565250"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-16 23:00:22.565250"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 6ms (ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.5ms) rollback transaction  (0.0ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-16 23:00:22.569642"], ["updated_at", "2014-03-16 23:00:22.569642"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-16 23:00:22.571367"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-16 23:00:22.571367"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-16 23:00:22.572776"], ["updated_at", "2014-03-16 23:00:22.572776"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-16 23:00:22.579881"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-16 23:00:22.579881"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 6ms (ActiveRecord: 0.6ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-16 23:00:22.583659"], ["updated_at", "2014-03-16 23:00:22.583659"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-16 23:00:22.585394"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-16 23:00:22.585394"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-16 23:00:22.586721"], ["updated_at", "2014-03-16 23:00:22.586721"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-16 23:00:22.593182"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-16 23:00:22.593182"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 6ms (ActiveRecord: 0.5ms)  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.5ms) rollback transaction  (0.3ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-16 23:00:48.275670"], ["updated_at", "2014-03-16 23:00:48.275670"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ArticlesController#show as HTML Parameters: {"id"=>"1"} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Rendered articles/show.html.erb within layouts/application (0.2ms) Completed 200 OK in 7ms (Views: 4.9ms | ActiveRecord: 0.1ms)  (1.8ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-16 23:00:48.296024"], ["updated_at", "2014-03-16 23:00:48.296024"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-16 23:00:48.299640"], ["updated_at", "2014-03-16 23:00:48.299640"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-16 23:00:48.342582"], ["updated_at", "2014-03-16 23:00:48.342582"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-16 23:00:48.351962"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-16 23:00:48.351962"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-16 23:00:48.353762"], ["updated_at", "2014-03-16 23:00:48.353762"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-16 23:00:48.383702"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-16 23:00:48.383702"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 29ms (ActiveRecord: 0.9ms)  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.5ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-16 23:00:48.388432"], ["updated_at", "2014-03-16 23:00:48.388432"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-16 23:00:48.390139"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-16 23:00:48.390139"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-16 23:00:48.391480"], ["updated_at", "2014-03-16 23:00:48.391480"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-16 23:00:48.397883"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-16 23:00:48.397883"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 6ms (ActiveRecord: 0.5ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-16 23:00:48.402479"], ["points", 1], ["updated_at", "2014-03-16 23:00:48.402479"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-16 23:00:48.404303"], ["updated_at", "2014-03-16 23:00:48.404303"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-16 23:00:48.411289"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-16 23:00:48.411289"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 5ms (ActiveRecord: 0.5ms)  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-16 23:00:48.415365"], ["points", 1], ["updated_at", "2014-03-16 23:00:48.415365"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-16 23:00:48.416665"], ["updated_at", "2014-03-16 23:00:48.416665"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-16 23:00:48.422334"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-16 23:00:48.422334"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 5ms (ActiveRecord: 0.4ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-16 23:00:48.426887"], ["updated_at", "2014-03-16 23:00:48.426887"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_medals" ("created_at", "image", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-03-16 23:00:48.435458"], ["image", nil], ["name", "MyString"], ["updated_at", "2014-03-16 23:00:48.435458"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-16 23:00:48.439820"], ["points", 1], ["updated_at", "2014-03-16 23:00:48.439820"]] SQL (0.1ms) UPDATE "gamification_medals" SET "goal_id" = ?, "updated_at" = ? WHERE "gamification_medals"."id" = 1 [["goal_id", 1], ["updated_at", "2014-03-16 23:00:48.440729"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-16 23:00:48.443475"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-16 23:00:48.443475"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]]  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-16 23:00:48.448517"], ["points", 1], ["updated_at", "2014-03-16 23:00:48.448517"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-16 23:00:48.449869"], ["points", 1], ["updated_at", "2014-03-16 23:00:48.449869"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-16 23:00:48.451010"], ["updated_at", "2014-03-16 23:00:48.451010"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-16 23:00:48.453166"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-16 23:00:48.453166"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-16 23:00:48.457762"], ["points", 1], ["updated_at", "2014-03-16 23:00:48.457762"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-16 23:00:48.459396"], ["points", 1], ["updated_at", "2014-03-16 23:00:48.459396"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-16 23:00:48.460755"], ["updated_at", "2014-03-16 23:00:48.460755"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.3ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-16 23:00:48.500354"], ["points", 1], ["updated_at", "2014-03-16 23:00:48.500354"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-16 23:00:48.501664"], ["updated_at", "2014-03-16 23:00:48.501664"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-16 23:00:48.504022"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-16 23:00:48.504022"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-16 23:00:48.507050"], ["points", 1], ["updated_at", "2014-03-16 23:00:48.507050"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-16 23:00:48.508351"], ["updated_at", "2014-03-16 23:00:48.508351"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-16 23:00:48.510478"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-16 23:00:48.510478"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.6ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-16 23:00:48.516726"], ["points", 1], ["updated_at", "2014-03-16 23:00:48.516726"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-16 23:00:48.518128"], ["updated_at", "2014-03-16 23:00:48.518128"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-16 23:00:48.520253"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-16 23:00:48.520253"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.4ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-16 23:00:48.523565"], ["points", 1], ["updated_at", "2014-03-16 23:00:48.523565"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-16 23:00:48.524824"], ["updated_at", "2014-03-16 23:00:48.524824"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.4ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-16 23:00:48.528165"], ["points", 1], ["updated_at", "2014-03-16 23:00:48.528165"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-16 23:00:48.529385"], ["points", 1], ["updated_at", "2014-03-16 23:00:48.529385"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-16 23:00:48.530467"], ["points", 1], ["updated_at", "2014-03-16 23:00:48.530467"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-16 23:00:48.531420"], ["updated_at", "2014-03-16 23:00:48.531420"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-16 23:00:48.533288"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-16 23:00:48.533288"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-16 23:00:48.536889"], ["goal_id", 2], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-16 23:00:48.536889"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 3) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-16 23:00:48.539156"], ["goal_id", 3], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-16 23:00:48.539156"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.4ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:09:31.139226"], ["points", 1], ["updated_at", "2014-03-18 22:09:31.139226"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:09:31.142907"], ["points", 1], ["updated_at", "2014-03-18 22:09:31.142907"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:09:31.145809"], ["updated_at", "2014-03-18 22:09:31.145809"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.9ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:09:31.195935"], ["points", 1], ["updated_at", "2014-03-18 22:09:31.195935"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:09:31.197409"], ["points", 1], ["updated_at", "2014-03-18 22:09:31.197409"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:09:31.198586"], ["updated_at", "2014-03-18 22:09:31.198586"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:09:31.214539"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:09:31.214539"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:09:31.219552"], ["points", 1], ["updated_at", "2014-03-18 22:09:31.219552"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:09:31.221219"], ["points", 1], ["updated_at", "2014-03-18 22:09:31.221219"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:09:31.222449"], ["points", 1], ["updated_at", "2014-03-18 22:09:31.222449"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:09:31.223427"], ["updated_at", "2014-03-18 22:09:31.223427"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:09:31.225803"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:09:31.225803"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:09:31.229288"], ["goal_id", 2], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:09:31.229288"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 3) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:09:31.231621"], ["goal_id", 3], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:09:31.231621"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:09:31.234632"], ["points", 1], ["updated_at", "2014-03-18 22:09:31.234632"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:09:31.236006"], ["updated_at", "2014-03-18 22:09:31.236006"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:09:31.238795"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:09:31.238795"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:09:31.243311"], ["points", 1], ["updated_at", "2014-03-18 22:09:31.243311"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:09:31.245003"], ["updated_at", "2014-03-18 22:09:31.245003"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:09:31.247797"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:09:31.247797"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:09:31.254299"], ["points", 1], ["updated_at", "2014-03-18 22:09:31.254299"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:09:31.255899"], ["updated_at", "2014-03-18 22:09:31.255899"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:09:31.258240"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:09:31.258240"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:09:31.262179"], ["points", 1], ["updated_at", "2014-03-18 22:09:31.262179"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:09:31.263757"], ["updated_at", "2014-03-18 22:09:31.263757"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:09:31.273771"], ["updated_at", "2014-03-18 22:09:31.273771"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:09:31.278063"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 22:09:31.278063"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:09:31.280010"], ["updated_at", "2014-03-18 22:09:31.280010"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:09:31.289337"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:09:31.289337"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 7ms (ActiveRecord: 0.7ms)  (0.1ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:09:31.293700"], ["updated_at", "2014-03-18 22:09:31.293700"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:09:31.295439"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 22:09:31.295439"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:09:31.296848"], ["updated_at", "2014-03-18 22:09:31.296848"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:09:31.304012"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:09:31.304012"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 6ms (ActiveRecord: 0.5ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:09:31.308207"], ["points", 1], ["updated_at", "2014-03-18 22:09:31.308207"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:09:31.309653"], ["updated_at", "2014-03-18 22:09:31.309653"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:09:31.315655"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:09:31.315655"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 5ms (ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:09:31.319737"], ["points", 1], ["updated_at", "2014-03-18 22:09:31.319737"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:09:31.321295"], ["updated_at", "2014-03-18 22:09:31.321295"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:09:31.329202"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:09:31.329202"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 7ms (ActiveRecord: 0.5ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:09:31.334018"], ["updated_at", "2014-03-18 22:09:31.334018"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ArticlesController#show as HTML Parameters: {"id"=>"1"} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Completed 200 OK in 7ms (Views: 5.9ms | ActiveRecord: 0.0ms)  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:09:31.347899"], ["updated_at", "2014-03-18 22:09:31.347899"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:09:31.349439"], ["updated_at", "2014-03-18 22:09:31.349439"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:09:31.400463"], ["updated_at", "2014-03-18 22:09:31.400463"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_medals" ("created_at", "image", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-03-18 22:09:31.409275"], ["image", nil], ["name", "MyString"], ["updated_at", "2014-03-18 22:09:31.409275"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:09:31.413682"], ["points", 1], ["updated_at", "2014-03-18 22:09:31.413682"]] SQL (0.1ms) UPDATE "gamification_medals" SET "goal_id" = ?, "updated_at" = ? WHERE "gamification_medals"."id" = 1 [["goal_id", 1], ["updated_at", "2014-03-18 22:09:31.414653"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:09:31.417412"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:09:31.417412"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]]  (0.5ms) rollback transaction  (0.4ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:10:10.038553"], ["updated_at", "2014-03-18 22:10:10.038553"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:10:10.044767"], ["updated_at", "2014-03-18 22:10:10.044767"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (1.9ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:10:10.099058"], ["points", 1], ["updated_at", "2014-03-18 22:10:10.099058"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:10:10.100808"], ["updated_at", "2014-03-18 22:10:10.100808"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:10:10.117948"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:10:10.117948"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:10:10.130482"], ["points", 1], ["updated_at", "2014-03-18 22:10:10.130482"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:10:10.132383"], ["updated_at", "2014-03-18 22:10:10.132383"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:10:10.137045"], ["points", 1], ["updated_at", "2014-03-18 22:10:10.137045"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:10:10.138694"], ["updated_at", "2014-03-18 22:10:10.138694"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:10:10.141467"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:10:10.141467"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:10:10.144877"], ["points", 1], ["updated_at", "2014-03-18 22:10:10.144877"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:10:10.146489"], ["updated_at", "2014-03-18 22:10:10.146489"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:10:10.148897"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:10:10.148897"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.5ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:10:10.153734"], ["points", 1], ["updated_at", "2014-03-18 22:10:10.153734"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:10:10.155083"], ["points", 1], ["updated_at", "2014-03-18 22:10:10.155083"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:10:10.156182"], ["points", 1], ["updated_at", "2014-03-18 22:10:10.156182"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:10:10.157134"], ["updated_at", "2014-03-18 22:10:10.157134"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:10:10.159078"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:10:10.159078"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:10:10.162479"], ["goal_id", 2], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:10:10.162479"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 3) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:10:10.165177"], ["goal_id", 3], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:10:10.165177"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:10:10.168708"], ["points", 1], ["updated_at", "2014-03-18 22:10:10.168708"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:10:10.170097"], ["points", 1], ["updated_at", "2014-03-18 22:10:10.170097"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:10:10.171258"], ["updated_at", "2014-03-18 22:10:10.171258"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.3ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:10:10.175630"], ["points", 1], ["updated_at", "2014-03-18 22:10:10.175630"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:10:10.177064"], ["points", 1], ["updated_at", "2014-03-18 22:10:10.177064"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:10:10.178574"], ["updated_at", "2014-03-18 22:10:10.178574"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:10:10.181554"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:10:10.181554"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:10:10.187426"], ["updated_at", "2014-03-18 22:10:10.187426"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:10:10.189637"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 22:10:10.189637"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:10:10.191268"], ["updated_at", "2014-03-18 22:10:10.191268"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:10:10.199820"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:10:10.199820"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 6ms (ActiveRecord: 0.6ms)  (0.1ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:10:10.204149"], ["updated_at", "2014-03-18 22:10:10.204149"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:10:10.205890"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 22:10:10.205890"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:10:10.207305"], ["updated_at", "2014-03-18 22:10:10.207305"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:10:10.214584"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:10:10.214584"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 7ms (ActiveRecord: 0.6ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:10:10.219779"], ["points", 1], ["updated_at", "2014-03-18 22:10:10.219779"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:10:10.221633"], ["updated_at", "2014-03-18 22:10:10.221633"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:10:10.228388"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:10:10.228388"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 5ms (ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:10:10.232759"], ["points", 1], ["updated_at", "2014-03-18 22:10:10.232759"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:10:10.234140"], ["updated_at", "2014-03-18 22:10:10.234140"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:10:10.240351"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:10:10.240351"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 5ms (ActiveRecord: 0.5ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:10:10.245309"], ["updated_at", "2014-03-18 22:10:10.245309"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.2ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:10:10.250094"], ["seen_at", "2014-03-16 22:10:10.248032"], ["updated_at", "2014-03-18 22:10:10.250094"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:10:10.254269"], ["updated_at", "2014-03-18 22:10:10.254269"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ArticlesController#show as HTML Parameters: {"id"=>"1"} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Completed 200 OK in 43ms (Views: 5.9ms | ActiveRecord: 0.1ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:10:10.302932"], ["updated_at", "2014-03-18 22:10:10.302932"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_medals" ("created_at", "image", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-03-18 22:10:10.312014"], ["image", nil], ["name", "MyString"], ["updated_at", "2014-03-18 22:10:10.312014"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:10:10.316375"], ["points", 1], ["updated_at", "2014-03-18 22:10:10.316375"]] SQL (0.1ms) UPDATE "gamification_medals" SET "goal_id" = ?, "updated_at" = ? WHERE "gamification_medals"."id" = 1 [["goal_id", 1], ["updated_at", "2014-03-18 22:10:10.317268"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:10:10.319848"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:10:10.319848"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]]  (0.5ms) rollback transaction  (0.4ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:10:38.542161"], ["updated_at", "2014-03-18 22:10:38.542161"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "gamification_medals" ("created_at", "image", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-03-18 22:10:38.556811"], ["image", nil], ["name", "MyString"], ["updated_at", "2014-03-18 22:10:38.556811"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:10:38.598235"], ["points", 1], ["updated_at", "2014-03-18 22:10:38.598235"]] SQL (0.1ms) UPDATE "gamification_medals" SET "goal_id" = ?, "updated_at" = ? WHERE "gamification_medals"."id" = 1 [["goal_id", 1], ["updated_at", "2014-03-18 22:10:38.599438"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:10:38.617134"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:10:38.617134"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]]  (1.7ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:10:38.632172"], ["updated_at", "2014-03-18 22:10:38.632172"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ArticlesController#show as HTML Parameters: {"id"=>"1"} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Rendered articles/show.html.erb within layouts/application (0.2ms) Completed 200 OK in 6ms (Views: 4.9ms | ActiveRecord: 0.1ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:10:38.647576"], ["updated_at", "2014-03-18 22:10:38.647576"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:10:38.649021"], ["updated_at", "2014-03-18 22:10:38.649021"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:10:38.658392"], ["updated_at", "2014-03-18 22:10:38.658392"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:10:38.660230"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 22:10:38.660230"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:10:38.662002"], ["updated_at", "2014-03-18 22:10:38.662002"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.2ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:10:38.675321"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:10:38.675321"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 12ms (ActiveRecord: 0.9ms)  (0.1ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:10:38.680518"], ["updated_at", "2014-03-18 22:10:38.680518"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:10:38.682505"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 22:10:38.682505"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:10:38.683968"], ["updated_at", "2014-03-18 22:10:38.683968"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:10:38.690991"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:10:38.690991"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 6ms (ActiveRecord: 0.5ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:10:38.695131"], ["points", 1], ["updated_at", "2014-03-18 22:10:38.695131"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:10:38.696552"], ["updated_at", "2014-03-18 22:10:38.696552"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:10:38.738116"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:10:38.738116"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 41ms (ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:10:38.742600"], ["points", 1], ["updated_at", "2014-03-18 22:10:38.742600"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:10:38.744014"], ["updated_at", "2014-03-18 22:10:38.744014"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:10:38.750445"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:10:38.750445"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 5ms (ActiveRecord: 0.4ms)  (0.5ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:10:38.754511"], ["points", 1], ["updated_at", "2014-03-18 22:10:38.754511"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:10:38.756027"], ["updated_at", "2014-03-18 22:10:38.756027"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:10:38.758584"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:10:38.758584"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:10:38.762744"], ["points", 1], ["updated_at", "2014-03-18 22:10:38.762744"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:10:38.764810"], ["updated_at", "2014-03-18 22:10:38.764810"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:10:38.767845"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:10:38.767845"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:10:38.773213"], ["points", 1], ["updated_at", "2014-03-18 22:10:38.773213"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:10:38.774504"], ["points", 1], ["updated_at", "2014-03-18 22:10:38.774504"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:10:38.775733"], ["updated_at", "2014-03-18 22:10:38.775733"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:10:38.778263"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:10:38.778263"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:10:38.782608"], ["points", 1], ["updated_at", "2014-03-18 22:10:38.782608"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:10:38.784012"], ["points", 1], ["updated_at", "2014-03-18 22:10:38.784012"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:10:38.785193"], ["updated_at", "2014-03-18 22:10:38.785193"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:10:38.790354"], ["points", 1], ["updated_at", "2014-03-18 22:10:38.790354"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:10:38.792384"], ["updated_at", "2014-03-18 22:10:38.792384"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:10:38.795601"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:10:38.795601"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:10:38.800006"], ["points", 1], ["updated_at", "2014-03-18 22:10:38.800006"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:10:38.801439"], ["updated_at", "2014-03-18 22:10:38.801439"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.4ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:10:38.804893"], ["points", 1], ["updated_at", "2014-03-18 22:10:38.804893"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:10:38.806204"], ["points", 1], ["updated_at", "2014-03-18 22:10:38.806204"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:10:38.807877"], ["points", 1], ["updated_at", "2014-03-18 22:10:38.807877"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:10:38.808985"], ["updated_at", "2014-03-18 22:10:38.808985"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:10:38.811186"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:10:38.811186"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:10:38.814691"], ["goal_id", 2], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:10:38.814691"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 3) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:10:38.816925"], ["goal_id", 3], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:10:38.816925"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.2ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.4ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:10:38.821837"], ["updated_at", "2014-03-18 22:10:38.821837"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.2ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:10:38.826777"], ["seen_at", "2014-03-16 22:10:38.824766"], ["updated_at", "2014-03-18 22:10:38.826777"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.4ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.4ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:10:56.695783"], ["updated_at", "2014-03-18 22:10:56.695783"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (1.7ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.2ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:10:56.702576"], ["seen_at", "2014-03-16 22:10:56.700571"], ["updated_at", "2014-03-18 22:10:56.702576"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:10:56.708413"], ["updated_at", "2014-03-18 22:10:56.708413"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "gamification_medals" ("created_at", "image", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-03-18 22:10:56.723094"], ["image", nil], ["name", "MyString"], ["updated_at", "2014-03-18 22:10:56.723094"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:10:56.732880"], ["points", 1], ["updated_at", "2014-03-18 22:10:56.732880"]] SQL (0.2ms) UPDATE "gamification_medals" SET "goal_id" = ?, "updated_at" = ? WHERE "gamification_medals"."id" = 1 [["goal_id", 1], ["updated_at", "2014-03-18 22:10:56.734004"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:10:56.737742"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:10:56.737742"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.2ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]]  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:10:56.750428"], ["points", 1], ["updated_at", "2014-03-18 22:10:56.750428"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:10:56.752337"], ["points", 1], ["updated_at", "2014-03-18 22:10:56.752337"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:10:56.753963"], ["points", 1], ["updated_at", "2014-03-18 22:10:56.753963"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:10:56.755177"], ["updated_at", "2014-03-18 22:10:56.755177"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:10:56.757682"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:10:56.757682"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.2ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:10:56.766400"], ["goal_id", 2], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:10:56.766400"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 3) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:10:56.768784"], ["goal_id", 3], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:10:56.768784"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:10:56.771588"], ["points", 1], ["updated_at", "2014-03-18 22:10:56.771588"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:10:56.772927"], ["points", 1], ["updated_at", "2014-03-18 22:10:56.772927"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:10:56.774065"], ["updated_at", "2014-03-18 22:10:56.774065"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:10:56.776349"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:10:56.776349"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:10:56.780520"], ["points", 1], ["updated_at", "2014-03-18 22:10:56.780520"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:10:56.781926"], ["points", 1], ["updated_at", "2014-03-18 22:10:56.781926"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:10:56.783086"], ["updated_at", "2014-03-18 22:10:56.783086"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:10:56.788420"], ["points", 1], ["updated_at", "2014-03-18 22:10:56.788420"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:10:56.789895"], ["updated_at", "2014-03-18 22:10:56.789895"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:10:56.794162"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:10:56.794162"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:10:56.798380"], ["points", 1], ["updated_at", "2014-03-18 22:10:56.798380"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:10:56.800177"], ["updated_at", "2014-03-18 22:10:56.800177"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:10:56.803244"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:10:56.803244"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.7ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:10:56.810305"], ["points", 1], ["updated_at", "2014-03-18 22:10:56.810305"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:10:56.812285"], ["updated_at", "2014-03-18 22:10:56.812285"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:10:56.815808"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:10:56.815808"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:10:56.819786"], ["points", 1], ["updated_at", "2014-03-18 22:10:56.819786"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:10:56.821180"], ["updated_at", "2014-03-18 22:10:56.821180"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:10:56.827174"], ["updated_at", "2014-03-18 22:10:56.827174"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:10:56.830233"], ["updated_at", "2014-03-18 22:10:56.830233"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:10:56.881802"], ["updated_at", "2014-03-18 22:10:56.881802"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ArticlesController#show as HTML Parameters: {"id"=>"1"} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Completed 200 OK in 6ms (Views: 5.0ms | ActiveRecord: 0.1ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:10:56.894847"], ["updated_at", "2014-03-18 22:10:56.894847"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:10:56.896690"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 22:10:56.896690"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:10:56.898156"], ["updated_at", "2014-03-18 22:10:56.898156"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:10:56.905915"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:10:56.905915"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 7ms (ActiveRecord: 0.6ms)  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:10:56.910613"], ["updated_at", "2014-03-18 22:10:56.910613"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:10:56.912389"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 22:10:56.912389"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:10:56.913794"], ["updated_at", "2014-03-18 22:10:56.913794"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:10:56.921839"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:10:56.921839"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 7ms (ActiveRecord: 0.5ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:10:56.926078"], ["points", 1], ["updated_at", "2014-03-18 22:10:56.926078"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:10:56.927528"], ["updated_at", "2014-03-18 22:10:56.927528"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:10:56.935635"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:10:56.935635"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 7ms (ActiveRecord: 0.7ms)  (0.1ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:10:56.941151"], ["points", 1], ["updated_at", "2014-03-18 22:10:56.941151"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:10:56.942949"], ["updated_at", "2014-03-18 22:10:56.942949"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:10:56.949479"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:10:56.949479"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 5ms (ActiveRecord: 0.4ms)  (0.5ms) rollback transaction  (0.4ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.2ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.4ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:14:35.574136"], ["updated_at", "2014-03-18 22:14:35.574136"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (1.4ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:14:35.580416"], ["seen_at", "2014-03-16 22:14:35.578391"], ["updated_at", "2014-03-18 22:14:35.580416"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:14:35.591916"], ["points", 1], ["updated_at", "2014-03-18 22:14:35.591916"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:14:35.593757"], ["points", 1], ["updated_at", "2014-03-18 22:14:35.593757"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:14:35.595526"], ["points", 1], ["updated_at", "2014-03-18 22:14:35.595526"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:14:35.597592"], ["updated_at", "2014-03-18 22:14:35.597592"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:14:35.603122"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:14:35.603122"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.2ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:14:35.617201"], ["goal_id", 2], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:14:35.617201"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 3) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:14:35.619812"], ["goal_id", 3], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:14:35.619812"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:14:35.623631"], ["points", 1], ["updated_at", "2014-03-18 22:14:35.623631"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:14:35.625072"], ["updated_at", "2014-03-18 22:14:35.625072"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:14:35.627676"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:14:35.627676"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:14:35.630842"], ["points", 1], ["updated_at", "2014-03-18 22:14:35.630842"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:14:35.632267"], ["updated_at", "2014-03-18 22:14:35.632267"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:14:35.635615"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:14:35.635615"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:14:35.642285"], ["points", 1], ["updated_at", "2014-03-18 22:14:35.642285"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:14:35.644014"], ["points", 1], ["updated_at", "2014-03-18 22:14:35.644014"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:14:35.645454"], ["updated_at", "2014-03-18 22:14:35.645454"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:14:35.648181"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:14:35.648181"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:14:35.652809"], ["points", 1], ["updated_at", "2014-03-18 22:14:35.652809"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:14:35.654183"], ["updated_at", "2014-03-18 22:14:35.654183"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:14:35.656571"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:14:35.656571"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:14:35.660396"], ["points", 1], ["updated_at", "2014-03-18 22:14:35.660396"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:14:35.661733"], ["updated_at", "2014-03-18 22:14:35.661733"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:14:35.665322"], ["points", 1], ["updated_at", "2014-03-18 22:14:35.665322"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:14:35.666768"], ["points", 1], ["updated_at", "2014-03-18 22:14:35.666768"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:14:35.667970"], ["updated_at", "2014-03-18 22:14:35.667970"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:14:35.673827"], ["updated_at", "2014-03-18 22:14:35.673827"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "gamification_medals" ("created_at", "image", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-03-18 22:14:35.683847"], ["image", nil], ["name", "MyString"], ["updated_at", "2014-03-18 22:14:35.683847"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:14:35.689507"], ["points", 1], ["updated_at", "2014-03-18 22:14:35.689507"]] SQL (0.2ms) UPDATE "gamification_medals" SET "goal_id" = ?, "updated_at" = ? WHERE "gamification_medals"."id" = 1 [["goal_id", 1], ["updated_at", "2014-03-18 22:14:35.690861"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:14:35.694319"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:14:35.694319"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]]  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:14:35.702538"], ["updated_at", "2014-03-18 22:14:35.702538"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ArticlesController#show as HTML Parameters: {"id"=>"1"} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Rendered articles/show.html.erb within layouts/application (0.2ms) Completed 200 OK in 6ms (Views: 4.9ms | ActiveRecord: 0.1ms)  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:14:35.717560"], ["updated_at", "2014-03-18 22:14:35.717560"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:14:35.719307"], ["updated_at", "2014-03-18 22:14:35.719307"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:14:35.766577"], ["updated_at", "2014-03-18 22:14:35.766577"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:14:35.768633"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 22:14:35.768633"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:14:35.770199"], ["updated_at", "2014-03-18 22:14:35.770199"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:14:35.778332"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:14:35.778332"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 7ms (ActiveRecord: 0.6ms)  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:14:35.782929"], ["updated_at", "2014-03-18 22:14:35.782929"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:14:35.784754"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 22:14:35.784754"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:14:35.786297"], ["updated_at", "2014-03-18 22:14:35.786297"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:14:35.793236"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:14:35.793236"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 6ms (ActiveRecord: 0.5ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:14:35.797544"], ["points", 1], ["updated_at", "2014-03-18 22:14:35.797544"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:14:35.799867"], ["updated_at", "2014-03-18 22:14:35.799867"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:14:35.809288"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:14:35.809288"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 6ms (ActiveRecord: 0.5ms)  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:14:35.813771"], ["points", 1], ["updated_at", "2014-03-18 22:14:35.813771"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:14:35.815150"], ["updated_at", "2014-03-18 22:14:35.815150"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:14:35.822610"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:14:35.822610"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 7ms (ActiveRecord: 0.6ms)  (0.6ms) rollback transaction  (0.4ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:23:22.842517"], ["points", 1], ["updated_at", "2014-03-18 22:23:22.842517"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:23:22.882259"], ["updated_at", "2014-03-18 22:23:22.882259"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:23:22.918921"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:23:22.918921"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 31ms (ActiveRecord: 1.1ms)  (1.7ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:23:22.924841"], ["points", 1], ["updated_at", "2014-03-18 22:23:22.924841"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:23:22.926339"], ["updated_at", "2014-03-18 22:23:22.926339"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:23:22.932179"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:23:22.932179"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 5ms (ActiveRecord: 0.4ms)  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.5ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:23:22.937861"], ["updated_at", "2014-03-18 22:23:22.937861"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:23:22.941555"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 22:23:22.941555"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:23:22.943162"], ["updated_at", "2014-03-18 22:23:22.943162"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:23:22.950685"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:23:22.950685"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 6ms (ActiveRecord: 0.6ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:23:22.954320"], ["updated_at", "2014-03-18 22:23:22.954320"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:23:22.955974"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 22:23:22.955974"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:23:22.957316"], ["updated_at", "2014-03-18 22:23:22.957316"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:23:22.965289"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:23:22.965289"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 7ms (ActiveRecord: 0.5ms)  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:23:22.970228"], ["points", 1], ["updated_at", "2014-03-18 22:23:22.970228"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:23:22.971709"], ["points", 1], ["updated_at", "2014-03-18 22:23:22.971709"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:23:22.972806"], ["updated_at", "2014-03-18 22:23:22.972806"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:23:22.977501"], ["points", 1], ["updated_at", "2014-03-18 22:23:22.977501"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:23:22.979395"], ["updated_at", "2014-03-18 22:23:22.979395"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:23:22.982561"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:23:22.982561"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:23:22.989581"], ["points", 1], ["updated_at", "2014-03-18 22:23:22.989581"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:23:22.991675"], ["updated_at", "2014-03-18 22:23:22.991675"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:23:22.995765"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:23:22.995765"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:23:22.999802"], ["points", 1], ["updated_at", "2014-03-18 22:23:22.999802"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:23:23.001197"], ["points", 1], ["updated_at", "2014-03-18 22:23:23.001197"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:23:23.002778"], ["points", 1], ["updated_at", "2014-03-18 22:23:23.002778"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:23:23.004495"], ["updated_at", "2014-03-18 22:23:23.004495"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:23:23.006963"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:23:23.006963"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:23:23.010628"], ["goal_id", 2], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:23:23.010628"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 3) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:23:23.014164"], ["goal_id", 3], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:23:23.014164"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:23:23.017754"], ["points", 1], ["updated_at", "2014-03-18 22:23:23.017754"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:23:23.019168"], ["updated_at", "2014-03-18 22:23:23.019168"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:23:23.022640"], ["points", 1], ["updated_at", "2014-03-18 22:23:23.022640"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:23:23.023910"], ["updated_at", "2014-03-18 22:23:23.023910"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:23:23.026130"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:23:23.026130"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:23:23.031007"], ["points", 1], ["updated_at", "2014-03-18 22:23:23.031007"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:23:23.032836"], ["points", 1], ["updated_at", "2014-03-18 22:23:23.032836"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:23:23.034424"], ["updated_at", "2014-03-18 22:23:23.034424"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:23:23.037464"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:23:23.037464"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:23:23.043698"], ["updated_at", "2014-03-18 22:23:23.043698"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "gamification_medals" ("created_at", "image", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-03-18 22:23:23.053641"], ["image", nil], ["name", "MyString"], ["updated_at", "2014-03-18 22:23:23.053641"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:23:23.058719"], ["points", 1], ["updated_at", "2014-03-18 22:23:23.058719"]] SQL (0.2ms) UPDATE "gamification_medals" SET "goal_id" = ?, "updated_at" = ? WHERE "gamification_medals"."id" = 1 [["goal_id", 1], ["updated_at", "2014-03-18 22:23:23.060298"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:23:23.064414"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:23:23.064414"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.2ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]]  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:23:23.073271"], ["updated_at", "2014-03-18 22:23:23.073271"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:23:23.075210"], ["updated_at", "2014-03-18 22:23:23.075210"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:23:23.123397"], ["updated_at", "2014-03-18 22:23:23.123397"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ArticlesController#show as HTML Parameters: {"id"=>"1"} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Completed 200 OK in 7ms (Views: 6.2ms | ActiveRecord: 0.0ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.2ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:23:23.137803"], ["seen_at", "2014-03-16 22:23:23.135801"], ["updated_at", "2014-03-18 22:23:23.137803"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.2ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.4ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:23:23.142688"], ["updated_at", "2014-03-18 22:23:23.142688"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:23:23.147408"], ["seen_at", "2014-03-16 22:23:23.145774"], ["updated_at", "2014-03-18 22:23:23.147408"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE ("gamification_rewards"."seen_at" IS NOT NULL)  (0.4ms) rollback transaction  (0.4ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.2ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.4ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:23:39.823471"], ["seen_at", "2014-03-16 22:23:39.769734"], ["updated_at", "2014-03-18 22:23:39.823471"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (1.7ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.2ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:23:39.830058"], ["updated_at", "2014-03-18 22:23:39.830058"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:23:39.836679"], ["updated_at", "2014-03-18 22:23:39.836679"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE ("gamification_rewards"."seen_at" IS NOT NULL)  (0.4ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:23:39.846488"], ["seen_at", "2014-03-16 22:23:39.844875"], ["updated_at", "2014-03-18 22:23:39.846488"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE ("gamification_rewards"."seen_at" IS NOT NULL)  (0.3ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:23:39.851101"], ["updated_at", "2014-03-18 22:23:39.851101"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "gamification_medals" ("created_at", "image", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-03-18 22:23:39.861724"], ["image", nil], ["name", "MyString"], ["updated_at", "2014-03-18 22:23:39.861724"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:23:39.872568"], ["points", 1], ["updated_at", "2014-03-18 22:23:39.872568"]] SQL (0.2ms) UPDATE "gamification_medals" SET "goal_id" = ?, "updated_at" = ? WHERE "gamification_medals"."id" = 1 [["goal_id", 1], ["updated_at", "2014-03-18 22:23:39.873778"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:23:39.877160"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:23:39.877160"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.2ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]]  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:23:39.889861"], ["points", 1], ["updated_at", "2014-03-18 22:23:39.889861"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:23:39.891807"], ["updated_at", "2014-03-18 22:23:39.891807"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:23:39.902870"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:23:39.902870"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 8ms (ActiveRecord: 0.6ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:23:39.906896"], ["points", 1], ["updated_at", "2014-03-18 22:23:39.906896"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:23:39.908265"], ["updated_at", "2014-03-18 22:23:39.908265"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:23:39.914136"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:23:39.914136"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 5ms (ActiveRecord: 0.4ms)  (0.1ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:23:39.919775"], ["updated_at", "2014-03-18 22:23:39.919775"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:23:39.924561"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 22:23:39.924561"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:23:39.926180"], ["updated_at", "2014-03-18 22:23:39.926180"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:23:39.934782"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:23:39.934782"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 8ms (ActiveRecord: 0.7ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:23:39.939736"], ["updated_at", "2014-03-18 22:23:39.939736"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:23:39.942096"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 22:23:39.942096"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:23:39.944072"], ["updated_at", "2014-03-18 22:23:39.944072"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:23:39.951863"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:23:39.951863"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 6ms (ActiveRecord: 0.5ms)  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:23:39.957424"], ["updated_at", "2014-03-18 22:23:39.957424"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:23:39.958985"], ["updated_at", "2014-03-18 22:23:39.958985"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:23:40.006077"], ["points", 1], ["updated_at", "2014-03-18 22:23:40.006077"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:23:40.007651"], ["points", 1], ["updated_at", "2014-03-18 22:23:40.007651"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:23:40.008952"], ["updated_at", "2014-03-18 22:23:40.008952"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:23:40.011482"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:23:40.011482"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:23:40.016055"], ["points", 1], ["updated_at", "2014-03-18 22:23:40.016055"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:23:40.017473"], ["updated_at", "2014-03-18 22:23:40.017473"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:23:40.019722"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:23:40.019722"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.5ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:23:40.024389"], ["points", 1], ["updated_at", "2014-03-18 22:23:40.024389"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:23:40.025837"], ["updated_at", "2014-03-18 22:23:40.025837"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:23:40.028418"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:23:40.028418"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:23:40.031827"], ["points", 1], ["updated_at", "2014-03-18 22:23:40.031827"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:23:40.033200"], ["updated_at", "2014-03-18 22:23:40.033200"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.4ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:23:40.036726"], ["points", 1], ["updated_at", "2014-03-18 22:23:40.036726"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:23:40.038050"], ["updated_at", "2014-03-18 22:23:40.038050"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:23:40.041064"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:23:40.041064"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:23:40.045610"], ["points", 1], ["updated_at", "2014-03-18 22:23:40.045610"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:23:40.047158"], ["points", 1], ["updated_at", "2014-03-18 22:23:40.047158"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:23:40.049264"], ["updated_at", "2014-03-18 22:23:40.049264"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:23:40.055175"], ["points", 1], ["updated_at", "2014-03-18 22:23:40.055175"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:23:40.057162"], ["points", 1], ["updated_at", "2014-03-18 22:23:40.057162"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:23:40.059260"], ["points", 1], ["updated_at", "2014-03-18 22:23:40.059260"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:23:40.060692"], ["updated_at", "2014-03-18 22:23:40.060692"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:23:40.063538"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:23:40.063538"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:23:40.067505"], ["goal_id", 2], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:23:40.067505"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 3) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:23:40.069693"], ["goal_id", 3], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:23:40.069693"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:23:40.073228"], ["updated_at", "2014-03-18 22:23:40.073228"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by ArticlesController#show as HTML Parameters: {"id"=>"1"} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Completed 200 OK in 6ms (Views: 5.0ms | ActiveRecord: 0.0ms)  (0.4ms) rollback transaction  (0.4ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.5ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:23:50.817575"], ["seen_at", "2014-03-16 22:23:50.765652"], ["updated_at", "2014-03-18 22:23:50.817575"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.2ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE ("gamification_rewards"."seen_at" IS NOT NULL)  (1.9ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:23:50.832241"], ["updated_at", "2014-03-18 22:23:50.832241"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."seen_at" IS NULL  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:23:50.836912"], ["updated_at", "2014-03-18 22:23:50.836912"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:23:50.840426"], ["seen_at", "2014-03-16 22:23:50.839022"], ["updated_at", "2014-03-18 22:23:50.840426"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:23:50.846624"], ["updated_at", "2014-03-18 22:23:50.846624"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:23:50.855261"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 22:23:50.855261"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:23:50.859294"], ["updated_at", "2014-03-18 22:23:50.859294"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.2ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:23:50.877917"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:23:50.877917"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 14ms (ActiveRecord: 0.9ms)  (0.1ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:23:50.882366"], ["updated_at", "2014-03-18 22:23:50.882366"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:23:50.884358"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 22:23:50.884358"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:23:50.886514"], ["updated_at", "2014-03-18 22:23:50.886514"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:23:50.894678"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:23:50.894678"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 7ms (ActiveRecord: 0.6ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:23:50.900066"], ["points", 1], ["updated_at", "2014-03-18 22:23:50.900066"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:23:50.901691"], ["updated_at", "2014-03-18 22:23:50.901691"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:23:50.907735"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:23:50.907735"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 5ms (ActiveRecord: 0.4ms)  (0.1ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:23:50.911945"], ["points", 1], ["updated_at", "2014-03-18 22:23:50.911945"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:23:50.913416"], ["updated_at", "2014-03-18 22:23:50.913416"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.2ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:23:50.921910"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:23:50.921910"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 7ms (ActiveRecord: 0.6ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:23:50.926776"], ["updated_at", "2014-03-18 22:23:50.926776"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:23:50.928291"], ["updated_at", "2014-03-18 22:23:50.928291"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:23:50.938033"], ["points", 1], ["updated_at", "2014-03-18 22:23:50.938033"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:23:50.939833"], ["points", 1], ["updated_at", "2014-03-18 22:23:50.939833"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:23:50.941372"], ["updated_at", "2014-03-18 22:23:50.941372"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:23:50.944379"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:23:50.944379"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:23:50.949745"], ["points", 1], ["updated_at", "2014-03-18 22:23:50.949745"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:23:50.951227"], ["points", 1], ["updated_at", "2014-03-18 22:23:50.951227"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:23:50.952382"], ["updated_at", "2014-03-18 22:23:50.952382"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.4ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:23:50.956678"], ["points", 1], ["updated_at", "2014-03-18 22:23:50.956678"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:23:50.957948"], ["updated_at", "2014-03-18 22:23:50.957948"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:23:50.961473"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:23:50.961473"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:23:50.965905"], ["points", 1], ["updated_at", "2014-03-18 22:23:50.965905"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:23:50.968120"], ["updated_at", "2014-03-18 22:23:50.968120"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:23:50.971265"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:23:50.971265"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:23:51.014094"], ["points", 1], ["updated_at", "2014-03-18 22:23:51.014094"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:23:51.015642"], ["points", 1], ["updated_at", "2014-03-18 22:23:51.015642"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:23:51.016876"], ["points", 1], ["updated_at", "2014-03-18 22:23:51.016876"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:23:51.017882"], ["updated_at", "2014-03-18 22:23:51.017882"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:23:51.020611"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:23:51.020611"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:23:51.025471"], ["goal_id", 2], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:23:51.025471"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 3) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:23:51.028769"], ["goal_id", 3], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:23:51.028769"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:23:51.032543"], ["points", 1], ["updated_at", "2014-03-18 22:23:51.032543"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:23:51.034305"], ["updated_at", "2014-03-18 22:23:51.034305"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:23:51.036722"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:23:51.036722"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:23:51.040559"], ["points", 1], ["updated_at", "2014-03-18 22:23:51.040559"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:23:51.041948"], ["updated_at", "2014-03-18 22:23:51.041948"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:23:51.045656"], ["updated_at", "2014-03-18 22:23:51.045656"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "gamification_medals" ("created_at", "image", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-03-18 22:23:51.055588"], ["image", nil], ["name", "MyString"], ["updated_at", "2014-03-18 22:23:51.055588"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:23:51.060246"], ["points", 1], ["updated_at", "2014-03-18 22:23:51.060246"]] SQL (0.1ms) UPDATE "gamification_medals" SET "goal_id" = ?, "updated_at" = ? WHERE "gamification_medals"."id" = 1 [["goal_id", 1], ["updated_at", "2014-03-18 22:23:51.061134"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:23:51.063893"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:23:51.063893"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]]  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:23:51.070630"], ["updated_at", "2014-03-18 22:23:51.070630"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by ArticlesController#show as HTML Parameters: {"id"=>"1"} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Completed 200 OK in 6ms (Views: 5.5ms | ActiveRecord: 0.1ms)  (0.5ms) rollback transaction  (0.4ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:33:13.210121"], ["updated_at", "2014-03-18 22:33:13.210121"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "gamification_medals" ("created_at", "image", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-03-18 22:33:13.267469"], ["image", nil], ["name", "MyString"], ["updated_at", "2014-03-18 22:33:13.267469"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:33:13.278199"], ["points", 1], ["updated_at", "2014-03-18 22:33:13.278199"]] SQL (0.2ms) UPDATE "gamification_medals" SET "goal_id" = ?, "updated_at" = ? WHERE "gamification_medals"."id" = 1 [["goal_id", 1], ["updated_at", "2014-03-18 22:33:13.279407"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:33:13.299645"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:33:13.299645"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]]  (1.7ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:33:13.313238"], ["points", 1], ["updated_at", "2014-03-18 22:33:13.313238"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:33:13.314761"], ["points", 1], ["updated_at", "2014-03-18 22:33:13.314761"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:33:13.315950"], ["updated_at", "2014-03-18 22:33:13.315950"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.4ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:33:13.324442"], ["points", 1], ["updated_at", "2014-03-18 22:33:13.324442"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:33:13.326526"], ["updated_at", "2014-03-18 22:33:13.326526"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:33:13.329356"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:33:13.329356"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:33:13.334608"], ["points", 1], ["updated_at", "2014-03-18 22:33:13.334608"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:33:13.336046"], ["updated_at", "2014-03-18 22:33:13.336046"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:33:13.338592"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:33:13.338592"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:33:13.341968"], ["points", 1], ["updated_at", "2014-03-18 22:33:13.341968"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:33:13.343389"], ["points", 1], ["updated_at", "2014-03-18 22:33:13.343389"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:33:13.344703"], ["updated_at", "2014-03-18 22:33:13.344703"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:33:13.348407"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:33:13.348407"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:33:13.354052"], ["points", 1], ["updated_at", "2014-03-18 22:33:13.354052"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:33:13.355952"], ["points", 1], ["updated_at", "2014-03-18 22:33:13.355952"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:33:13.357207"], ["points", 1], ["updated_at", "2014-03-18 22:33:13.357207"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:33:13.358228"], ["updated_at", "2014-03-18 22:33:13.358228"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:33:13.361134"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:33:13.361134"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:33:13.365065"], ["goal_id", 2], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:33:13.365065"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 3) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:33:13.367389"], ["goal_id", 3], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:33:13.367389"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:33:13.370694"], ["points", 1], ["updated_at", "2014-03-18 22:33:13.370694"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:33:13.372155"], ["updated_at", "2014-03-18 22:33:13.372155"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.3ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:33:13.375698"], ["points", 1], ["updated_at", "2014-03-18 22:33:13.375698"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:33:13.377046"], ["updated_at", "2014-03-18 22:33:13.377046"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:33:13.379263"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:33:13.379263"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:33:13.385563"], ["updated_at", "2014-03-18 22:33:13.385563"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ArticlesController#show as HTML Parameters: {"id"=>"1"} Article Load (0.2ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Rendered articles/show.html.erb within layouts/application (0.2ms) Completed 200 OK in 7ms (Views: 5.5ms | ActiveRecord: 0.2ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:33:13.402446"], ["updated_at", "2014-03-18 22:33:13.402446"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:33:13.403892"], ["updated_at", "2014-03-18 22:33:13.403892"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:33:13.448919"], ["updated_at", "2014-03-18 22:33:13.448919"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."seen_at" IS NULL  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:33:13.453463"], ["seen_at", "2014-03-16 22:33:13.451738"], ["updated_at", "2014-03-18 22:33:13.453463"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:33:13.457439"], ["updated_at", "2014-03-18 22:33:13.457439"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:33:13.461782"], ["updated_at", "2014-03-18 22:33:13.461782"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "gamification_rewards" SET "updated_at" = '2014-03-18 22:33:13.462836', "seen_at" = '2014-03-18 22:33:13.462836' WHERE "gamification_rewards"."id" = 1  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:33:13.466678"], ["seen_at", "2014-03-16 22:33:13.465089"], ["updated_at", "2014-03-18 22:33:13.466678"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE ("gamification_rewards"."seen_at" IS NOT NULL)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:33:13.471302"], ["points", 1], ["updated_at", "2014-03-18 22:33:13.471302"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:33:13.472735"], ["updated_at", "2014-03-18 22:33:13.472735"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:33:13.479297"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:33:13.479297"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 5ms (ActiveRecord: 0.5ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:33:13.484221"], ["points", 1], ["updated_at", "2014-03-18 22:33:13.484221"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:33:13.485794"], ["updated_at", "2014-03-18 22:33:13.485794"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:33:13.493786"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:33:13.493786"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 7ms (ActiveRecord: 0.6ms)  (0.1ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.5ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:33:13.498438"], ["updated_at", "2014-03-18 22:33:13.498438"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:33:13.500122"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 22:33:13.500122"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:33:13.501597"], ["updated_at", "2014-03-18 22:33:13.501597"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:33:13.509007"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:33:13.509007"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 7ms (ActiveRecord: 0.6ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:33:13.512901"], ["updated_at", "2014-03-18 22:33:13.512901"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:33:13.514546"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 22:33:13.514546"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:33:13.515906"], ["updated_at", "2014-03-18 22:33:13.515906"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.2ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:33:13.523334"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:33:13.523334"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 7ms (ActiveRecord: 0.7ms)  (0.1ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.5ms) rollback transaction  (0.3ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.2ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.5ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:33:59.221460"], ["updated_at", "2014-03-18 22:33:59.221460"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (1.0ms) UPDATE "gamification_rewards" SET "updated_at" = '2014-03-18 22:33:59.223413', "seen_at" = '2014-03-18 22:33:59.223413' WHERE "gamification_rewards"."id" = 1  (0.1ms) RELEASE SAVEPOINT active_record_1  (1.9ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:33:59.234129"], ["updated_at", "2014-03-18 22:33:59.234129"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."seen_at" IS NULL  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:33:59.243138"], ["seen_at", "2014-03-16 22:33:59.241400"], ["updated_at", "2014-03-18 22:33:59.243138"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE ("gamification_rewards"."seen_at" IS NOT NULL)  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:33:59.247933"], ["seen_at", "2014-03-16 22:33:59.246368"], ["updated_at", "2014-03-18 22:33:59.247933"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:33:59.251385"], ["updated_at", "2014-03-18 22:33:59.251385"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:33:59.256761"], ["updated_at", "2014-03-18 22:33:59.256761"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:33:59.261055"], ["updated_at", "2014-03-18 22:33:59.261055"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:33:59.282626"], ["points", 1], ["updated_at", "2014-03-18 22:33:59.282626"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:33:59.284320"], ["updated_at", "2014-03-18 22:33:59.284320"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:33:59.298027"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:33:59.298027"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 11ms (ActiveRecord: 0.6ms)  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:33:59.302170"], ["points", 1], ["updated_at", "2014-03-18 22:33:59.302170"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:33:59.303527"], ["updated_at", "2014-03-18 22:33:59.303527"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.2ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.2ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:33:59.314142"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:33:59.314142"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 10ms (ActiveRecord: 0.9ms)  (0.1ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:33:59.320102"], ["updated_at", "2014-03-18 22:33:59.320102"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:33:59.322797"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 22:33:59.322797"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:33:59.324535"], ["updated_at", "2014-03-18 22:33:59.324535"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:33:59.331882"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:33:59.331882"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 7ms (ActiveRecord: 0.6ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:33:59.335996"], ["updated_at", "2014-03-18 22:33:59.335996"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:33:59.337725"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 22:33:59.337725"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:33:59.339099"], ["updated_at", "2014-03-18 22:33:59.339099"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:33:59.346098"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:33:59.346098"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 7ms (ActiveRecord: 0.7ms)  (0.1ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:33:59.352000"], ["points", 1], ["updated_at", "2014-03-18 22:33:59.352000"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:33:59.353650"], ["points", 1], ["updated_at", "2014-03-18 22:33:59.353650"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:33:59.354868"], ["updated_at", "2014-03-18 22:33:59.354868"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:33:59.360889"], ["points", 1], ["updated_at", "2014-03-18 22:33:59.360889"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:33:59.363020"], ["points", 1], ["updated_at", "2014-03-18 22:33:59.363020"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:33:59.364685"], ["points", 1], ["updated_at", "2014-03-18 22:33:59.364685"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:33:59.366250"], ["updated_at", "2014-03-18 22:33:59.366250"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:33:59.369291"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:33:59.369291"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:33:59.372838"], ["goal_id", 2], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:33:59.372838"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 3) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:33:59.375094"], ["goal_id", 3], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:33:59.375094"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:33:59.377974"], ["points", 1], ["updated_at", "2014-03-18 22:33:59.377974"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:33:59.379307"], ["points", 1], ["updated_at", "2014-03-18 22:33:59.379307"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:33:59.380457"], ["updated_at", "2014-03-18 22:33:59.380457"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:33:59.419786"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:33:59.419786"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:33:59.424618"], ["points", 1], ["updated_at", "2014-03-18 22:33:59.424618"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:33:59.426055"], ["updated_at", "2014-03-18 22:33:59.426055"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:33:59.428935"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:33:59.428935"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:33:59.436212"], ["points", 1], ["updated_at", "2014-03-18 22:33:59.436212"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:33:59.438443"], ["updated_at", "2014-03-18 22:33:59.438443"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:33:59.442118"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:33:59.442118"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:33:59.445903"], ["points", 1], ["updated_at", "2014-03-18 22:33:59.445903"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:33:59.447342"], ["updated_at", "2014-03-18 22:33:59.447342"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.3ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:33:59.450790"], ["points", 1], ["updated_at", "2014-03-18 22:33:59.450790"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:33:59.452090"], ["updated_at", "2014-03-18 22:33:59.452090"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:33:59.454242"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:33:59.454242"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:33:59.459428"], ["updated_at", "2014-03-18 22:33:59.459428"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by ArticlesController#show as HTML Parameters: {"id"=>"1"} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Completed 200 OK in 6ms (Views: 4.9ms | ActiveRecord: 0.1ms)  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:33:59.470980"], ["updated_at", "2014-03-18 22:33:59.470980"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "gamification_medals" ("created_at", "image", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-03-18 22:33:59.481181"], ["image", nil], ["name", "MyString"], ["updated_at", "2014-03-18 22:33:59.481181"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:33:59.485737"], ["points", 1], ["updated_at", "2014-03-18 22:33:59.485737"]] SQL (0.1ms) UPDATE "gamification_medals" SET "goal_id" = ?, "updated_at" = ? WHERE "gamification_medals"."id" = 1 [["goal_id", 1], ["updated_at", "2014-03-18 22:33:59.486703"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:33:59.489364"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:33:59.489364"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]]  (0.6ms) rollback transaction  (0.3ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:34:34.525122"], ["updated_at", "2014-03-18 22:34:34.525122"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:34:34.570462"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 22:34:34.570462"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:34:34.573905"], ["updated_at", "2014-03-18 22:34:34.573905"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:34:34.612890"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:34:34.612890"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 35ms (ActiveRecord: 1.2ms)  (0.1ms) SELECT COUNT(*) FROM "gamification_rewards"  (2.0ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:34:34.619819"], ["updated_at", "2014-03-18 22:34:34.619819"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:34:34.621735"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 22:34:34.621735"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:34:34.623097"], ["updated_at", "2014-03-18 22:34:34.623097"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:34:34.629733"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:34:34.629733"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 6ms (ActiveRecord: 0.5ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:34:34.634387"], ["points", 1], ["updated_at", "2014-03-18 22:34:34.634387"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:34:34.636426"], ["updated_at", "2014-03-18 22:34:34.636426"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:34:34.643100"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:34:34.643100"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 5ms (ActiveRecord: 0.5ms)  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:34:34.647330"], ["points", 1], ["updated_at", "2014-03-18 22:34:34.647330"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:34:34.648634"], ["updated_at", "2014-03-18 22:34:34.648634"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:34:34.655079"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:34:34.655079"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 6ms (ActiveRecord: 0.6ms)  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:34:34.660356"], ["updated_at", "2014-03-18 22:34:34.660356"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "gamification_medals" ("created_at", "image", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-03-18 22:34:34.670841"], ["image", nil], ["name", "MyString"], ["updated_at", "2014-03-18 22:34:34.670841"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:34:34.676267"], ["points", 1], ["updated_at", "2014-03-18 22:34:34.676267"]] SQL (0.2ms) UPDATE "gamification_medals" SET "goal_id" = ?, "updated_at" = ? WHERE "gamification_medals"."id" = 1 [["goal_id", 1], ["updated_at", "2014-03-18 22:34:34.677860"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:34:34.681603"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:34:34.681603"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:34:34.687081"], ["updated_at", "2014-03-18 22:34:34.687081"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ArticlesController#show as HTML Parameters: {"id"=>"1"} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Completed 200 OK in 6ms (Views: 4.9ms | ActiveRecord: 0.0ms)  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:34:34.700421"], ["seen_at", "2014-03-16 22:34:34.698391"], ["updated_at", "2014-03-18 22:34:34.700421"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE ("gamification_rewards"."seen_at" IS NOT NULL)  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.2ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:34:34.705293"], ["updated_at", "2014-03-18 22:34:34.705293"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "gamification_rewards" SET "updated_at" = '2014-03-18 22:34:34.706583', "seen_at" = '2014-03-18 22:34:34.706583' WHERE "gamification_rewards"."id" = 1  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:34:34.710648"], ["updated_at", "2014-03-18 22:34:34.710648"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."seen_at" IS NULL  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.2ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:34:34.715001"], ["updated_at", "2014-03-18 22:34:34.715001"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.2ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.2ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:34:34.720721"], ["seen_at", "2014-03-16 22:34:34.717771"], ["updated_at", "2014-03-18 22:34:34.720721"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:34:34.724441"], ["points", 1], ["updated_at", "2014-03-18 22:34:34.724441"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:34:34.725776"], ["updated_at", "2014-03-18 22:34:34.725776"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:34:34.728288"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:34:34.728288"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:34:34.731487"], ["points", 1], ["updated_at", "2014-03-18 22:34:34.731487"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:34:34.733081"], ["updated_at", "2014-03-18 22:34:34.733081"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:34:34.735669"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:34:34.735669"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:34:34.779700"], ["points", 1], ["updated_at", "2014-03-18 22:34:34.779700"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:34:34.781124"], ["points", 1], ["updated_at", "2014-03-18 22:34:34.781124"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:34:34.782280"], ["updated_at", "2014-03-18 22:34:34.782280"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:34:34.784596"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:34:34.784596"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.4ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:34:34.788733"], ["points", 1], ["updated_at", "2014-03-18 22:34:34.788733"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:34:34.790107"], ["points", 1], ["updated_at", "2014-03-18 22:34:34.790107"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:34:34.791246"], ["updated_at", "2014-03-18 22:34:34.791246"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:34:34.795423"], ["points", 1], ["updated_at", "2014-03-18 22:34:34.795423"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:34:34.796696"], ["points", 1], ["updated_at", "2014-03-18 22:34:34.796696"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:34:34.797898"], ["points", 1], ["updated_at", "2014-03-18 22:34:34.797898"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:34:34.799369"], ["updated_at", "2014-03-18 22:34:34.799369"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:34:34.802208"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:34:34.802208"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:34:34.806726"], ["goal_id", 2], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:34:34.806726"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 3) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:34:34.809015"], ["goal_id", 3], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:34:34.809015"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:34:34.812067"], ["points", 1], ["updated_at", "2014-03-18 22:34:34.812067"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:34:34.813749"], ["updated_at", "2014-03-18 22:34:34.813749"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:34:34.816901"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:34:34.816901"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:34:34.821184"], ["points", 1], ["updated_at", "2014-03-18 22:34:34.821184"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:34:34.822608"], ["updated_at", "2014-03-18 22:34:34.822608"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:34:34.827140"], ["updated_at", "2014-03-18 22:34:34.827140"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:34:34.828477"], ["updated_at", "2014-03-18 22:34:34.828477"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.3ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:35:41.026655"], ["updated_at", "2014-03-18 22:35:41.026655"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:35:41.073451"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 22:35:41.073451"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:35:41.077531"], ["updated_at", "2014-03-18 22:35:41.077531"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:35:41.118106"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:35:41.118106"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 36ms (ActiveRecord: 1.3ms)  (0.1ms) SELECT COUNT(*) FROM "gamification_rewards"  (1.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:35:41.124477"], ["updated_at", "2014-03-18 22:35:41.124477"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:35:41.126224"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 22:35:41.126224"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:35:41.127836"], ["updated_at", "2014-03-18 22:35:41.127836"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:35:41.136106"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:35:41.136106"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 7ms (ActiveRecord: 0.6ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:35:41.140476"], ["points", 1], ["updated_at", "2014-03-18 22:35:41.140476"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:35:41.141920"], ["updated_at", "2014-03-18 22:35:41.141920"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:35:41.147873"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:35:41.147873"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 5ms (ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.5ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:35:41.152257"], ["points", 1], ["updated_at", "2014-03-18 22:35:41.152257"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:35:41.153768"], ["updated_at", "2014-03-18 22:35:41.153768"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:35:41.161158"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:35:41.161158"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 6ms (ActiveRecord: 0.5ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:35:41.167264"], ["updated_at", "2014-03-18 22:35:41.167264"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:35:41.169291"], ["updated_at", "2014-03-18 22:35:41.169291"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:35:41.179451"], ["points", 1], ["updated_at", "2014-03-18 22:35:41.179451"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:35:41.181017"], ["points", 1], ["updated_at", "2014-03-18 22:35:41.181017"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:35:41.182330"], ["updated_at", "2014-03-18 22:35:41.182330"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:35:41.185397"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:35:41.185397"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:35:41.191867"], ["points", 1], ["updated_at", "2014-03-18 22:35:41.191867"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:35:41.193819"], ["updated_at", "2014-03-18 22:35:41.193819"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:35:41.197698"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:35:41.197698"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:35:41.204389"], ["points", 1], ["updated_at", "2014-03-18 22:35:41.204389"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:35:41.207323"], ["updated_at", "2014-03-18 22:35:41.207323"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.3ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:35:41.212742"], ["points", 1], ["updated_at", "2014-03-18 22:35:41.212742"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:35:41.214441"], ["updated_at", "2014-03-18 22:35:41.214441"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:35:41.217251"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:35:41.217251"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:35:41.221483"], ["points", 1], ["updated_at", "2014-03-18 22:35:41.221483"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:35:41.223375"], ["updated_at", "2014-03-18 22:35:41.223375"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:35:41.226571"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:35:41.226571"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:35:41.271650"], ["points", 1], ["updated_at", "2014-03-18 22:35:41.271650"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:35:41.274243"], ["points", 1], ["updated_at", "2014-03-18 22:35:41.274243"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:35:41.276596"], ["points", 1], ["updated_at", "2014-03-18 22:35:41.276596"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:35:41.278698"], ["updated_at", "2014-03-18 22:35:41.278698"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:35:41.282227"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:35:41.282227"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.2ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:35:41.288103"], ["goal_id", 2], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:35:41.288103"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 3) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:35:41.290434"], ["goal_id", 3], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:35:41.290434"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:35:41.293431"], ["points", 1], ["updated_at", "2014-03-18 22:35:41.293431"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:35:41.294898"], ["points", 1], ["updated_at", "2014-03-18 22:35:41.294898"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:35:41.296151"], ["updated_at", "2014-03-18 22:35:41.296151"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.3ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:35:41.300481"], ["updated_at", "2014-03-18 22:35:41.300481"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "gamification_medals" ("created_at", "image", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-03-18 22:35:41.310594"], ["image", nil], ["name", "MyString"], ["updated_at", "2014-03-18 22:35:41.310594"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:35:41.316941"], ["points", 1], ["updated_at", "2014-03-18 22:35:41.316941"]] SQL (0.3ms) UPDATE "gamification_medals" SET "goal_id" = ?, "updated_at" = ? WHERE "gamification_medals"."id" = 1 [["goal_id", 1], ["updated_at", "2014-03-18 22:35:41.318812"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:35:41.323660"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:35:41.323660"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.2ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:35:41.332116"], ["updated_at", "2014-03-18 22:35:41.332116"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.2ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:35:41.337342"], ["seen_at", "2014-03-16 22:35:41.334879"], ["updated_at", "2014-03-18 22:35:41.337342"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:35:41.342863"], ["seen_at", "2014-03-16 22:35:41.341021"], ["updated_at", "2014-03-18 22:35:41.342863"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE ("gamification_rewards"."seen_at" IS NOT NULL)  (0.3ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:35:41.347520"], ["updated_at", "2014-03-18 22:35:41.347520"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."seen_at" IS NULL  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:35:41.351594"], ["updated_at", "2014-03-18 22:35:41.351594"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "gamification_rewards" SET "updated_at" = '2014-03-18 22:35:41.352645', "seen_at" = '2014-03-18 22:35:41.352645' WHERE "gamification_rewards"."id" = 1  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:35:41.356061"], ["updated_at", "2014-03-18 22:35:41.356061"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ArticlesController#show as HTML Parameters: {"id"=>"1"} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Completed 200 OK in 7ms (Views: 5.8ms | ActiveRecord: 0.0ms)  (0.4ms) rollback transaction  (0.4ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:36:29.395695"], ["updated_at", "2014-03-18 22:36:29.395695"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:36:29.441154"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 22:36:29.441154"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:36:29.444629"], ["updated_at", "2014-03-18 22:36:29.444629"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:36:29.479873"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:36:29.479873"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 31ms (ActiveRecord: 1.1ms)  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards"  (1.9ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:36:29.486601"], ["updated_at", "2014-03-18 22:36:29.486601"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:36:29.488521"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 22:36:29.488521"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:36:29.489874"], ["updated_at", "2014-03-18 22:36:29.489874"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:36:29.497228"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:36:29.497228"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 6ms (ActiveRecord: 0.5ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:36:29.501450"], ["points", 1], ["updated_at", "2014-03-18 22:36:29.501450"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:36:29.502933"], ["updated_at", "2014-03-18 22:36:29.502933"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:36:29.508641"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:36:29.508641"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 5ms (ActiveRecord: 0.4ms)  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:36:29.512692"], ["points", 1], ["updated_at", "2014-03-18 22:36:29.512692"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:36:29.514081"], ["updated_at", "2014-03-18 22:36:29.514081"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:36:29.519839"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:36:29.519839"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 5ms (ActiveRecord: 0.5ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:36:29.524697"], ["updated_at", "2014-03-18 22:36:29.524697"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "gamification_medals" ("created_at", "image", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-03-18 22:36:29.534196"], ["image", nil], ["name", "MyString"], ["updated_at", "2014-03-18 22:36:29.534196"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:36:29.538847"], ["points", 1], ["updated_at", "2014-03-18 22:36:29.538847"]] SQL (0.1ms) UPDATE "gamification_medals" SET "goal_id" = ?, "updated_at" = ? WHERE "gamification_medals"."id" = 1 [["goal_id", 1], ["updated_at", "2014-03-18 22:36:29.539751"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:36:29.542751"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:36:29.542751"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]]  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:36:29.548529"], ["updated_at", "2014-03-18 22:36:29.548529"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by ArticlesController#show as HTML Parameters: {"id"=>"1"} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Completed 200 OK in 6ms (Views: 4.8ms | ActiveRecord: 0.0ms)  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:36:29.560296"], ["updated_at", "2014-03-18 22:36:29.560296"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:36:29.561737"], ["updated_at", "2014-03-18 22:36:29.561737"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:36:29.608787"], ["seen_at", "2014-03-16 22:36:29.607027"], ["updated_at", "2014-03-18 22:36:29.608787"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE ("gamification_rewards"."seen_at" IS NOT NULL)  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:36:29.613116"], ["updated_at", "2014-03-18 22:36:29.613116"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "gamification_rewards" SET "updated_at" = '2014-03-18 22:36:29.614146', "seen_at" = '2014-03-18 22:36:29.614146' WHERE "gamification_rewards"."id" = 1  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.2ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:36:29.618178"], ["updated_at", "2014-03-18 22:36:29.618178"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."seen_at" IS NULL  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:36:29.622747"], ["updated_at", "2014-03-18 22:36:29.622747"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:36:29.626308"], ["seen_at", "2014-03-16 22:36:29.624892"], ["updated_at", "2014-03-18 22:36:29.626308"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:36:29.629996"], ["points", 1], ["updated_at", "2014-03-18 22:36:29.629996"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:36:29.631361"], ["updated_at", "2014-03-18 22:36:29.631361"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:36:29.633598"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:36:29.633598"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:36:29.637370"], ["points", 1], ["updated_at", "2014-03-18 22:36:29.637370"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:36:29.638869"], ["updated_at", "2014-03-18 22:36:29.638869"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:36:29.643542"], ["points", 1], ["updated_at", "2014-03-18 22:36:29.643542"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:36:29.645135"], ["points", 1], ["updated_at", "2014-03-18 22:36:29.645135"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:36:29.646312"], ["updated_at", "2014-03-18 22:36:29.646312"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:36:29.650953"], ["points", 1], ["updated_at", "2014-03-18 22:36:29.650953"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:36:29.652290"], ["points", 1], ["updated_at", "2014-03-18 22:36:29.652290"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:36:29.653421"], ["points", 1], ["updated_at", "2014-03-18 22:36:29.653421"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:36:29.654344"], ["updated_at", "2014-03-18 22:36:29.654344"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:36:29.656424"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:36:29.656424"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:36:29.660261"], ["goal_id", 2], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:36:29.660261"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 3) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:36:29.662687"], ["goal_id", 3], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:36:29.662687"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:36:29.665709"], ["points", 1], ["updated_at", "2014-03-18 22:36:29.665709"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:36:29.667074"], ["points", 1], ["updated_at", "2014-03-18 22:36:29.667074"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:36:29.668217"], ["updated_at", "2014-03-18 22:36:29.668217"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:36:29.670492"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:36:29.670492"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:36:29.674613"], ["points", 1], ["updated_at", "2014-03-18 22:36:29.674613"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:36:29.676033"], ["updated_at", "2014-03-18 22:36:29.676033"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:36:29.678495"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:36:29.678495"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:36:29.681625"], ["points", 1], ["updated_at", "2014-03-18 22:36:29.681625"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:36:29.683460"], ["updated_at", "2014-03-18 22:36:29.683460"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:36:29.686137"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:36:29.686137"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.5ms) rollback transaction  (0.3ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:37:09.652131"], ["points", 1], ["updated_at", "2014-03-18 22:37:09.652131"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:37:09.686007"], ["points", 1], ["updated_at", "2014-03-18 22:37:09.686007"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:37:09.688279"], ["points", 1], ["updated_at", "2014-03-18 22:37:09.688279"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:37:09.690580"], ["updated_at", "2014-03-18 22:37:09.690580"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:37:09.711081"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:37:09.711081"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:37:09.723417"], ["goal_id", 2], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:37:09.723417"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 3) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:37:09.725737"], ["goal_id", 3], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:37:09.725737"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (1.7ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:37:09.730806"], ["points", 1], ["updated_at", "2014-03-18 22:37:09.730806"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:37:09.732352"], ["updated_at", "2014-03-18 22:37:09.732352"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:37:09.734627"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:37:09.734627"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:37:09.740082"], ["points", 1], ["updated_at", "2014-03-18 22:37:09.740082"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:37:09.742060"], ["updated_at", "2014-03-18 22:37:09.742060"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:37:09.744709"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:37:09.744709"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:37:09.748191"], ["points", 1], ["updated_at", "2014-03-18 22:37:09.748191"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:37:09.749572"], ["updated_at", "2014-03-18 22:37:09.749572"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.4ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:37:09.753085"], ["points", 1], ["updated_at", "2014-03-18 22:37:09.753085"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:37:09.754375"], ["updated_at", "2014-03-18 22:37:09.754375"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:37:09.756503"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:37:09.756503"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:37:09.760223"], ["points", 1], ["updated_at", "2014-03-18 22:37:09.760223"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:37:09.761577"], ["points", 1], ["updated_at", "2014-03-18 22:37:09.761577"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:37:09.762686"], ["updated_at", "2014-03-18 22:37:09.762686"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:37:09.765579"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:37:09.765579"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:37:09.770988"], ["points", 1], ["updated_at", "2014-03-18 22:37:09.770988"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:37:09.772729"], ["points", 1], ["updated_at", "2014-03-18 22:37:09.772729"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:37:09.774449"], ["updated_at", "2014-03-18 22:37:09.774449"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:37:09.779682"], ["updated_at", "2014-03-18 22:37:09.779682"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "gamification_medals" ("created_at", "image", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-03-18 22:37:09.790877"], ["image", nil], ["name", "MyString"], ["updated_at", "2014-03-18 22:37:09.790877"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:37:09.796092"], ["points", 1], ["updated_at", "2014-03-18 22:37:09.796092"]] SQL (0.2ms) UPDATE "gamification_medals" SET "goal_id" = ?, "updated_at" = ? WHERE "gamification_medals"."id" = 1 [["goal_id", 1], ["updated_at", "2014-03-18 22:37:09.797416"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:37:09.801138"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:37:09.801138"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.2ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:37:09.808988"], ["seen_at", "2014-03-16 22:37:09.806534"], ["updated_at", "2014-03-18 22:37:09.808988"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:37:09.813384"], ["updated_at", "2014-03-18 22:37:09.813384"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:37:09.817727"], ["updated_at", "2014-03-18 22:37:09.817727"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."seen_at" IS NULL  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.2ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:37:09.823416"], ["seen_at", "2014-03-16 22:37:09.821199"], ["updated_at", "2014-03-18 22:37:09.823416"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE ("gamification_rewards"."seen_at" IS NOT NULL)  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.2ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.4ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:37:09.829964"], ["updated_at", "2014-03-18 22:37:09.829964"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "gamification_rewards" SET "updated_at" = '2014-03-18 22:37:09.831784', "seen_at" = '2014-03-18 22:37:09.831784' WHERE "gamification_rewards"."id" = 1  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:37:09.837226"], ["points", 1], ["updated_at", "2014-03-18 22:37:09.837226"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:37:09.838856"], ["updated_at", "2014-03-18 22:37:09.838856"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:37:09.846850"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:37:09.846850"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 6ms (ActiveRecord: 0.5ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:37:09.851901"], ["points", 1], ["updated_at", "2014-03-18 22:37:09.851901"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:37:09.853608"], ["updated_at", "2014-03-18 22:37:09.853608"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:37:09.860183"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:37:09.860183"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 5ms (ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:37:09.865901"], ["updated_at", "2014-03-18 22:37:09.865901"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:37:09.870444"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 22:37:09.870444"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:37:09.872869"], ["updated_at", "2014-03-18 22:37:09.872869"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:37:09.883013"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:37:09.883013"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 9ms (ActiveRecord: 0.8ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:37:09.887496"], ["updated_at", "2014-03-18 22:37:09.887496"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:37:09.889432"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 22:37:09.889432"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:37:09.891004"], ["updated_at", "2014-03-18 22:37:09.891004"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:37:09.899713"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:37:09.899713"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 7ms (ActiveRecord: 0.6ms)  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:37:09.906750"], ["updated_at", "2014-03-18 22:37:09.906750"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:37:09.908935"], ["updated_at", "2014-03-18 22:37:09.908935"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:37:09.962472"], ["updated_at", "2014-03-18 22:37:09.962472"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by ArticlesController#show as HTML Parameters: {"id"=>"1"} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Completed 200 OK in 6ms (Views: 5.3ms | ActiveRecord: 0.1ms)  (0.6ms) rollback transaction  (0.4ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.4ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:38:06.839198"], ["seen_at", "2014-03-16 22:38:06.787068"], ["updated_at", "2014-03-18 22:38:06.839198"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE ("gamification_rewards"."seen_at" IS NOT NULL)  (1.9ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_2 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:38:06.852479"], ["updated_at", "2014-03-18 22:38:06.852479"]]  (0.0ms) RELEASE SAVEPOINT active_record_2  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_2 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.9ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:38:06.855792"], ["seen_at", "2014-03-16 22:38:06.854405"], ["updated_at", "2014-03-18 22:38:06.855792"]]  (0.0ms) RELEASE SAVEPOINT active_record_2  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_2 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:38:06.859748"], ["updated_at", "2014-03-18 22:38:06.859748"]]  (0.0ms) RELEASE SAVEPOINT active_record_2 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."seen_at" IS NULL  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_2 SQL (0.1ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:38:06.864395"], ["updated_at", "2014-03-18 22:38:06.864395"]]  (0.0ms) RELEASE SAVEPOINT active_record_2 Processing by ArticlesController#show as HTML Parameters: {"id"=>"1"} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Rendered articles/show.html.erb within layouts/application (0.3ms) Completed 200 OK in 6ms (Views: 5.4ms | ActiveRecord: 0.1ms)  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_2 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:38:06.880269"], ["updated_at", "2014-03-18 22:38:06.880269"]]  (0.1ms) RELEASE SAVEPOINT active_record_2  (0.0ms) SAVEPOINT active_record_2 SQL (0.1ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:38:06.883852"], ["updated_at", "2014-03-18 22:38:06.883852"]]  (0.1ms) RELEASE SAVEPOINT active_record_2  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_2 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:38:06.898503"], ["points", 1], ["updated_at", "2014-03-18 22:38:06.898503"]]  (0.0ms) RELEASE SAVEPOINT active_record_2  (0.0ms) SAVEPOINT active_record_2 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:38:06.900074"], ["updated_at", "2014-03-18 22:38:06.900074"]]  (0.0ms) RELEASE SAVEPOINT active_record_2 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_2 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:38:06.908063"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:38:06.908063"]]  (0.0ms) RELEASE SAVEPOINT active_record_2  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_2 SQL (0.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:38:06.911031"], ["points", 1], ["updated_at", "2014-03-18 22:38:06.911031"]]  (0.0ms) RELEASE SAVEPOINT active_record_2  (0.0ms) SAVEPOINT active_record_2 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:38:06.912251"], ["updated_at", "2014-03-18 22:38:06.912251"]]  (0.0ms) RELEASE SAVEPOINT active_record_2  (0.0ms) SAVEPOINT active_record_2 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:38:06.914252"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:38:06.914252"]]  (0.0ms) RELEASE SAVEPOINT active_record_2 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_2 SQL (0.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:38:06.918384"], ["points", 1], ["updated_at", "2014-03-18 22:38:06.918384"]]  (0.0ms) RELEASE SAVEPOINT active_record_2  (0.0ms) SAVEPOINT active_record_2 SQL (0.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:38:06.919548"], ["points", 1], ["updated_at", "2014-03-18 22:38:06.919548"]]  (0.0ms) RELEASE SAVEPOINT active_record_2  (0.0ms) SAVEPOINT active_record_2 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:38:06.920504"], ["updated_at", "2014-03-18 22:38:06.920504"]]  (0.0ms) RELEASE SAVEPOINT active_record_2 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_2 SQL (0.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:38:06.924508"], ["points", 1], ["updated_at", "2014-03-18 22:38:06.924508"]]  (0.0ms) RELEASE SAVEPOINT active_record_2  (0.0ms) SAVEPOINT active_record_2 SQL (0.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:38:06.925719"], ["points", 1], ["updated_at", "2014-03-18 22:38:06.925719"]]  (0.0ms) RELEASE SAVEPOINT active_record_2  (0.0ms) SAVEPOINT active_record_2 SQL (0.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:38:06.926868"], ["points", 1], ["updated_at", "2014-03-18 22:38:06.926868"]]  (0.1ms) RELEASE SAVEPOINT active_record_2  (0.0ms) SAVEPOINT active_record_2 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:38:06.928345"], ["updated_at", "2014-03-18 22:38:06.928345"]]  (0.0ms) RELEASE SAVEPOINT active_record_2  (0.1ms) SAVEPOINT active_record_2 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:38:06.930728"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:38:06.930728"]]  (0.0ms) RELEASE SAVEPOINT active_record_2 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (30.6ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.1ms) SAVEPOINT active_record_2 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:38:06.966328"], ["goal_id", 2], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:38:06.966328"]]  (0.0ms) RELEASE SAVEPOINT active_record_2 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]]  (0.0ms) SAVEPOINT active_record_2 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 3) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:38:06.969030"], ["goal_id", 3], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:38:06.969030"]]  (0.0ms) RELEASE SAVEPOINT active_record_2  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_2 SQL (0.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:38:06.971727"], ["points", 1], ["updated_at", "2014-03-18 22:38:06.971727"]]  (0.0ms) RELEASE SAVEPOINT active_record_2  (0.0ms) SAVEPOINT active_record_2 SQL (0.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:38:06.973060"], ["points", 1], ["updated_at", "2014-03-18 22:38:06.973060"]]  (0.0ms) RELEASE SAVEPOINT active_record_2  (0.0ms) SAVEPOINT active_record_2 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:38:06.974128"], ["updated_at", "2014-03-18 22:38:06.974128"]]  (0.0ms) RELEASE SAVEPOINT active_record_2 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_2 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:38:06.976474"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:38:06.976474"]]  (0.0ms) RELEASE SAVEPOINT active_record_2 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_2 SQL (0.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:38:06.980497"], ["points", 1], ["updated_at", "2014-03-18 22:38:06.980497"]]  (0.0ms) RELEASE SAVEPOINT active_record_2  (0.0ms) SAVEPOINT active_record_2 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:38:06.981686"], ["updated_at", "2014-03-18 22:38:06.981686"]]  (0.0ms) RELEASE SAVEPOINT active_record_2  (0.0ms) SAVEPOINT active_record_2 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:38:06.983681"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:38:06.983681"]]  (0.0ms) RELEASE SAVEPOINT active_record_2 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_2 SQL (0.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:38:06.986765"], ["points", 1], ["updated_at", "2014-03-18 22:38:06.986765"]]  (0.0ms) RELEASE SAVEPOINT active_record_2  (0.0ms) SAVEPOINT active_record_2 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:38:06.987935"], ["updated_at", "2014-03-18 22:38:06.987935"]]  (0.0ms) RELEASE SAVEPOINT active_record_2 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_2 SQL (0.1ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:38:06.991471"], ["updated_at", "2014-03-18 22:38:06.991471"]]  (0.0ms) RELEASE SAVEPOINT active_record_2  (0.0ms) SAVEPOINT active_record_2 SQL (0.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:38:06.992949"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 22:38:06.992949"]]  (0.0ms) RELEASE SAVEPOINT active_record_2  (0.0ms) SAVEPOINT active_record_2 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:38:06.994211"], ["updated_at", "2014-03-18 22:38:06.994211"]]  (0.0ms) RELEASE SAVEPOINT active_record_2 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_2 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:38:07.001819"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:38:07.001819"]]  (0.0ms) RELEASE SAVEPOINT active_record_2 Redirected to http://example.org Completed 302 Found in 6ms (ActiveRecord: 0.5ms)  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_2 SQL (0.1ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:38:07.006321"], ["updated_at", "2014-03-18 22:38:07.006321"]]  (0.0ms) RELEASE SAVEPOINT active_record_2  (0.1ms) SAVEPOINT active_record_2 SQL (0.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:38:07.008352"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 22:38:07.008352"]]  (0.0ms) RELEASE SAVEPOINT active_record_2  (0.0ms) SAVEPOINT active_record_2 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:38:07.009914"], ["updated_at", "2014-03-18 22:38:07.009914"]]  (0.0ms) RELEASE SAVEPOINT active_record_2 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_2 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:38:07.018727"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:38:07.018727"]]  (0.0ms) RELEASE SAVEPOINT active_record_2 Redirected to http://example.org Completed 302 Found in 8ms (ActiveRecord: 0.6ms)  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_2 SQL (0.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:38:07.022621"], ["points", 1], ["updated_at", "2014-03-18 22:38:07.022621"]]  (0.0ms) RELEASE SAVEPOINT active_record_2  (0.0ms) SAVEPOINT active_record_2 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:38:07.023879"], ["updated_at", "2014-03-18 22:38:07.023879"]]  (0.0ms) RELEASE SAVEPOINT active_record_2 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_2 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:38:07.029566"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:38:07.029566"]]  (0.0ms) RELEASE SAVEPOINT active_record_2 Redirected to http://example.org Completed 302 Found in 5ms (ActiveRecord: 0.4ms)  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_2 SQL (0.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:38:07.032958"], ["points", 1], ["updated_at", "2014-03-18 22:38:07.032958"]]  (0.0ms) RELEASE SAVEPOINT active_record_2  (0.0ms) SAVEPOINT active_record_2 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:38:07.034097"], ["updated_at", "2014-03-18 22:38:07.034097"]]  (0.0ms) RELEASE SAVEPOINT active_record_2 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_2 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:38:07.039440"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:38:07.039440"]]  (0.0ms) RELEASE SAVEPOINT active_record_2 Redirected to http://example.org Completed 302 Found in 4ms (ActiveRecord: 0.4ms)  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_2 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:38:07.042535"], ["updated_at", "2014-03-18 22:38:07.042535"]]  (0.0ms) RELEASE SAVEPOINT active_record_2  (0.1ms) SAVEPOINT active_record_2 SQL (0.2ms) INSERT INTO "gamification_medals" ("created_at", "image", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-03-18 22:38:07.052128"], ["image", nil], ["name", "MyString"], ["updated_at", "2014-03-18 22:38:07.052128"]]  (0.0ms) RELEASE SAVEPOINT active_record_2  (0.1ms) SAVEPOINT active_record_2 SQL (0.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:38:07.056661"], ["points", 1], ["updated_at", "2014-03-18 22:38:07.056661"]] SQL (0.1ms) UPDATE "gamification_medals" SET "goal_id" = ?, "updated_at" = ? WHERE "gamification_medals"."id" = 1 [["goal_id", 1], ["updated_at", "2014-03-18 22:38:07.057626"]]  (0.0ms) RELEASE SAVEPOINT active_record_2  (0.0ms) SAVEPOINT active_record_2 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:38:07.060395"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:38:07.060395"]]  (0.0ms) RELEASE SAVEPOINT active_record_2 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.4ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:38:53.304427"], ["updated_at", "2014-03-18 22:38:53.304427"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:38:53.308964"], ["seen_at", "2014-03-16 22:38:53.307297"], ["updated_at", "2014-03-18 22:38:53.308964"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:38:53.311115"], ["seen_at", "2014-03-16 22:38:53.311115"], ["updated_at", "2014-03-18 22:38:53.311115"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE ("gamification_rewards"."seen_at" IS NOT NULL)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:38:53.311115"], ["updated_at", "2014-03-18 22:38:53.311115"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."seen_at" IS NULL  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:38:53.311115"], ["updated_at", "2014-03-18 22:38:53.311115"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ArticlesController#show as HTML Parameters: {"id"=>"1"} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Rendered articles/show.html.erb within layouts/application (0.0ms) Completed 200 OK in 0ms (Views: 0.0ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:38:53.311115"], ["updated_at", "2014-03-18 22:38:53.311115"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "image", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-03-18 22:38:53.311115"], ["image", nil], ["name", "MyString"], ["updated_at", "2014-03-18 22:38:53.311115"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:38:53.311115"], ["points", 1], ["updated_at", "2014-03-18 22:38:53.311115"]] SQL (0.0ms) UPDATE "gamification_medals" SET "goal_id" = ? WHERE "gamification_medals"."id" = 1 [["goal_id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:38:53.311115"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:38:53.311115"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:38:53.311115"], ["points", 1], ["updated_at", "2014-03-18 22:38:53.311115"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:38:53.311115"], ["points", 1], ["updated_at", "2014-03-18 22:38:53.311115"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:38:53.311115"], ["updated_at", "2014-03-18 22:38:53.311115"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:38:53.311115"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:38:53.311115"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:38:53.311115"], ["points", 1], ["updated_at", "2014-03-18 22:38:53.311115"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:38:53.311115"], ["updated_at", "2014-03-18 22:38:53.311115"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:38:53.311115"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:38:53.311115"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:38:53.311115"], ["points", 1], ["updated_at", "2014-03-18 22:38:53.311115"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:38:53.311115"], ["updated_at", "2014-03-18 22:38:53.311115"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:38:53.311115"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:38:53.311115"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:38:53.311115"], ["points", 1], ["updated_at", "2014-03-18 22:38:53.311115"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:38:53.311115"], ["points", 1], ["updated_at", "2014-03-18 22:38:53.311115"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:38:53.311115"], ["points", 1], ["updated_at", "2014-03-18 22:38:53.311115"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:38:53.311115"], ["updated_at", "2014-03-18 22:38:53.311115"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:38:53.311115"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:38:53.311115"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:38:53.311115"], ["goal_id", 2], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:38:53.311115"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 3) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:38:53.311115"], ["goal_id", 3], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:38:53.311115"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:38:53.311115"], ["points", 1], ["updated_at", "2014-03-18 22:38:53.311115"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:38:53.311115"], ["updated_at", "2014-03-18 22:38:53.311115"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:38:53.311115"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:38:53.311115"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:38:53.311115"], ["points", 1], ["updated_at", "2014-03-18 22:38:53.311115"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:38:53.311115"], ["updated_at", "2014-03-18 22:38:53.311115"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:38:53.311115"], ["points", 1], ["updated_at", "2014-03-18 22:38:53.311115"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:38:53.311115"], ["points", 1], ["updated_at", "2014-03-18 22:38:53.311115"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:38:53.311115"], ["updated_at", "2014-03-18 22:38:53.311115"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:38:53.311115"], ["updated_at", "2014-03-18 22:38:53.311115"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:38:53.311115"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 22:38:53.311115"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:38:53.311115"], ["updated_at", "2014-03-18 22:38:53.311115"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:38:53.311115"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:38:53.311115"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:38:53.311115"], ["updated_at", "2014-03-18 22:38:53.311115"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:38:53.311115"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 22:38:53.311115"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:38:53.311115"], ["updated_at", "2014-03-18 22:38:53.311115"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:38:53.311115"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:38:53.311115"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:38:53.311115"], ["points", 1], ["updated_at", "2014-03-18 22:38:53.311115"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:38:53.311115"], ["updated_at", "2014-03-18 22:38:53.311115"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:38:53.311115"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:38:53.311115"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:38:53.311115"], ["points", 1], ["updated_at", "2014-03-18 22:38:53.311115"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:38:53.311115"], ["updated_at", "2014-03-18 22:38:53.311115"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:38:53.311115"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:38:53.311115"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:38:53.311115"], ["updated_at", "2014-03-18 22:38:53.311115"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:38:53.311115"], ["updated_at", "2014-03-18 22:38:53.311115"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.3ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:40:23.124802"], ["points", 1], ["updated_at", "2014-03-18 22:40:23.124802"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:40:23.129099"], ["updated_at", "2014-03-18 22:40:23.129099"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:40:23.163128"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:40:23.163128"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 29ms (ActiveRecord: 1.0ms)  (2.0ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:40:23.169228"], ["points", 1], ["updated_at", "2014-03-18 22:40:23.169228"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:40:23.170813"], ["updated_at", "2014-03-18 22:40:23.170813"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:40:23.176811"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:40:23.176811"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 5ms (ActiveRecord: 0.5ms)  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:40:23.182787"], ["updated_at", "2014-03-18 22:40:23.182787"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:40:23.186543"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 22:40:23.186543"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:40:23.187954"], ["updated_at", "2014-03-18 22:40:23.187954"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:40:23.195511"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:40:23.195511"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 7ms (ActiveRecord: 0.6ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:40:23.199259"], ["updated_at", "2014-03-18 22:40:23.199259"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:40:23.200926"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 22:40:23.200926"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:40:23.202336"], ["updated_at", "2014-03-18 22:40:23.202336"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:40:23.210401"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:40:23.210401"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 7ms (ActiveRecord: 0.6ms)  (0.1ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:40:23.215007"], ["updated_at", "2014-03-18 22:40:23.215007"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ArticlesController#show as HTML Parameters: {"id"=>"1"} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Completed 200 OK in 6ms (Views: 5.0ms | ActiveRecord: 0.0ms)  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:40:23.226130"], ["updated_at", "2014-03-18 22:40:23.226130"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "gamification_medals" ("created_at", "image", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-03-18 22:40:23.235091"], ["image", nil], ["name", "MyString"], ["updated_at", "2014-03-18 22:40:23.235091"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:40:23.239423"], ["points", 1], ["updated_at", "2014-03-18 22:40:23.239423"]] SQL (0.1ms) UPDATE "gamification_medals" SET "goal_id" = ?, "updated_at" = ? WHERE "gamification_medals"."id" = 1 [["goal_id", 1], ["updated_at", "2014-03-18 22:40:23.240358"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:40:23.243333"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:40:23.243333"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]]  (0.4ms) rollback transaction  (33.4ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:40:23.282737"], ["updated_at", "2014-03-18 22:40:23.282737"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:40:23.284186"], ["updated_at", "2014-03-18 22:40:23.284186"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:40:23.294087"], ["points", 1], ["updated_at", "2014-03-18 22:40:23.294087"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:40:23.296138"], ["points", 1], ["updated_at", "2014-03-18 22:40:23.296138"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:40:23.298043"], ["points", 1], ["updated_at", "2014-03-18 22:40:23.298043"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:40:23.299470"], ["updated_at", "2014-03-18 22:40:23.299470"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:40:23.301964"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:40:23.301964"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:40:23.306643"], ["goal_id", 2], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:40:23.306643"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 3) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:40:23.309430"], ["goal_id", 3], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:40:23.309430"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:40:23.312484"], ["points", 1], ["updated_at", "2014-03-18 22:40:23.312484"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:40:23.313940"], ["points", 1], ["updated_at", "2014-03-18 22:40:23.313940"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:40:23.315077"], ["updated_at", "2014-03-18 22:40:23.315077"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:40:23.317504"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:40:23.317504"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:40:23.322332"], ["points", 1], ["updated_at", "2014-03-18 22:40:23.322332"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:40:23.323822"], ["updated_at", "2014-03-18 22:40:23.323822"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:40:23.327767"], ["points", 1], ["updated_at", "2014-03-18 22:40:23.327767"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:40:23.329108"], ["updated_at", "2014-03-18 22:40:23.329108"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:40:23.331403"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:40:23.331403"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:40:23.336646"], ["points", 1], ["updated_at", "2014-03-18 22:40:23.336646"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:40:23.338180"], ["updated_at", "2014-03-18 22:40:23.338180"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:40:23.340757"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:40:23.340757"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:40:23.346258"], ["points", 1], ["updated_at", "2014-03-18 22:40:23.346258"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:40:23.347788"], ["updated_at", "2014-03-18 22:40:23.347788"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:40:23.350417"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:40:23.350417"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:40:23.353759"], ["points", 1], ["updated_at", "2014-03-18 22:40:23.353759"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:40:23.355087"], ["points", 1], ["updated_at", "2014-03-18 22:40:23.355087"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:40:23.356222"], ["updated_at", "2014-03-18 22:40:23.356222"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:40:23.360147"], ["updated_at", "2014-03-18 22:40:23.360147"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."seen_at" IS NULL  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:40:23.360147"], ["seen_at", "2014-03-16 22:40:23.360147"], ["updated_at", "2014-03-18 22:40:23.360147"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:40:23.360147"], ["updated_at", "2014-03-18 22:40:23.360147"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:40:23.360147"], ["seen_at", "2014-03-16 22:40:23.360147"], ["updated_at", "2014-03-18 22:40:23.360147"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE ("gamification_rewards"."seen_at" IS NOT NULL)  (0.0ms) rollback transaction  (0.3ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:42:40.663005"], ["points", 1], ["updated_at", "2014-03-18 22:42:40.663005"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:42:40.666684"], ["points", 1], ["updated_at", "2014-03-18 22:42:40.666684"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:42:40.668649"], ["points", 1], ["updated_at", "2014-03-18 22:42:40.668649"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:42:40.670672"], ["updated_at", "2014-03-18 22:42:40.670672"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:42:40.689379"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:42:40.689379"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:42:40.701555"], ["goal_id", 2], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:42:40.701555"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 3) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:42:40.703858"], ["goal_id", 3], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:42:40.703858"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (1.9ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:42:40.709158"], ["points", 1], ["updated_at", "2014-03-18 22:42:40.709158"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:42:40.710650"], ["updated_at", "2014-03-18 22:42:40.710650"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:42:40.713178"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:42:40.713178"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:42:40.716357"], ["points", 1], ["updated_at", "2014-03-18 22:42:40.716357"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:42:40.717723"], ["updated_at", "2014-03-18 22:42:40.717723"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:42:40.719882"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:42:40.719882"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.5ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:42:40.724550"], ["points", 1], ["updated_at", "2014-03-18 22:42:40.724550"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:42:40.725847"], ["updated_at", "2014-03-18 22:42:40.725847"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:42:40.728177"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:42:40.728177"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:42:40.732346"], ["points", 1], ["updated_at", "2014-03-18 22:42:40.732346"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:42:40.733727"], ["updated_at", "2014-03-18 22:42:40.733727"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.4ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:42:40.737101"], ["points", 1], ["updated_at", "2014-03-18 22:42:40.737101"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:42:40.738354"], ["points", 1], ["updated_at", "2014-03-18 22:42:40.738354"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:42:40.739475"], ["updated_at", "2014-03-18 22:42:40.739475"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:42:40.744144"], ["points", 1], ["updated_at", "2014-03-18 22:42:40.744144"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:42:40.745939"], ["points", 1], ["updated_at", "2014-03-18 22:42:40.745939"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:42:40.747186"], ["updated_at", "2014-03-18 22:42:40.747186"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:42:40.749699"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:42:40.749699"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:42:40.756540"], ["updated_at", "2014-03-18 22:42:40.756540"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ArticlesController#show as HTML Parameters: {"id"=>"1"} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Rendered articles/show.html.erb within layouts/application (0.2ms) Completed 200 OK in 6ms (Views: 4.7ms | ActiveRecord: 0.1ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:42:40.770959"], ["updated_at", "2014-03-18 22:42:40.770959"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:42:40.772515"], ["updated_at", "2014-03-18 22:42:40.772515"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:42:40.815265"], ["updated_at", "2014-03-18 22:42:40.815265"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "gamification_medals" ("created_at", "image", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-03-18 22:42:40.824601"], ["image", nil], ["name", "MyString"], ["updated_at", "2014-03-18 22:42:40.824601"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:42:40.829393"], ["points", 1], ["updated_at", "2014-03-18 22:42:40.829393"]] SQL (0.1ms) UPDATE "gamification_medals" SET "goal_id" = ?, "updated_at" = ? WHERE "gamification_medals"."id" = 1 [["goal_id", 1], ["updated_at", "2014-03-18 22:42:40.830350"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:42:40.833277"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:42:40.833277"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:42:40.837934"], ["updated_at", "2014-03-18 22:42:40.837934"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."seen_at" IS NULL  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:42:40.837934"], ["seen_at", "2014-03-16 22:42:40.837934"], ["updated_at", "2014-03-18 22:42:40.837934"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE ("gamification_rewards"."seen_at" IS NOT NULL)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:42:40.837934"], ["updated_at", "2014-03-18 22:42:40.837934"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:42:40.837934"], ["seen_at", "2014-03-16 22:42:40.837934"], ["updated_at", "2014-03-18 22:42:40.837934"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:42:40.837934"], ["updated_at", "2014-03-18 22:42:40.837934"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:42:40.837934"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 22:42:40.837934"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:42:40.837934"], ["updated_at", "2014-03-18 22:42:40.837934"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:42:40.837934"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:42:40.837934"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:42:40.837934"], ["updated_at", "2014-03-18 22:42:40.837934"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:42:40.837934"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 22:42:40.837934"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:42:40.837934"], ["updated_at", "2014-03-18 22:42:40.837934"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:42:40.837934"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:42:40.837934"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:42:40.837934"], ["points", 1], ["updated_at", "2014-03-18 22:42:40.837934"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:42:40.837934"], ["updated_at", "2014-03-18 22:42:40.837934"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:42:40.837934"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:42:40.837934"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:42:40.837934"], ["points", 1], ["updated_at", "2014-03-18 22:42:40.837934"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:42:40.837934"], ["updated_at", "2014-03-18 22:42:40.837934"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:42:40.837934"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:42:40.837934"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.3ms) begin transaction  (0.1ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:49:20.033313"], ["updated_at", "2014-03-18 22:49:20.033313"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by ArticlesController#show as HTML Parameters: {"id"=>"1"} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Completed 200 OK in 8ms (Views: 4.7ms | ActiveRecord: 0.1ms)  (1.7ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:49:20.096016"], ["points", 1], ["updated_at", "2014-03-18 22:49:20.096016"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:49:20.098743"], ["updated_at", "2014-03-18 22:49:20.098743"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:49:20.114021"], ["points", 1], ["updated_at", "2014-03-18 22:49:20.114021"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:49:20.115449"], ["updated_at", "2014-03-18 22:49:20.115449"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.2ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:49:20.130568"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:49:20.130568"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:49:20.135927"], ["points", 1], ["updated_at", "2014-03-18 22:49:20.135927"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:49:20.137828"], ["updated_at", "2014-03-18 22:49:20.137828"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:49:20.140930"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:49:20.140930"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:49:20.147530"], ["points", 1], ["updated_at", "2014-03-18 22:49:20.147530"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:49:20.149207"], ["updated_at", "2014-03-18 22:49:20.149207"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:49:20.151867"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:49:20.151867"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:49:20.155209"], ["points", 1], ["updated_at", "2014-03-18 22:49:20.155209"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:49:20.156774"], ["points", 1], ["updated_at", "2014-03-18 22:49:20.156774"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:49:20.158059"], ["updated_at", "2014-03-18 22:49:20.158059"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:49:20.164094"], ["points", 1], ["updated_at", "2014-03-18 22:49:20.164094"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:49:20.165736"], ["points", 1], ["updated_at", "2014-03-18 22:49:20.165736"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:49:20.166897"], ["updated_at", "2014-03-18 22:49:20.166897"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:49:20.170359"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:49:20.170359"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:49:20.175351"], ["points", 1], ["updated_at", "2014-03-18 22:49:20.175351"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:49:20.176899"], ["points", 1], ["updated_at", "2014-03-18 22:49:20.176899"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:49:20.178144"], ["points", 1], ["updated_at", "2014-03-18 22:49:20.178144"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:49:20.179161"], ["updated_at", "2014-03-18 22:49:20.179161"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:49:20.181297"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:49:20.181297"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:49:20.185670"], ["goal_id", 2], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:49:20.185670"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 3) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:49:20.188447"], ["goal_id", 3], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:49:20.188447"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:49:20.193391"], ["points", 1], ["updated_at", "2014-03-18 22:49:20.193391"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:49:20.195338"], ["updated_at", "2014-03-18 22:49:20.195338"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.2ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:49:20.203251"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:49:20.203251"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 6ms (ActiveRecord: 0.7ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:49:20.207547"], ["points", 1], ["updated_at", "2014-03-18 22:49:20.207547"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:49:20.208974"], ["updated_at", "2014-03-18 22:49:20.208974"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:49:20.216109"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:49:20.216109"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 6ms (ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:49:20.259512"], ["updated_at", "2014-03-18 22:49:20.259512"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:49:20.261902"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 22:49:20.261902"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:49:20.263604"], ["updated_at", "2014-03-18 22:49:20.263604"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:49:20.272284"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:49:20.272284"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 8ms (ActiveRecord: 0.7ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:49:20.277194"], ["updated_at", "2014-03-18 22:49:20.277194"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:49:20.279829"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 22:49:20.279829"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:49:20.282234"], ["updated_at", "2014-03-18 22:49:20.282234"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:49:20.289984"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:49:20.289984"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 6ms (ActiveRecord: 0.5ms)  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:49:20.295259"], ["updated_at", "2014-03-18 22:49:20.295259"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:49:20.296704"], ["updated_at", "2014-03-18 22:49:20.296704"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:49:20.307500"], ["seen_at", "2014-03-16 22:49:20.305760"], ["updated_at", "2014-03-18 22:49:20.307500"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE ("gamification_rewards"."seen_at" IS NOT NULL)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.2ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:49:20.313287"], ["updated_at", "2014-03-18 22:49:20.313287"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."seen_at" IS NULL  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:49:20.318585"], ["seen_at", "2014-03-16 22:49:20.316870"], ["updated_at", "2014-03-18 22:49:20.318585"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:49:20.322393"], ["updated_at", "2014-03-18 22:49:20.322393"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:49:20.324561"], ["updated_at", "2014-03-18 22:49:20.324561"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "image", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-03-18 22:49:20.324561"], ["image", nil], ["name", "MyString"], ["updated_at", "2014-03-18 22:49:20.324561"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:49:20.324561"], ["points", 1], ["updated_at", "2014-03-18 22:49:20.324561"]] SQL (0.0ms) UPDATE "gamification_medals" SET "goal_id" = ? WHERE "gamification_medals"."id" = 1 [["goal_id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:49:20.324561"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:49:20.324561"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.3ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:49:31.440604"], ["updated_at", "2014-03-18 22:49:31.440604"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "gamification_medals" ("created_at", "image", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-03-18 22:49:31.489775"], ["image", nil], ["name", "MyString"], ["updated_at", "2014-03-18 22:49:31.489775"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:49:31.503666"], ["points", 1], ["updated_at", "2014-03-18 22:49:31.503666"]] SQL (0.2ms) UPDATE "gamification_medals" SET "goal_id" = ?, "updated_at" = ? WHERE "gamification_medals"."id" = 1 [["goal_id", 1], ["updated_at", "2014-03-18 22:49:31.505038"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:49:31.520092"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:49:31.520092"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]]  (2.0ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:49:31.535488"], ["updated_at", "2014-03-18 22:49:31.535488"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ArticlesController#show as HTML Parameters: {"id"=>"1"} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Rendered articles/show.html.erb within layouts/application (0.3ms) Completed 200 OK in 6ms (Views: 5.0ms | ActiveRecord: 0.1ms)  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:49:31.550678"], ["updated_at", "2014-03-18 22:49:31.550678"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:49:31.552105"], ["updated_at", "2014-03-18 22:49:31.552105"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:49:31.597041"], ["updated_at", "2014-03-18 22:49:31.597041"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:49:31.598894"], ["updated_at", "2014-03-18 22:49:31.598894"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:49:31.606953"], ["points", 1], ["updated_at", "2014-03-18 22:49:31.606953"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:49:31.608424"], ["points", 1], ["updated_at", "2014-03-18 22:49:31.608424"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:49:31.609600"], ["updated_at", "2014-03-18 22:49:31.609600"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:49:31.613518"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:49:31.613518"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:49:31.618449"], ["points", 1], ["updated_at", "2014-03-18 22:49:31.618449"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:49:31.619832"], ["points", 1], ["updated_at", "2014-03-18 22:49:31.619832"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:49:31.621029"], ["points", 1], ["updated_at", "2014-03-18 22:49:31.621029"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:49:31.621994"], ["updated_at", "2014-03-18 22:49:31.621994"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:49:31.623988"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:49:31.623988"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:49:31.627639"], ["goal_id", 2], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:49:31.627639"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 3) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:49:31.630954"], ["goal_id", 3], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:49:31.630954"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:49:31.634274"], ["points", 1], ["updated_at", "2014-03-18 22:49:31.634274"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:49:31.635886"], ["updated_at", "2014-03-18 22:49:31.635886"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:49:31.638580"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:49:31.638580"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:49:31.641919"], ["points", 1], ["updated_at", "2014-03-18 22:49:31.641919"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:49:31.643232"], ["updated_at", "2014-03-18 22:49:31.643232"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:49:31.645504"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:49:31.645504"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:49:31.650433"], ["points", 1], ["updated_at", "2014-03-18 22:49:31.650433"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:49:31.651739"], ["points", 1], ["updated_at", "2014-03-18 22:49:31.651739"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:49:31.652884"], ["updated_at", "2014-03-18 22:49:31.652884"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:49:31.657256"], ["points", 1], ["updated_at", "2014-03-18 22:49:31.657256"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:49:31.658606"], ["updated_at", "2014-03-18 22:49:31.658606"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:49:31.660780"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:49:31.660780"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:49:31.664495"], ["points", 1], ["updated_at", "2014-03-18 22:49:31.664495"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:49:31.665853"], ["updated_at", "2014-03-18 22:49:31.665853"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:49:31.668947"], ["updated_at", "2014-03-18 22:49:31.668947"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."seen_at" IS NULL  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:49:31.668947"], ["updated_at", "2014-03-18 22:49:31.668947"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:49:31.668947"], ["seen_at", "2014-03-16 22:49:31.668947"], ["updated_at", "2014-03-18 22:49:31.668947"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:49:31.668947"], ["seen_at", "2014-03-16 22:49:31.668947"], ["updated_at", "2014-03-18 22:49:31.668947"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE ("gamification_rewards"."seen_at" IS NOT NULL)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:49:31.668947"], ["updated_at", "2014-03-18 22:49:31.668947"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:49:31.668947"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 22:49:31.668947"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:49:31.668947"], ["updated_at", "2014-03-18 22:49:31.668947"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:49:31.668947"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:49:31.668947"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:49:31.668947"], ["updated_at", "2014-03-18 22:49:31.668947"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:49:31.668947"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 22:49:31.668947"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:49:31.668947"], ["updated_at", "2014-03-18 22:49:31.668947"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:49:31.668947"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:49:31.668947"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:49:31.668947"], ["points", 1], ["updated_at", "2014-03-18 22:49:31.668947"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:49:31.668947"], ["updated_at", "2014-03-18 22:49:31.668947"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:49:31.668947"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:49:31.668947"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:49:31.668947"], ["points", 1], ["updated_at", "2014-03-18 22:49:31.668947"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:49:31.668947"], ["updated_at", "2014-03-18 22:49:31.668947"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:49:31.668947"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:49:31.668947"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.4ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:50:39.867475"], ["seen_at", "2014-03-16 22:50:39.867475"], ["updated_at", "2014-03-18 22:50:39.867475"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE ("gamification_rewards"."seen_at" IS NOT NULL)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:50:39.867475"], ["updated_at", "2014-03-18 22:50:39.867475"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."seen_at" IS NULL  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:50:39.867475"], ["updated_at", "2014-03-18 22:50:39.867475"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:50:39.867475"], ["seen_at", "2014-03-16 22:50:39.867475"], ["updated_at", "2014-03-18 22:50:39.867475"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:50:39.867475"], ["updated_at", "2014-03-18 22:50:39.867475"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:50:39.867475"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 22:50:39.867475"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:50:39.867475"], ["updated_at", "2014-03-18 22:50:39.867475"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:50:39.867475"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:50:39.867475"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:50:39.867475"], ["updated_at", "2014-03-18 22:50:39.867475"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:50:39.867475"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 22:50:39.867475"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:50:39.867475"], ["updated_at", "2014-03-18 22:50:39.867475"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:50:39.867475"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:50:39.867475"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:50:39.867475"], ["points", 1], ["updated_at", "2014-03-18 22:50:39.867475"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:50:39.867475"], ["updated_at", "2014-03-18 22:50:39.867475"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:50:39.867475"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:50:39.867475"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:50:39.867475"], ["points", 1], ["updated_at", "2014-03-18 22:50:39.867475"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:50:39.867475"], ["updated_at", "2014-03-18 22:50:39.867475"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:50:39.867475"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:50:39.867475"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:50:39.867475"], ["points", 1], ["updated_at", "2014-03-18 22:50:39.867475"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:50:39.867475"], ["points", 1], ["updated_at", "2014-03-18 22:50:39.867475"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:50:39.867475"], ["points", 1], ["updated_at", "2014-03-18 22:50:39.867475"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:50:39.867475"], ["updated_at", "2014-03-18 22:50:39.867475"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:50:39.867475"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:50:39.867475"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:50:39.867475"], ["goal_id", 2], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:50:39.867475"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 3) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:50:39.867475"], ["goal_id", 3], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:50:39.867475"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:50:39.867475"], ["points", 1], ["updated_at", "2014-03-18 22:50:39.867475"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:50:39.867475"], ["points", 1], ["updated_at", "2014-03-18 22:50:39.867475"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:50:39.867475"], ["updated_at", "2014-03-18 22:50:39.867475"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:50:39.867475"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:50:39.867475"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:50:39.867475"], ["points", 1], ["updated_at", "2014-03-18 22:50:39.867475"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:50:39.867475"], ["updated_at", "2014-03-18 22:50:39.867475"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:50:39.867475"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:50:39.867475"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:50:39.867475"], ["points", 1], ["updated_at", "2014-03-18 22:50:39.867475"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:50:39.867475"], ["updated_at", "2014-03-18 22:50:39.867475"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:50:39.867475"], ["points", 1], ["updated_at", "2014-03-18 22:50:39.867475"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:50:39.867475"], ["updated_at", "2014-03-18 22:50:39.867475"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:50:39.867475"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:50:39.867475"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:50:39.867475"], ["points", 1], ["updated_at", "2014-03-18 22:50:39.867475"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:50:39.867475"], ["updated_at", "2014-03-18 22:50:39.867475"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:50:39.867475"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:50:39.867475"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:50:39.867475"], ["points", 1], ["updated_at", "2014-03-18 22:50:39.867475"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:50:39.867475"], ["points", 1], ["updated_at", "2014-03-18 22:50:39.867475"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:50:39.867475"], ["updated_at", "2014-03-18 22:50:39.867475"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:50:39.867475"], ["updated_at", "2014-03-18 22:50:39.867475"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ArticlesController#show as HTML Parameters: {"id"=>"1"} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Completed 200 OK in 0ms (Views: 0.0ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:50:39.867475"], ["updated_at", "2014-03-18 22:50:39.867475"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:50:39.867475"], ["updated_at", "2014-03-18 22:50:39.867475"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:50:39.867475"], ["updated_at", "2014-03-18 22:50:39.867475"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:50:39.867475"], ["updated_at", "2014-03-18 22:50:39.867475"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:50:39.867475"], ["updated_at", "2014-03-18 22:50:39.867475"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "image", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-03-18 22:50:39.867475"], ["image", nil], ["name", "MyString"], ["updated_at", "2014-03-18 22:50:39.867475"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:50:39.867475"], ["points", 1], ["updated_at", "2014-03-18 22:50:39.867475"]] SQL (0.0ms) UPDATE "gamification_medals" SET "goal_id" = ? WHERE "gamification_medals"."id" = 1 [["goal_id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:50:39.867475"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:50:39.867475"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.3ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:51:20.090492"], ["updated_at", "2014-03-18 22:51:20.090492"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.2ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (1.1ms) INSERT INTO "gamification_rewards" ("created_at", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-03-18 22:51:20.148326"], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:51:20.148326"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.2ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "gamification_rewards" SET "updated_at" = '2014-03-18 22:51:20.161148', "seen_at" = '2014-03-18 22:51:20.161148' WHERE "gamification_rewards"."id" = 1  (0.0ms) RELEASE SAVEPOINT active_record_1  (2.0ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:51:20.167833"], ["updated_at", "2014-03-18 22:51:20.167833"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:51:20.176310"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 22:51:20.176310"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:51:20.178062"], ["updated_at", "2014-03-18 22:51:20.178062"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:51:20.189328"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:51:20.189328"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 9ms (ActiveRecord: 0.8ms)  (0.1ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:51:20.194302"], ["updated_at", "2014-03-18 22:51:20.194302"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:51:20.196150"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 22:51:20.196150"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:51:20.197576"], ["updated_at", "2014-03-18 22:51:20.197576"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:51:20.205990"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:51:20.205990"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 8ms (ActiveRecord: 0.7ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:51:20.210578"], ["points", 1], ["updated_at", "2014-03-18 22:51:20.210578"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:51:20.212076"], ["updated_at", "2014-03-18 22:51:20.212076"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:51:20.218064"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:51:20.218064"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 5ms (ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:51:20.223457"], ["points", 1], ["updated_at", "2014-03-18 22:51:20.223457"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:51:20.225389"], ["updated_at", "2014-03-18 22:51:20.225389"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:51:20.234780"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:51:20.234780"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 8ms (ActiveRecord: 0.7ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:51:20.239526"], ["updated_at", "2014-03-18 22:51:20.239526"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ArticlesController#show as HTML Parameters: {"id"=>"1"} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Completed 200 OK in 5ms (Views: 4.5ms | ActiveRecord: 0.0ms)  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:51:20.249797"], ["updated_at", "2014-03-18 22:51:20.249797"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:51:20.249797"], ["seen_at", "2014-03-16 22:51:20.249797"], ["updated_at", "2014-03-18 22:51:20.249797"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:51:20.249797"], ["updated_at", "2014-03-18 22:51:20.249797"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."seen_at" IS NULL  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:51:20.249797"], ["seen_at", "2014-03-16 22:51:20.249797"], ["updated_at", "2014-03-18 22:51:20.249797"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE ("gamification_rewards"."seen_at" IS NOT NULL)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:51:20.249797"], ["points", 1], ["updated_at", "2014-03-18 22:51:20.249797"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:51:20.249797"], ["points", 1], ["updated_at", "2014-03-18 22:51:20.249797"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:51:20.249797"], ["points", 1], ["updated_at", "2014-03-18 22:51:20.249797"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:51:20.249797"], ["updated_at", "2014-03-18 22:51:20.249797"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:51:20.249797"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:51:20.249797"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:51:20.249797"], ["goal_id", 2], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:51:20.249797"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 3) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:51:20.249797"], ["goal_id", 3], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:51:20.249797"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:51:20.249797"], ["points", 1], ["updated_at", "2014-03-18 22:51:20.249797"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:51:20.249797"], ["points", 1], ["updated_at", "2014-03-18 22:51:20.249797"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:51:20.249797"], ["updated_at", "2014-03-18 22:51:20.249797"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:51:20.249797"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:51:20.249797"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:51:20.249797"], ["points", 1], ["updated_at", "2014-03-18 22:51:20.249797"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:51:20.249797"], ["points", 1], ["updated_at", "2014-03-18 22:51:20.249797"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:51:20.249797"], ["updated_at", "2014-03-18 22:51:20.249797"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:51:20.249797"], ["points", 1], ["updated_at", "2014-03-18 22:51:20.249797"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:51:20.249797"], ["updated_at", "2014-03-18 22:51:20.249797"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:51:20.249797"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:51:20.249797"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:51:20.249797"], ["points", 1], ["updated_at", "2014-03-18 22:51:20.249797"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:51:20.249797"], ["updated_at", "2014-03-18 22:51:20.249797"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:51:20.249797"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:51:20.249797"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:51:20.249797"], ["points", 1], ["updated_at", "2014-03-18 22:51:20.249797"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:51:20.249797"], ["updated_at", "2014-03-18 22:51:20.249797"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:51:20.249797"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:51:20.249797"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:51:20.249797"], ["points", 1], ["updated_at", "2014-03-18 22:51:20.249797"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:51:20.249797"], ["updated_at", "2014-03-18 22:51:20.249797"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:51:20.249797"], ["updated_at", "2014-03-18 22:51:20.249797"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "image", "name", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-03-18 22:51:20.249797"], ["image", nil], ["name", "MyString"], ["updated_at", "2014-03-18 22:51:20.249797"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 22:51:20.249797"], ["points", 1], ["updated_at", "2014-03-18 22:51:20.249797"]] SQL (0.0ms) UPDATE "gamification_medals" SET "goal_id" = ? WHERE "gamification_medals"."id" = 1 [["goal_id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 22:51:20.249797"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 22:51:20.249797"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:51:20.249797"], ["updated_at", "2014-03-18 22:51:20.249797"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 22:51:20.249797"], ["updated_at", "2014-03-18 22:51:20.249797"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.3ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:01:31.401178"], ["updated_at", "2014-03-18 23:01:31.401178"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.2ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (1.0ms) INSERT INTO "gamification_rewards" ("created_at", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-03-18 23:01:31.422256"], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:01:31.422256"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.2ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "gamification_rewards" SET "updated_at" = '2014-03-18 23:01:31.435588', "seen_at" = '2014-03-18 23:01:31.435588' WHERE "gamification_rewards"."id" = 1  (0.0ms) RELEASE SAVEPOINT active_record_1  (1.7ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:01:31.441930"], ["seen_at", "2014-03-16 23:01:31.440155"], ["updated_at", "2014-03-18 23:01:31.441930"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE ("gamification_rewards"."seen_at" IS NOT NULL)  (0.4ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:01:31.447139"], ["updated_at", "2014-03-18 23:01:31.447139"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.2ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:01:31.451590"], ["seen_at", "2014-03-16 23:01:31.449647"], ["updated_at", "2014-03-18 23:01:31.451590"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:01:31.454507"], ["updated_at", "2014-03-18 23:01:31.454507"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."seen_at" IS NULL  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:01:31.454507"], ["updated_at", "2014-03-18 23:01:31.454507"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ArticlesController#show as HTML Parameters: {"id"=>"1"} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Completed 200 OK in 0ms (Views: 0.0ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:01:31.454507"], ["points", 1], ["updated_at", "2014-03-18 23:01:31.454507"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:01:31.454507"], ["updated_at", "2014-03-18 23:01:31.454507"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:01:31.454507"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:01:31.454507"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:01:31.454507"], ["points", 1], ["updated_at", "2014-03-18 23:01:31.454507"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:01:31.454507"], ["updated_at", "2014-03-18 23:01:31.454507"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:01:31.454507"], ["points", 1], ["updated_at", "2014-03-18 23:01:31.454507"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:01:31.454507"], ["points", 1], ["updated_at", "2014-03-18 23:01:31.454507"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:01:31.454507"], ["updated_at", "2014-03-18 23:01:31.454507"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:01:31.454507"], ["points", 1], ["updated_at", "2014-03-18 23:01:31.454507"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:01:31.454507"], ["points", 1], ["updated_at", "2014-03-18 23:01:31.454507"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:01:31.454507"], ["points", 1], ["updated_at", "2014-03-18 23:01:31.454507"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:01:31.454507"], ["updated_at", "2014-03-18 23:01:31.454507"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:01:31.454507"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:01:31.454507"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:01:31.454507"], ["goal_id", 2], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:01:31.454507"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 3) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:01:31.454507"], ["goal_id", 3], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:01:31.454507"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:01:31.454507"], ["points", 1], ["updated_at", "2014-03-18 23:01:31.454507"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:01:31.454507"], ["points", 1], ["updated_at", "2014-03-18 23:01:31.454507"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:01:31.454507"], ["updated_at", "2014-03-18 23:01:31.454507"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:01:31.454507"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:01:31.454507"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:01:31.454507"], ["points", 1], ["updated_at", "2014-03-18 23:01:31.454507"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:01:31.454507"], ["updated_at", "2014-03-18 23:01:31.454507"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:01:31.454507"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:01:31.454507"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:01:31.454507"], ["points", 1], ["updated_at", "2014-03-18 23:01:31.454507"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:01:31.454507"], ["updated_at", "2014-03-18 23:01:31.454507"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:01:31.454507"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:01:31.454507"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:01:31.454507"], ["updated_at", "2014-03-18 23:01:31.454507"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:01:31.454507"], ["description", "Unde voluptatibus molestiae quia rerum deleniti fugit quod est."], ["image", nil], ["name", "quam"], ["updated_at", "2014-03-18 23:01:31.454507"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:01:31.454507"], ["points", 1], ["updated_at", "2014-03-18 23:01:31.454507"]] SQL (0.0ms) UPDATE "gamification_medals" SET "goal_id" = ? WHERE "gamification_medals"."id" = 1 [["goal_id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:01:31.454507"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:01:31.454507"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:01:31.454507"], ["updated_at", "2014-03-18 23:01:31.454507"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:01:31.454507"], ["updated_at", "2014-03-18 23:01:31.454507"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:01:31.454507"], ["updated_at", "2014-03-18 23:01:31.454507"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:01:31.454507"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 23:01:31.454507"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:01:31.454507"], ["updated_at", "2014-03-18 23:01:31.454507"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:01:31.454507"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:01:31.454507"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:01:31.454507"], ["updated_at", "2014-03-18 23:01:31.454507"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:01:31.454507"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 23:01:31.454507"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:01:31.454507"], ["updated_at", "2014-03-18 23:01:31.454507"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:01:31.454507"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:01:31.454507"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:01:31.454507"], ["points", 1], ["updated_at", "2014-03-18 23:01:31.454507"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:01:31.454507"], ["updated_at", "2014-03-18 23:01:31.454507"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:01:31.454507"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:01:31.454507"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:01:31.454507"], ["points", 1], ["updated_at", "2014-03-18 23:01:31.454507"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:01:31.454507"], ["updated_at", "2014-03-18 23:01:31.454507"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:01:31.454507"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:01:31.454507"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.3ms) begin transaction  (0.3ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.4ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:01:48.276388"], ["updated_at", "2014-03-18 23:01:48.276388"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."seen_at" IS NULL  (2.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:01:48.283430"], ["seen_at", "2014-03-16 23:01:48.283430"], ["updated_at", "2014-03-18 23:01:48.283430"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE ("gamification_rewards"."seen_at" IS NOT NULL)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:01:48.283430"], ["updated_at", "2014-03-18 23:01:48.283430"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:01:48.283430"], ["seen_at", "2014-03-16 23:01:48.283430"], ["updated_at", "2014-03-18 23:01:48.283430"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:01:48.283430"], ["updated_at", "2014-03-18 23:01:48.283430"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-03-18 23:01:48.283430"], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:01:48.283430"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "gamification_rewards" SET "updated_at" = '2014-03-18 23:01:48.283430', "seen_at" = '2014-03-18 23:01:48.283430' WHERE "gamification_rewards"."id" = 1  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:01:48.283430"], ["points", 1], ["updated_at", "2014-03-18 23:01:48.283430"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:01:48.283430"], ["updated_at", "2014-03-18 23:01:48.283430"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:01:48.283430"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:01:48.283430"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:01:48.283430"], ["points", 1], ["updated_at", "2014-03-18 23:01:48.283430"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:01:48.283430"], ["updated_at", "2014-03-18 23:01:48.283430"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:01:48.283430"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:01:48.283430"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:01:48.283430"], ["points", 1], ["updated_at", "2014-03-18 23:01:48.283430"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:01:48.283430"], ["points", 1], ["updated_at", "2014-03-18 23:01:48.283430"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:01:48.283430"], ["points", 1], ["updated_at", "2014-03-18 23:01:48.283430"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:01:48.283430"], ["updated_at", "2014-03-18 23:01:48.283430"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:01:48.283430"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:01:48.283430"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:01:48.283430"], ["goal_id", 2], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:01:48.283430"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 3) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:01:48.283430"], ["goal_id", 3], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:01:48.283430"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:01:48.283430"], ["points", 1], ["updated_at", "2014-03-18 23:01:48.283430"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:01:48.283430"], ["updated_at", "2014-03-18 23:01:48.283430"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:01:48.283430"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:01:48.283430"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:01:48.283430"], ["points", 1], ["updated_at", "2014-03-18 23:01:48.283430"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:01:48.283430"], ["updated_at", "2014-03-18 23:01:48.283430"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:01:48.283430"], ["points", 1], ["updated_at", "2014-03-18 23:01:48.283430"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:01:48.283430"], ["points", 1], ["updated_at", "2014-03-18 23:01:48.283430"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:01:48.283430"], ["updated_at", "2014-03-18 23:01:48.283430"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:01:48.283430"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:01:48.283430"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:01:48.283430"], ["points", 1], ["updated_at", "2014-03-18 23:01:48.283430"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:01:48.283430"], ["points", 1], ["updated_at", "2014-03-18 23:01:48.283430"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:01:48.283430"], ["updated_at", "2014-03-18 23:01:48.283430"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:01:48.283430"], ["updated_at", "2014-03-18 23:01:48.283430"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:01:48.283430"], ["description", "Minus ab ut molestiae temporibus suscipit."], ["image", nil], ["name", "quasi"], ["updated_at", "2014-03-18 23:01:48.283430"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:01:48.283430"], ["points", 1], ["updated_at", "2014-03-18 23:01:48.283430"]] SQL (0.0ms) UPDATE "gamification_medals" SET "goal_id" = ? WHERE "gamification_medals"."id" = 1 [["goal_id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:01:48.283430"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:01:48.283430"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:01:48.283430"], ["updated_at", "2014-03-18 23:01:48.283430"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:01:48.283430"], ["updated_at", "2014-03-18 23:01:48.283430"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:01:48.283430"], ["updated_at", "2014-03-18 23:01:48.283430"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ArticlesController#show as HTML Parameters: {"id"=>"1"} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Completed 200 OK in 0ms (Views: 0.0ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:01:48.283430"], ["updated_at", "2014-03-18 23:01:48.283430"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:01:48.283430"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 23:01:48.283430"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:01:48.283430"], ["updated_at", "2014-03-18 23:01:48.283430"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:01:48.283430"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:01:48.283430"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:01:48.283430"], ["updated_at", "2014-03-18 23:01:48.283430"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:01:48.283430"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 23:01:48.283430"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:01:48.283430"], ["updated_at", "2014-03-18 23:01:48.283430"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:01:48.283430"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:01:48.283430"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:01:48.283430"], ["points", 1], ["updated_at", "2014-03-18 23:01:48.283430"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:01:48.283430"], ["updated_at", "2014-03-18 23:01:48.283430"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:01:48.283430"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:01:48.283430"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:01:48.283430"], ["points", 1], ["updated_at", "2014-03-18 23:01:48.283430"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:01:48.283430"], ["updated_at", "2014-03-18 23:01:48.283430"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:01:48.283430"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:01:48.283430"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.3ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:02:23.119763"], ["updated_at", "2014-03-18 23:02:23.119763"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ArticlesController#show as HTML Parameters: {"id"=>"1"} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Rendered articles/show.html.erb within layouts/application (0.3ms) Completed 200 OK in 8ms (Views: 5.0ms | ActiveRecord: 0.1ms)  (1.6ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:02:23.148119"], ["points", 1], ["updated_at", "2014-03-18 23:02:23.148119"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:02:23.151378"], ["updated_at", "2014-03-18 23:02:23.151378"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.2ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:02:23.216875"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:02:23.216875"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 61ms (ActiveRecord: 1.2ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:02:23.221661"], ["points", 1], ["updated_at", "2014-03-18 23:02:23.221661"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:02:23.223158"], ["updated_at", "2014-03-18 23:02:23.223158"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:02:23.229382"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:02:23.229382"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 5ms (ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:02:23.234594"], ["updated_at", "2014-03-18 23:02:23.234594"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:02:23.236373"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 23:02:23.236373"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:02:23.237848"], ["updated_at", "2014-03-18 23:02:23.237848"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:02:23.245241"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:02:23.245241"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 7ms (ActiveRecord: 0.6ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:02:23.249003"], ["updated_at", "2014-03-18 23:02:23.249003"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:02:23.250697"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 23:02:23.250697"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:02:23.252132"], ["updated_at", "2014-03-18 23:02:23.252132"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:02:23.260745"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:02:23.260745"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 8ms (ActiveRecord: 0.6ms)  (0.1ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:02:23.265450"], ["points", 1], ["updated_at", "2014-03-18 23:02:23.265450"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:02:23.267145"], ["updated_at", "2014-03-18 23:02:23.267145"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:02:23.270311"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:02:23.270311"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:02:23.276126"], ["points", 1], ["updated_at", "2014-03-18 23:02:23.276126"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:02:23.277817"], ["updated_at", "2014-03-18 23:02:23.277817"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:02:23.280722"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:02:23.280722"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:02:23.284779"], ["points", 1], ["updated_at", "2014-03-18 23:02:23.284779"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:02:23.286316"], ["updated_at", "2014-03-18 23:02:23.286316"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:02:23.290105"], ["points", 1], ["updated_at", "2014-03-18 23:02:23.290105"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:02:23.291448"], ["updated_at", "2014-03-18 23:02:23.291448"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:02:23.293700"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:02:23.293700"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:02:23.297574"], ["points", 1], ["updated_at", "2014-03-18 23:02:23.297574"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:02:23.299137"], ["points", 1], ["updated_at", "2014-03-18 23:02:23.299137"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:02:23.301473"], ["updated_at", "2014-03-18 23:02:23.301473"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:02:23.306161"], ["points", 1], ["updated_at", "2014-03-18 23:02:23.306161"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:02:23.307858"], ["points", 1], ["updated_at", "2014-03-18 23:02:23.307858"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:02:23.309164"], ["updated_at", "2014-03-18 23:02:23.309164"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:02:23.311663"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:02:23.311663"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:02:23.315993"], ["points", 1], ["updated_at", "2014-03-18 23:02:23.315993"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:02:23.317871"], ["points", 1], ["updated_at", "2014-03-18 23:02:23.317871"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:02:23.319412"], ["points", 1], ["updated_at", "2014-03-18 23:02:23.319412"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:02:23.320658"], ["updated_at", "2014-03-18 23:02:23.320658"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:02:23.323451"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:02:23.323451"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:02:23.327582"], ["goal_id", 2], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:02:23.327582"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 3) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:02:23.331158"], ["goal_id", 3], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:02:23.331158"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:02:23.336211"], ["updated_at", "2014-03-18 23:02:23.336211"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."seen_at" IS NULL  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.2ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.4ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:02:23.340813"], ["seen_at", "2014-03-16 23:02:23.339000"], ["updated_at", "2014-03-18 23:02:23.340813"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE ("gamification_rewards"."seen_at" IS NOT NULL)  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:02:23.347263"], ["seen_at", "2014-03-16 23:02:23.345520"], ["updated_at", "2014-03-18 23:02:23.347263"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:02:23.351097"], ["updated_at", "2014-03-18 23:02:23.351097"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:02:23.353510"], ["updated_at", "2014-03-18 23:02:23.353510"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-03-18 23:02:23.353510"], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:02:23.353510"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "gamification_rewards" SET "updated_at" = '2014-03-18 23:02:23.353510', "seen_at" = '2014-03-18 23:02:23.353510' WHERE "gamification_rewards"."id" = 1  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:02:23.353510"], ["updated_at", "2014-03-18 23:02:23.353510"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:02:23.353510"], ["description", "Eaque ut eos sit nam beatae fugit error aperiam."], ["image", nil], ["name", "eligendi"], ["updated_at", "2014-03-18 23:02:23.353510"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:02:23.353510"], ["points", 1], ["updated_at", "2014-03-18 23:02:23.353510"]] SQL (0.0ms) UPDATE "gamification_medals" SET "goal_id" = ? WHERE "gamification_medals"."id" = 1 [["goal_id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:02:23.353510"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:02:23.353510"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:02:23.353510"], ["updated_at", "2014-03-18 23:02:23.353510"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:02:23.353510"], ["updated_at", "2014-03-18 23:02:23.353510"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.4ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:02:49.433853"], ["updated_at", "2014-03-18 23:02:49.433853"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:02:49.439874"], ["updated_at", "2014-03-18 23:02:49.439874"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (1.9ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:02:49.458095"], ["points", 1], ["updated_at", "2014-03-18 23:02:49.458095"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:02:49.459913"], ["points", 1], ["updated_at", "2014-03-18 23:02:49.459913"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:02:49.461951"], ["updated_at", "2014-03-18 23:02:49.461951"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:02:49.478496"], ["points", 1], ["updated_at", "2014-03-18 23:02:49.478496"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:02:49.479983"], ["updated_at", "2014-03-18 23:02:49.479983"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:02:49.494110"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:02:49.494110"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:02:49.499207"], ["points", 1], ["updated_at", "2014-03-18 23:02:49.499207"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:02:49.500966"], ["updated_at", "2014-03-18 23:02:49.500966"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:02:49.504737"], ["points", 1], ["updated_at", "2014-03-18 23:02:49.504737"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:02:49.506087"], ["points", 1], ["updated_at", "2014-03-18 23:02:49.506087"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:02:49.507223"], ["points", 1], ["updated_at", "2014-03-18 23:02:49.507223"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:02:49.508196"], ["updated_at", "2014-03-18 23:02:49.508196"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:02:49.510335"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:02:49.510335"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]] Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:02:49.514933"], ["goal_id", 2], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:02:49.514933"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.2ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 3) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:02:49.556873"], ["goal_id", 3], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:02:49.556873"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:02:49.560336"], ["points", 1], ["updated_at", "2014-03-18 23:02:49.560336"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:02:49.561722"], ["updated_at", "2014-03-18 23:02:49.561722"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:02:49.564305"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:02:49.564305"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:02:49.567574"], ["points", 1], ["updated_at", "2014-03-18 23:02:49.567574"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:02:49.568890"], ["updated_at", "2014-03-18 23:02:49.568890"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:02:49.571330"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:02:49.571330"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:02:49.576443"], ["points", 1], ["updated_at", "2014-03-18 23:02:49.576443"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:02:49.577951"], ["points", 1], ["updated_at", "2014-03-18 23:02:49.577951"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:02:49.579130"], ["updated_at", "2014-03-18 23:02:49.579130"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:02:49.581642"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:02:49.581642"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:02:49.586669"], ["updated_at", "2014-03-18 23:02:49.586669"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:02:49.588428"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 23:02:49.588428"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:02:49.589888"], ["updated_at", "2014-03-18 23:02:49.589888"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.2ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:02:49.601025"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:02:49.601025"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 9ms (ActiveRecord: 0.9ms)  (0.1ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:02:49.605846"], ["updated_at", "2014-03-18 23:02:49.605846"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:02:49.607609"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 23:02:49.607609"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:02:49.609024"], ["updated_at", "2014-03-18 23:02:49.609024"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:02:49.615996"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:02:49.615996"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 6ms (ActiveRecord: 0.6ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:02:49.621190"], ["points", 1], ["updated_at", "2014-03-18 23:02:49.621190"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:02:49.622991"], ["updated_at", "2014-03-18 23:02:49.622991"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.2ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:02:49.631322"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:02:49.631322"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 7ms (ActiveRecord: 0.7ms)  (0.1ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:02:49.635916"], ["points", 1], ["updated_at", "2014-03-18 23:02:49.635916"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:02:49.637331"], ["updated_at", "2014-03-18 23:02:49.637331"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:02:49.644655"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:02:49.644655"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 6ms (ActiveRecord: 0.6ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:02:49.649068"], ["updated_at", "2014-03-18 23:02:49.649068"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ArticlesController#show as HTML Parameters: {"id"=>"1"} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Completed 200 OK in 7ms (Views: 6.1ms | ActiveRecord: 0.1ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.2ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:02:49.663872"], ["updated_at", "2014-03-18 23:02:49.663872"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:02:49.668824"], ["seen_at", "2014-03-16 23:02:49.666816"], ["updated_at", "2014-03-18 23:02:49.668824"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:02:49.673050"], ["seen_at", "2014-03-16 23:02:49.671523"], ["updated_at", "2014-03-18 23:02:49.673050"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE ("gamification_rewards"."seen_at" IS NOT NULL)  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:02:49.676023"], ["updated_at", "2014-03-18 23:02:49.676023"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."seen_at" IS NULL  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:02:49.676023"], ["updated_at", "2014-03-18 23:02:49.676023"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:02:49.676023"], ["description", "Voluptatem ipsum consequuntur esse quis saepe ex sapiente tempora."], ["image", nil], ["name", "sint"], ["updated_at", "2014-03-18 23:02:49.676023"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:02:49.676023"], ["points", 1], ["updated_at", "2014-03-18 23:02:49.676023"]] SQL (0.0ms) UPDATE "gamification_medals" SET "goal_id" = ? WHERE "gamification_medals"."id" = 1 [["goal_id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:02:49.676023"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:02:49.676023"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:02:49.676023"], ["updated_at", "2014-03-18 23:02:49.676023"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-03-18 23:02:49.676023"], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:02:49.676023"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "gamification_rewards" SET "updated_at" = '2014-03-18 23:02:49.676023', "seen_at" = '2014-03-18 23:02:49.676023' WHERE "gamification_rewards"."id" = 1  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.5ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:03:13.769810"], ["updated_at", "2014-03-18 23:03:13.769810"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:03:13.786696"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 23:03:13.786696"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:03:13.790920"], ["updated_at", "2014-03-18 23:03:13.790920"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.3ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.2ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:03:13.834966"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:03:13.834966"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 38ms (ActiveRecord: 1.6ms)  (0.1ms) SELECT COUNT(*) FROM "gamification_rewards"  (1.6ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:03:13.842948"], ["updated_at", "2014-03-18 23:03:13.842948"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:03:13.845068"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 23:03:13.845068"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:03:13.846977"], ["updated_at", "2014-03-18 23:03:13.846977"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:03:13.856130"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:03:13.856130"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 7ms (ActiveRecord: 0.6ms)  (0.7ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:03:13.907813"], ["points", 1], ["updated_at", "2014-03-18 23:03:13.907813"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:03:13.910509"], ["updated_at", "2014-03-18 23:03:13.910509"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.3ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.2ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:03:13.921799"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:03:13.921799"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 10ms (ActiveRecord: 1.0ms)  (0.1ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:03:13.927484"], ["points", 1], ["updated_at", "2014-03-18 23:03:13.927484"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:03:13.929465"], ["updated_at", "2014-03-18 23:03:13.929465"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:03:13.936791"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:03:13.936791"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 5ms (ActiveRecord: 0.5ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:03:13.940931"], ["updated_at", "2014-03-18 23:03:13.940931"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "gamification_medals" ("created_at", "description", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:03:13.954038"], ["description", "Eveniet beatae odit error et."], ["image", nil], ["name", "enim"], ["updated_at", "2014-03-18 23:03:13.954038"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:03:13.961140"], ["points", 1], ["updated_at", "2014-03-18 23:03:13.961140"]] SQL (0.3ms) UPDATE "gamification_medals" SET "goal_id" = ?, "updated_at" = ? WHERE "gamification_medals"."id" = 1 [["goal_id", 1], ["updated_at", "2014-03-18 23:03:13.962951"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:03:13.967762"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:03:13.967762"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:03:13.973945"], ["updated_at", "2014-03-18 23:03:13.973945"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."seen_at" IS NULL  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:03:13.973945"], ["updated_at", "2014-03-18 23:03:13.973945"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:03:13.973945"], ["seen_at", "2014-03-16 23:03:13.973945"], ["updated_at", "2014-03-18 23:03:13.973945"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:03:13.973945"], ["seen_at", "2014-03-16 23:03:13.973945"], ["updated_at", "2014-03-18 23:03:13.973945"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE ("gamification_rewards"."seen_at" IS NOT NULL)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:03:13.973945"], ["points", 1], ["updated_at", "2014-03-18 23:03:13.973945"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:03:13.973945"], ["points", 1], ["updated_at", "2014-03-18 23:03:13.973945"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:03:13.973945"], ["points", 1], ["updated_at", "2014-03-18 23:03:13.973945"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:03:13.973945"], ["updated_at", "2014-03-18 23:03:13.973945"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:03:13.973945"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:03:13.973945"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:03:13.973945"], ["goal_id", 2], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:03:13.973945"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 3) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:03:13.973945"], ["goal_id", 3], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:03:13.973945"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:03:13.973945"], ["points", 1], ["updated_at", "2014-03-18 23:03:13.973945"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:03:13.973945"], ["updated_at", "2014-03-18 23:03:13.973945"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:03:13.973945"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:03:13.973945"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:03:13.973945"], ["points", 1], ["updated_at", "2014-03-18 23:03:13.973945"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:03:13.973945"], ["updated_at", "2014-03-18 23:03:13.973945"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:03:13.973945"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:03:13.973945"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:03:13.973945"], ["points", 1], ["updated_at", "2014-03-18 23:03:13.973945"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:03:13.973945"], ["points", 1], ["updated_at", "2014-03-18 23:03:13.973945"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:03:13.973945"], ["updated_at", "2014-03-18 23:03:13.973945"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:03:13.973945"], ["points", 1], ["updated_at", "2014-03-18 23:03:13.973945"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:03:13.973945"], ["points", 1], ["updated_at", "2014-03-18 23:03:13.973945"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:03:13.973945"], ["updated_at", "2014-03-18 23:03:13.973945"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:03:13.973945"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:03:13.973945"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:03:13.973945"], ["points", 1], ["updated_at", "2014-03-18 23:03:13.973945"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:03:13.973945"], ["updated_at", "2014-03-18 23:03:13.973945"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:03:13.973945"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:03:13.973945"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:03:13.973945"], ["points", 1], ["updated_at", "2014-03-18 23:03:13.973945"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:03:13.973945"], ["updated_at", "2014-03-18 23:03:13.973945"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:03:13.973945"], ["updated_at", "2014-03-18 23:03:13.973945"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ArticlesController#show as HTML Parameters: {"id"=>"1"} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Completed 200 OK in 0ms (Views: 0.0ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:03:13.973945"], ["updated_at", "2014-03-18 23:03:13.973945"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:03:13.973945"], ["updated_at", "2014-03-18 23:03:13.973945"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:03:13.973945"], ["updated_at", "2014-03-18 23:03:13.973945"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-03-18 23:03:13.973945"], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:03:13.973945"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "gamification_rewards" SET "updated_at" = '2014-03-18 23:03:13.973945', "seen_at" = '2014-03-18 23:03:13.973945' WHERE "gamification_rewards"."id" = 1  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:03:13.973945"], ["points", 100], ["updated_at", "2014-03-18 23:03:13.973945"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:03:13.973945"], ["goal_id", 1], ["updated_at", "2014-03-18 23:03:13.973945"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:03:13.973945"], ["points", 100], ["updated_at", "2014-03-18 23:03:13.973945"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:03:13.973945"], ["goal_id", 1], ["updated_at", "2014-03-18 23:03:13.973945"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.3ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:03:37.730008"], ["updated_at", "2014-03-18 23:03:37.730008"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ArticlesController#show as HTML Parameters: {"id"=>"1"} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Rendered articles/show.html.erb within layouts/application (0.2ms) Completed 200 OK in 7ms (Views: 4.6ms | ActiveRecord: 0.1ms)  (1.7ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:03:37.748546"], ["updated_at", "2014-03-18 23:03:37.748546"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:03:37.758367"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 23:03:37.758367"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:03:37.762238"], ["updated_at", "2014-03-18 23:03:37.762238"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:03:37.827874"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:03:37.827874"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 62ms (ActiveRecord: 1.2ms)  (0.1ms) SELECT COUNT(*) FROM "gamification_rewards"  (1.0ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:03:37.834267"], ["updated_at", "2014-03-18 23:03:37.834267"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:03:37.836183"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 23:03:37.836183"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:03:37.837622"], ["updated_at", "2014-03-18 23:03:37.837622"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:03:37.844553"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:03:37.844553"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 6ms (ActiveRecord: 0.5ms)  (0.5ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:03:37.848670"], ["points", 1], ["updated_at", "2014-03-18 23:03:37.848670"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:03:37.850102"], ["updated_at", "2014-03-18 23:03:37.850102"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:03:37.856180"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:03:37.856180"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 5ms (ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:03:37.860768"], ["points", 1], ["updated_at", "2014-03-18 23:03:37.860768"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:03:37.862136"], ["updated_at", "2014-03-18 23:03:37.862136"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:03:37.868412"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:03:37.868412"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 6ms (ActiveRecord: 0.6ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:03:37.874450"], ["points", 100], ["updated_at", "2014-03-18 23:03:37.874450"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:03:37.877574"], ["goal_id", 1], ["updated_at", "2014-03-18 23:03:37.877574"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:03:37.886815"], ["description", "Id voluptas id qui dolores."], ["goal_id", 1], ["image", nil], ["name", "assumenda"], ["updated_at", "2014-03-18 23:03:37.886815"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:03:37.891394"], ["points", 100], ["updated_at", "2014-03-18 23:03:37.891394"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.4ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:03:37.894984"], ["goal_id", 1], ["updated_at", "2014-03-18 23:03:37.894984"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:03:37.897957"], ["description", "Id voluptas id qui dolores."], ["goal_id", 1], ["image", nil], ["name", "assumenda"], ["updated_at", "2014-03-18 23:03:37.897957"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:03:37.902252"], ["updated_at", "2014-03-18 23:03:37.902252"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."seen_at" IS NULL  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:03:37.902252"], ["updated_at", "2014-03-18 23:03:37.902252"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:03:37.902252"], ["seen_at", "2014-03-16 23:03:37.902252"], ["updated_at", "2014-03-18 23:03:37.902252"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:03:37.902252"], ["seen_at", "2014-03-16 23:03:37.902252"], ["updated_at", "2014-03-18 23:03:37.902252"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE ("gamification_rewards"."seen_at" IS NOT NULL)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:03:37.902252"], ["updated_at", "2014-03-18 23:03:37.902252"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:03:37.902252"], ["updated_at", "2014-03-18 23:03:37.902252"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:03:37.902252"], ["updated_at", "2014-03-18 23:03:37.902252"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:03:37.902252"], ["description", "Id voluptas id qui dolores."], ["image", nil], ["name", "assumenda"], ["updated_at", "2014-03-18 23:03:37.902252"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:03:37.902252"], ["points", 1], ["updated_at", "2014-03-18 23:03:37.902252"]] SQL (0.0ms) UPDATE "gamification_medals" SET "goal_id" = ? WHERE "gamification_medals"."id" = 1 [["goal_id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:03:37.902252"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:03:37.902252"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:03:37.902252"], ["points", 1], ["updated_at", "2014-03-18 23:03:37.902252"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:03:37.902252"], ["points", 1], ["updated_at", "2014-03-18 23:03:37.902252"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:03:37.902252"], ["updated_at", "2014-03-18 23:03:37.902252"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:03:37.902252"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:03:37.902252"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:03:37.902252"], ["points", 1], ["updated_at", "2014-03-18 23:03:37.902252"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:03:37.902252"], ["updated_at", "2014-03-18 23:03:37.902252"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:03:37.902252"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:03:37.902252"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:03:37.902252"], ["points", 1], ["updated_at", "2014-03-18 23:03:37.902252"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:03:37.902252"], ["updated_at", "2014-03-18 23:03:37.902252"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:03:37.902252"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:03:37.902252"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:03:37.902252"], ["points", 1], ["updated_at", "2014-03-18 23:03:37.902252"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:03:37.902252"], ["points", 1], ["updated_at", "2014-03-18 23:03:37.902252"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:03:37.902252"], ["updated_at", "2014-03-18 23:03:37.902252"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:03:37.902252"], ["points", 1], ["updated_at", "2014-03-18 23:03:37.902252"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:03:37.902252"], ["updated_at", "2014-03-18 23:03:37.902252"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:03:37.902252"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:03:37.902252"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:03:37.902252"], ["points", 1], ["updated_at", "2014-03-18 23:03:37.902252"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:03:37.902252"], ["updated_at", "2014-03-18 23:03:37.902252"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:03:37.902252"], ["points", 1], ["updated_at", "2014-03-18 23:03:37.902252"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:03:37.902252"], ["points", 1], ["updated_at", "2014-03-18 23:03:37.902252"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:03:37.902252"], ["points", 1], ["updated_at", "2014-03-18 23:03:37.902252"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:03:37.902252"], ["updated_at", "2014-03-18 23:03:37.902252"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:03:37.902252"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:03:37.902252"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:03:37.902252"], ["goal_id", 2], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:03:37.902252"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 3) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:03:37.902252"], ["goal_id", 3], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:03:37.902252"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:03:37.902252"], ["updated_at", "2014-03-18 23:03:37.902252"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-03-18 23:03:37.902252"], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:03:37.902252"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "gamification_rewards" SET "updated_at" = '2014-03-18 23:03:37.902252', "seen_at" = '2014-03-18 23:03:37.902252' WHERE "gamification_rewards"."id" = 1  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.3ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:03:49.704128"], ["points", 100], ["updated_at", "2014-03-18 23:03:49.704128"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.2ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:03:49.719852"], ["goal_id", 1], ["updated_at", "2014-03-18 23:03:49.719852"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:03:49.730146"], ["description", "Consequuntur totam asperiores quia tenetur."], ["goal_id", 1], ["image", nil], ["name", "molestiae"], ["updated_at", "2014-03-18 23:03:49.730146"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (6.5ms)  (1.9ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:03:49.749841"], ["points", 100], ["updated_at", "2014-03-18 23:03:49.749841"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.4ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:03:49.752963"], ["goal_id", 1], ["updated_at", "2014-03-18 23:03:49.752963"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:03:49.755756"], ["description", "Consequuntur totam asperiores quia tenetur."], ["goal_id", 1], ["image", nil], ["name", "molestiae"], ["updated_at", "2014-03-18 23:03:49.755756"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (1.9ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:03:49.767814"], ["updated_at", "2014-03-18 23:03:49.767814"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:03:49.772247"], ["updated_at", "2014-03-18 23:03:49.772247"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:03:49.814897"], ["updated_at", "2014-03-18 23:03:49.814897"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:03:49.817218"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 23:03:49.817218"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:03:49.819261"], ["updated_at", "2014-03-18 23:03:49.819261"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:03:49.836719"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:03:49.836719"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 15ms (ActiveRecord: 0.8ms)  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:03:49.841975"], ["updated_at", "2014-03-18 23:03:49.841975"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:03:49.843864"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 23:03:49.843864"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:03:49.845257"], ["updated_at", "2014-03-18 23:03:49.845257"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:03:49.853564"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:03:49.853564"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 7ms (ActiveRecord: 0.6ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:03:49.857947"], ["points", 1], ["updated_at", "2014-03-18 23:03:49.857947"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:03:49.859681"], ["updated_at", "2014-03-18 23:03:49.859681"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.2ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:03:49.867056"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:03:49.867056"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 6ms (ActiveRecord: 0.7ms)  (0.1ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:03:49.872495"], ["points", 1], ["updated_at", "2014-03-18 23:03:49.872495"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:03:49.874324"], ["updated_at", "2014-03-18 23:03:49.874324"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:03:49.881058"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:03:49.881058"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 5ms (ActiveRecord: 0.5ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:03:49.885233"], ["points", 1], ["updated_at", "2014-03-18 23:03:49.885233"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:03:49.886700"], ["points", 1], ["updated_at", "2014-03-18 23:03:49.886700"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:03:49.887868"], ["updated_at", "2014-03-18 23:03:49.887868"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:03:49.892746"], ["points", 1], ["updated_at", "2014-03-18 23:03:49.892746"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:03:49.894606"], ["points", 1], ["updated_at", "2014-03-18 23:03:49.894606"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:03:49.895879"], ["updated_at", "2014-03-18 23:03:49.895879"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:03:49.898419"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:03:49.898419"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:03:49.903209"], ["points", 1], ["updated_at", "2014-03-18 23:03:49.903209"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:03:49.904678"], ["updated_at", "2014-03-18 23:03:49.904678"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:03:49.906959"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:03:49.906959"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.5ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:03:49.910692"], ["points", 1], ["updated_at", "2014-03-18 23:03:49.910692"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:03:49.912228"], ["updated_at", "2014-03-18 23:03:49.912228"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:03:49.917276"], ["points", 1], ["updated_at", "2014-03-18 23:03:49.917276"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:03:49.918987"], ["points", 1], ["updated_at", "2014-03-18 23:03:49.918987"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:03:49.920455"], ["points", 1], ["updated_at", "2014-03-18 23:03:49.920455"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:03:49.921639"], ["updated_at", "2014-03-18 23:03:49.921639"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:03:49.924199"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:03:49.924199"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:03:49.928928"], ["goal_id", 2], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:03:49.928928"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 3) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:03:49.931357"], ["goal_id", 3], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:03:49.931357"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:03:49.934425"], ["points", 1], ["updated_at", "2014-03-18 23:03:49.934425"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:03:49.936570"], ["updated_at", "2014-03-18 23:03:49.936570"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:03:49.939840"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:03:49.939840"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:03:49.943916"], ["points", 1], ["updated_at", "2014-03-18 23:03:49.943916"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:03:49.946310"], ["updated_at", "2014-03-18 23:03:49.946310"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:03:49.950222"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:03:49.950222"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:03:49.956925"], ["updated_at", "2014-03-18 23:03:49.956925"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_medals" ("created_at", "description", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:03:49.959796"], ["description", "Consequuntur totam asperiores quia tenetur."], ["image", nil], ["name", "molestiae"], ["updated_at", "2014-03-18 23:03:49.959796"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:03:49.961895"], ["points", 1], ["updated_at", "2014-03-18 23:03:49.961895"]] SQL (0.1ms) UPDATE "gamification_medals" SET "goal_id" = ?, "updated_at" = ? WHERE "gamification_medals"."id" = 1 [["goal_id", 1], ["updated_at", "2014-03-18 23:03:49.962784"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:03:49.965552"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:03:49.965552"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]]  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:03:49.972027"], ["updated_at", "2014-03-18 23:03:49.972027"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.6ms) INSERT INTO "gamification_rewards" ("created_at", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-03-18 23:03:49.974520"], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:03:49.974520"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "gamification_rewards" SET "updated_at" = '2014-03-18 23:03:49.977907', "seen_at" = '2014-03-18 23:03:49.977907' WHERE "gamification_rewards"."id" = 1  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:03:49.984172"], ["updated_at", "2014-03-18 23:03:49.984172"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:03:49.988181"], ["seen_at", "2014-03-16 23:03:49.986604"], ["updated_at", "2014-03-18 23:03:49.988181"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:03:49.990303"], ["seen_at", "2014-03-16 23:03:49.990303"], ["updated_at", "2014-03-18 23:03:49.990303"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE ("gamification_rewards"."seen_at" IS NOT NULL)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:03:49.990303"], ["updated_at", "2014-03-18 23:03:49.990303"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."seen_at" IS NULL  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:03:49.990303"], ["updated_at", "2014-03-18 23:03:49.990303"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ArticlesController#show as HTML Parameters: {"id"=>"1"} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Completed 200 OK in 0ms (Views: 0.0ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.3ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:04:05.831143"], ["updated_at", "2014-03-18 23:04:05.831143"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:04:05.843650"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 23:04:05.843650"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:04:05.847038"], ["updated_at", "2014-03-18 23:04:05.847038"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:04:05.881113"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:04:05.881113"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 30ms (ActiveRecord: 1.2ms)  (0.1ms) SELECT COUNT(*) FROM "gamification_rewards"  (1.8ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:04:05.888345"], ["updated_at", "2014-03-18 23:04:05.888345"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:04:05.890762"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 23:04:05.890762"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:04:05.892780"], ["updated_at", "2014-03-18 23:04:05.892780"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:04:05.900594"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:04:05.900594"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 6ms (ActiveRecord: 0.5ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:04:05.941128"], ["points", 1], ["updated_at", "2014-03-18 23:04:05.941128"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:04:05.942727"], ["updated_at", "2014-03-18 23:04:05.942727"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:04:05.949361"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:04:05.949361"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 6ms (ActiveRecord: 0.6ms)  (0.1ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:04:05.954706"], ["points", 1], ["updated_at", "2014-03-18 23:04:05.954706"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:04:05.956504"], ["updated_at", "2014-03-18 23:04:05.956504"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:04:05.963196"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:04:05.963196"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 5ms (ActiveRecord: 0.5ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:04:05.967472"], ["points", 1], ["updated_at", "2014-03-18 23:04:05.967472"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:04:05.968912"], ["points", 1], ["updated_at", "2014-03-18 23:04:05.968912"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:04:05.970109"], ["updated_at", "2014-03-18 23:04:05.970109"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:04:05.972466"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:04:05.972466"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:04:05.978026"], ["points", 1], ["updated_at", "2014-03-18 23:04:05.978026"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:04:05.979855"], ["updated_at", "2014-03-18 23:04:05.979855"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:04:05.982858"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:04:05.982858"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:04:05.986714"], ["points", 1], ["updated_at", "2014-03-18 23:04:05.986714"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:04:05.988324"], ["updated_at", "2014-03-18 23:04:05.988324"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:04:05.991186"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:04:05.991186"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:04:05.996714"], ["points", 1], ["updated_at", "2014-03-18 23:04:05.996714"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:04:05.998555"], ["updated_at", "2014-03-18 23:04:05.998555"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:04:06.001504"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:04:06.001504"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:04:06.007025"], ["points", 1], ["updated_at", "2014-03-18 23:04:06.007025"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:04:06.008937"], ["updated_at", "2014-03-18 23:04:06.008937"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:04:06.013567"], ["points", 1], ["updated_at", "2014-03-18 23:04:06.013567"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:04:06.015053"], ["points", 1], ["updated_at", "2014-03-18 23:04:06.015053"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:04:06.016207"], ["points", 1], ["updated_at", "2014-03-18 23:04:06.016207"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:04:06.017245"], ["updated_at", "2014-03-18 23:04:06.017245"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.2ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:04:06.020223"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:04:06.020223"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:04:06.024252"], ["goal_id", 2], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:04:06.024252"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 3) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:04:06.026768"], ["goal_id", 3], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:04:06.026768"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:04:06.029988"], ["points", 1], ["updated_at", "2014-03-18 23:04:06.029988"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:04:06.031698"], ["points", 1], ["updated_at", "2014-03-18 23:04:06.031698"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:04:06.033162"], ["updated_at", "2014-03-18 23:04:06.033162"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:04:06.038061"], ["updated_at", "2014-03-18 23:04:06.038061"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "gamification_medals" ("created_at", "description", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:04:06.047629"], ["description", "Minima quaerat autem atque nemo quam voluptatibus ea."], ["image", nil], ["name", "rerum"], ["updated_at", "2014-03-18 23:04:06.047629"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:04:06.052176"], ["points", 1], ["updated_at", "2014-03-18 23:04:06.052176"]] SQL (0.1ms) UPDATE "gamification_medals" SET "goal_id" = ?, "updated_at" = ? WHERE "gamification_medals"."id" = 1 [["goal_id", 1], ["updated_at", "2014-03-18 23:04:06.053107"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:04:06.055830"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:04:06.055830"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]]  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:04:06.061973"], ["updated_at", "2014-03-18 23:04:06.061973"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:04:06.063487"], ["updated_at", "2014-03-18 23:04:06.063487"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:04:06.074478"], ["points", 100], ["updated_at", "2014-03-18 23:04:06.074478"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.4ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:04:06.076956"], ["goal_id", 1], ["updated_at", "2014-03-18 23:04:06.076956"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:04:06.079021"], ["description", "Minima quaerat autem atque nemo quam voluptatibus ea."], ["goal_id", 1], ["image", nil], ["name", "rerum"], ["updated_at", "2014-03-18 23:04:06.079021"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (2.2ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:04:06.093495"], ["points", 100], ["updated_at", "2014-03-18 23:04:06.093495"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:04:06.096331"], ["goal_id", 1], ["updated_at", "2014-03-18 23:04:06.096331"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:04:06.098442"], ["description", "Minima quaerat autem atque nemo quam voluptatibus ea."], ["goal_id", 1], ["image", nil], ["name", "rerum"], ["updated_at", "2014-03-18 23:04:06.098442"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (1.6ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:04:06.107380"], ["updated_at", "2014-03-18 23:04:06.107380"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."seen_at" IS NULL  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:04:06.107380"], ["seen_at", "2014-03-16 23:04:06.107380"], ["updated_at", "2014-03-18 23:04:06.107380"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE ("gamification_rewards"."seen_at" IS NOT NULL)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:04:06.107380"], ["updated_at", "2014-03-18 23:04:06.107380"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:04:06.107380"], ["seen_at", "2014-03-16 23:04:06.107380"], ["updated_at", "2014-03-18 23:04:06.107380"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:04:06.107380"], ["updated_at", "2014-03-18 23:04:06.107380"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-03-18 23:04:06.107380"], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:04:06.107380"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "gamification_rewards" SET "updated_at" = '2014-03-18 23:04:06.107380', "seen_at" = '2014-03-18 23:04:06.107380' WHERE "gamification_rewards"."id" = 1  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:04:06.107380"], ["updated_at", "2014-03-18 23:04:06.107380"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ArticlesController#show as HTML Parameters: {"id"=>"1"} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Completed 200 OK in 0ms (Views: 0.0ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.3ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:04:40.264726"], ["updated_at", "2014-03-18 23:04:40.264726"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:04:40.278349"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 23:04:40.278349"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:04:40.281741"], ["updated_at", "2014-03-18 23:04:40.281741"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:04:40.317713"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:04:40.317713"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 32ms (ActiveRecord: 1.3ms)  (0.1ms) SELECT COUNT(*) FROM "gamification_rewards"  (1.8ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:04:40.324430"], ["updated_at", "2014-03-18 23:04:40.324430"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:04:40.326310"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 23:04:40.326310"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:04:40.327723"], ["updated_at", "2014-03-18 23:04:40.327723"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:04:40.370186"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:04:40.370186"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 42ms (ActiveRecord: 0.6ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:04:40.375376"], ["points", 1], ["updated_at", "2014-03-18 23:04:40.375376"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:04:40.377475"], ["updated_at", "2014-03-18 23:04:40.377475"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:04:40.385318"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:04:40.385318"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 6ms (ActiveRecord: 0.6ms)  (0.1ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:04:40.390580"], ["points", 1], ["updated_at", "2014-03-18 23:04:40.390580"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:04:40.392190"], ["updated_at", "2014-03-18 23:04:40.392190"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:04:40.398153"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:04:40.398153"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 5ms (ActiveRecord: 0.5ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:04:40.403019"], ["updated_at", "2014-03-18 23:04:40.403019"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-03-18 23:04:40.405876"], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:04:40.405876"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.2ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "gamification_rewards" SET "updated_at" = '2014-03-18 23:04:40.411694', "seen_at" = '2014-03-18 23:04:40.411694' WHERE "gamification_rewards"."id" = 1  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:04:40.415357"], ["points", 1], ["updated_at", "2014-03-18 23:04:40.415357"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:04:40.416999"], ["points", 1], ["updated_at", "2014-03-18 23:04:40.416999"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:04:40.418237"], ["updated_at", "2014-03-18 23:04:40.418237"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:04:40.423051"], ["points", 1], ["updated_at", "2014-03-18 23:04:40.423051"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:04:40.425712"], ["points", 1], ["updated_at", "2014-03-18 23:04:40.425712"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:04:40.428105"], ["points", 1], ["updated_at", "2014-03-18 23:04:40.428105"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:04:40.429997"], ["updated_at", "2014-03-18 23:04:40.429997"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:04:40.433511"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:04:40.433511"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:04:40.438137"], ["goal_id", 2], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:04:40.438137"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 3) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:04:40.440900"], ["goal_id", 3], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:04:40.440900"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:04:40.444009"], ["points", 1], ["updated_at", "2014-03-18 23:04:40.444009"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:04:40.445369"], ["updated_at", "2014-03-18 23:04:40.445369"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:04:40.447931"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:04:40.447931"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:04:40.451470"], ["points", 1], ["updated_at", "2014-03-18 23:04:40.451470"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:04:40.453744"], ["updated_at", "2014-03-18 23:04:40.453744"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:04:40.456370"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:04:40.456370"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:04:40.461571"], ["points", 1], ["updated_at", "2014-03-18 23:04:40.461571"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:04:40.463076"], ["updated_at", "2014-03-18 23:04:40.463076"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:04:40.465708"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:04:40.465708"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:04:40.469768"], ["points", 1], ["updated_at", "2014-03-18 23:04:40.469768"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:04:40.471128"], ["updated_at", "2014-03-18 23:04:40.471128"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:04:40.476066"], ["points", 1], ["updated_at", "2014-03-18 23:04:40.476066"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:04:40.477988"], ["points", 1], ["updated_at", "2014-03-18 23:04:40.477988"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:04:40.479816"], ["updated_at", "2014-03-18 23:04:40.479816"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:04:40.482957"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:04:40.482957"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:04:40.489451"], ["updated_at", "2014-03-18 23:04:40.489451"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:04:40.490980"], ["updated_at", "2014-03-18 23:04:40.490980"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:04:40.498334"], ["updated_at", "2014-03-18 23:04:40.498334"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.2ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:04:40.503055"], ["seen_at", "2014-03-16 23:04:40.501028"], ["updated_at", "2014-03-18 23:04:40.503055"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:04:40.505644"], ["updated_at", "2014-03-18 23:04:40.505644"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."seen_at" IS NULL  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:04:40.505644"], ["seen_at", "2014-03-16 23:04:40.505644"], ["updated_at", "2014-03-18 23:04:40.505644"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE ("gamification_rewards"."seen_at" IS NOT NULL)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:04:40.505644"], ["updated_at", "2014-03-18 23:04:40.505644"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:04:40.505644"], ["description", "Quibusdam vitae aut eos cupiditate dolores deserunt et."], ["image", nil], ["name", "velit"], ["updated_at", "2014-03-18 23:04:40.505644"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:04:40.505644"], ["points", 1], ["updated_at", "2014-03-18 23:04:40.505644"]] SQL (0.0ms) UPDATE "gamification_medals" SET "goal_id" = ? WHERE "gamification_medals"."id" = 1 [["goal_id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:04:40.505644"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:04:40.505644"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:04:40.505644"], ["updated_at", "2014-03-18 23:04:40.505644"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ArticlesController#show as HTML Parameters: {"id"=>"1"} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Completed 200 OK in 0ms (Views: 0.0ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:04:40.505644"], ["points", 100], ["updated_at", "2014-03-18 23:04:40.505644"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:04:40.505644"], ["goal_id", 1], ["updated_at", "2014-03-18 23:04:40.505644"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:04:40.505644"], ["description", "Quibusdam vitae aut eos cupiditate dolores deserunt et."], ["goal_id", 1], ["image", nil], ["name", "velit"], ["updated_at", "2014-03-18 23:04:40.505644"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:04:40.505644"], ["points", 100], ["updated_at", "2014-03-18 23:04:40.505644"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:04:40.505644"], ["goal_id", 1], ["updated_at", "2014-03-18 23:04:40.505644"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:04:40.505644"], ["description", "Quibusdam vitae aut eos cupiditate dolores deserunt et."], ["goal_id", 1], ["image", nil], ["name", "velit"], ["updated_at", "2014-03-18 23:04:40.505644"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:04:40.505644"], ["points", 100], ["updated_at", "2014-03-18 23:04:40.505644"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:04:40.505644"], ["goal_id", 1], ["updated_at", "2014-03-18 23:04:40.505644"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:04:40.505644"], ["description", "Quibusdam vitae aut eos cupiditate dolores deserunt et."], ["goal_id", 1], ["image", nil], ["name", "velit"], ["updated_at", "2014-03-18 23:04:40.505644"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (0.0ms)  (0.0ms) rollback transaction  (0.3ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:04:55.516062"], ["points", 100], ["updated_at", "2014-03-18 23:04:55.516062"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:04:55.531883"], ["goal_id", 1], ["updated_at", "2014-03-18 23:04:55.531883"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:04:55.542339"], ["description", "Praesentium aspernatur consequatur ea perferendis atque omnis."], ["goal_id", 1], ["image", nil], ["name", "autem"], ["updated_at", "2014-03-18 23:04:55.542339"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.2ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (7.0ms)  (1.9ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:04:55.562460"], ["points", 100], ["updated_at", "2014-03-18 23:04:55.562460"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:04:55.566401"], ["goal_id", 1], ["updated_at", "2014-03-18 23:04:55.566401"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:04:55.569934"], ["description", "Praesentium aspernatur consequatur ea perferendis atque omnis."], ["goal_id", 1], ["image", nil], ["name", "autem"], ["updated_at", "2014-03-18 23:04:55.569934"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (1.8ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:04:55.579998"], ["points", 100], ["updated_at", "2014-03-18 23:04:55.579998"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:04:55.582457"], ["goal_id", 1], ["updated_at", "2014-03-18 23:04:55.582457"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:04:55.584407"], ["description", "Praesentium aspernatur consequatur ea perferendis atque omnis."], ["goal_id", 1], ["image", nil], ["name", "autem"], ["updated_at", "2014-03-18 23:04:55.584407"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (1.6ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:04:55.592620"], ["seen_at", "2014-03-16 23:04:55.592620"], ["updated_at", "2014-03-18 23:04:55.592620"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE ("gamification_rewards"."seen_at" IS NOT NULL)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:04:55.592620"], ["updated_at", "2014-03-18 23:04:55.592620"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:04:55.592620"], ["seen_at", "2014-03-16 23:04:55.592620"], ["updated_at", "2014-03-18 23:04:55.592620"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:04:55.592620"], ["updated_at", "2014-03-18 23:04:55.592620"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."seen_at" IS NULL  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:04:55.592620"], ["updated_at", "2014-03-18 23:04:55.592620"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:04:55.592620"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 23:04:55.592620"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:04:55.592620"], ["updated_at", "2014-03-18 23:04:55.592620"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:04:55.592620"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:04:55.592620"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:04:55.592620"], ["updated_at", "2014-03-18 23:04:55.592620"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:04:55.592620"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 23:04:55.592620"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:04:55.592620"], ["updated_at", "2014-03-18 23:04:55.592620"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:04:55.592620"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:04:55.592620"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:04:55.592620"], ["points", 1], ["updated_at", "2014-03-18 23:04:55.592620"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:04:55.592620"], ["updated_at", "2014-03-18 23:04:55.592620"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:04:55.592620"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:04:55.592620"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:04:55.592620"], ["points", 1], ["updated_at", "2014-03-18 23:04:55.592620"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:04:55.592620"], ["updated_at", "2014-03-18 23:04:55.592620"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:04:55.592620"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:04:55.592620"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:04:55.592620"], ["updated_at", "2014-03-18 23:04:55.592620"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:04:55.592620"], ["updated_at", "2014-03-18 23:04:55.592620"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:04:55.592620"], ["updated_at", "2014-03-18 23:04:55.592620"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:04:55.592620"], ["description", "Praesentium aspernatur consequatur ea perferendis atque omnis."], ["image", nil], ["name", "autem"], ["updated_at", "2014-03-18 23:04:55.592620"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:04:55.592620"], ["points", 1], ["updated_at", "2014-03-18 23:04:55.592620"]] SQL (0.0ms) UPDATE "gamification_medals" SET "goal_id" = ? WHERE "gamification_medals"."id" = 1 [["goal_id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:04:55.592620"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:04:55.592620"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:04:55.592620"], ["updated_at", "2014-03-18 23:04:55.592620"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-03-18 23:04:55.592620"], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:04:55.592620"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "gamification_rewards" SET "updated_at" = '2014-03-18 23:04:55.592620', "seen_at" = '2014-03-18 23:04:55.592620' WHERE "gamification_rewards"."id" = 1  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:04:55.592620"], ["updated_at", "2014-03-18 23:04:55.592620"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ArticlesController#show as HTML Parameters: {"id"=>"1"} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Completed 200 OK in 0ms (Views: 0.0ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:04:55.592620"], ["points", 1], ["updated_at", "2014-03-18 23:04:55.592620"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:04:55.592620"], ["points", 1], ["updated_at", "2014-03-18 23:04:55.592620"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:04:55.592620"], ["updated_at", "2014-03-18 23:04:55.592620"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:04:55.592620"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:04:55.592620"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:04:55.592620"], ["points", 1], ["updated_at", "2014-03-18 23:04:55.592620"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:04:55.592620"], ["updated_at", "2014-03-18 23:04:55.592620"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:04:55.592620"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:04:55.592620"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:04:55.592620"], ["points", 1], ["updated_at", "2014-03-18 23:04:55.592620"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:04:55.592620"], ["updated_at", "2014-03-18 23:04:55.592620"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:04:55.592620"], ["points", 1], ["updated_at", "2014-03-18 23:04:55.592620"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:04:55.592620"], ["points", 1], ["updated_at", "2014-03-18 23:04:55.592620"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:04:55.592620"], ["points", 1], ["updated_at", "2014-03-18 23:04:55.592620"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:04:55.592620"], ["updated_at", "2014-03-18 23:04:55.592620"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:04:55.592620"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:04:55.592620"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:04:55.592620"], ["goal_id", 2], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:04:55.592620"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 3) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:04:55.592620"], ["goal_id", 3], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:04:55.592620"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:04:55.592620"], ["points", 1], ["updated_at", "2014-03-18 23:04:55.592620"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:04:55.592620"], ["points", 1], ["updated_at", "2014-03-18 23:04:55.592620"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:04:55.592620"], ["updated_at", "2014-03-18 23:04:55.592620"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:04:55.592620"], ["points", 1], ["updated_at", "2014-03-18 23:04:55.592620"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:04:55.592620"], ["updated_at", "2014-03-18 23:04:55.592620"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:04:55.592620"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:04:55.592620"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:04:55.592620"], ["points", 1], ["updated_at", "2014-03-18 23:04:55.592620"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:04:55.592620"], ["updated_at", "2014-03-18 23:04:55.592620"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:04:55.592620"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:04:55.592620"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.3ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:17:47.129152"], ["updated_at", "2014-03-18 23:17:47.129152"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:17:47.142786"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 23:17:47.142786"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:17:47.146288"], ["updated_at", "2014-03-18 23:17:47.146288"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:17:47.184377"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:17:47.184377"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 34ms (ActiveRecord: 1.4ms)  (0.1ms) SELECT COUNT(*) FROM "gamification_rewards"  (2.0ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:17:47.191807"], ["updated_at", "2014-03-18 23:17:47.191807"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:17:47.194433"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 23:17:47.194433"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:17:47.196471"], ["updated_at", "2014-03-18 23:17:47.196471"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.2ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:17:47.239850"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:17:47.239850"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 42ms (ActiveRecord: 0.7ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:17:47.245272"], ["points", 1], ["updated_at", "2014-03-18 23:17:47.245272"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:17:47.247179"], ["updated_at", "2014-03-18 23:17:47.247179"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:17:47.254324"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:17:47.254324"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 5ms (ActiveRecord: 0.5ms)  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:17:47.258740"], ["points", 1], ["updated_at", "2014-03-18 23:17:47.258740"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:17:47.260103"], ["updated_at", "2014-03-18 23:17:47.260103"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:17:47.265987"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:17:47.265987"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 5ms (ActiveRecord: 0.4ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:17:47.269713"], ["updated_at", "2014-03-18 23:17:47.269713"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "gamification_medals" ("created_at", "description", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:17:47.279187"], ["description", "Eveniet provident quidem quasi."], ["image", nil], ["name", "sequi"], ["updated_at", "2014-03-18 23:17:47.279187"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:17:47.284434"], ["points", 1], ["updated_at", "2014-03-18 23:17:47.284434"]] SQL (0.2ms) UPDATE "gamification_medals" SET "goal_id" = ?, "updated_at" = ? WHERE "gamification_medals"."id" = 1 [["goal_id", 1], ["updated_at", "2014-03-18 23:17:47.285503"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:17:47.288666"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:17:47.288666"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]]  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:17:47.295109"], ["seen_at", "2014-03-16 23:17:47.293503"], ["updated_at", "2014-03-18 23:17:47.295109"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE ("gamification_rewards"."seen_at" IS NOT NULL)  (0.4ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:17:47.299542"], ["updated_at", "2014-03-18 23:17:47.299542"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."seen_at" IS NULL  (0.3ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:17:47.304271"], ["updated_at", "2014-03-18 23:17:47.304271"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.2ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:17:47.309170"], ["seen_at", "2014-03-16 23:17:47.307240"], ["updated_at", "2014-03-18 23:17:47.309170"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:17:47.311944"], ["updated_at", "2014-03-18 23:17:47.311944"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-03-18 23:17:47.311944"], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:17:47.311944"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "gamification_rewards" SET "updated_at" = '2014-03-18 23:17:47.311944', "seen_at" = '2014-03-18 23:17:47.311944' WHERE "gamification_rewards"."id" = 1  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:17:47.311944"], ["points", 100], ["updated_at", "2014-03-18 23:17:47.311944"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:17:47.311944"], ["goal_id", 1], ["updated_at", "2014-03-18 23:17:47.311944"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:17:47.311944"], ["description", "Eveniet provident quidem quasi."], ["goal_id", 1], ["image", nil], ["name", "sequi"], ["updated_at", "2014-03-18 23:17:47.311944"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:17:47.311944"], ["points", 100], ["updated_at", "2014-03-18 23:17:47.311944"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:17:47.311944"], ["goal_id", 1], ["updated_at", "2014-03-18 23:17:47.311944"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:17:47.311944"], ["description", "Eveniet provident quidem quasi."], ["goal_id", 1], ["image", nil], ["name", "sequi"], ["updated_at", "2014-03-18 23:17:47.311944"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:17:47.311944"], ["points", 100], ["updated_at", "2014-03-18 23:17:47.311944"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:17:47.311944"], ["goal_id", 1], ["updated_at", "2014-03-18 23:17:47.311944"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:17:47.311944"], ["description", "Eveniet provident quidem quasi."], ["goal_id", 1], ["image", nil], ["name", "sequi"], ["updated_at", "2014-03-18 23:17:47.311944"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:17:47.311944"], ["updated_at", "2014-03-18 23:17:47.311944"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ArticlesController#show as HTML Parameters: {"id"=>"1"} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Completed 200 OK in 0ms (Views: 0.0ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:17:47.311944"], ["updated_at", "2014-03-18 23:17:47.311944"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:17:47.311944"], ["updated_at", "2014-03-18 23:17:47.311944"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:17:47.311944"], ["points", 1], ["updated_at", "2014-03-18 23:17:47.311944"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:17:47.311944"], ["updated_at", "2014-03-18 23:17:47.311944"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:17:47.311944"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:17:47.311944"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:17:47.311944"], ["points", 1], ["updated_at", "2014-03-18 23:17:47.311944"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:17:47.311944"], ["updated_at", "2014-03-18 23:17:47.311944"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:17:47.311944"], ["points", 1], ["updated_at", "2014-03-18 23:17:47.311944"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:17:47.311944"], ["updated_at", "2014-03-18 23:17:47.311944"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:17:47.311944"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:17:47.311944"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:17:47.311944"], ["points", 1], ["updated_at", "2014-03-18 23:17:47.311944"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:17:47.311944"], ["updated_at", "2014-03-18 23:17:47.311944"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:17:47.311944"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:17:47.311944"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:17:47.311944"], ["points", 1], ["updated_at", "2014-03-18 23:17:47.311944"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:17:47.311944"], ["points", 1], ["updated_at", "2014-03-18 23:17:47.311944"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:17:47.311944"], ["updated_at", "2014-03-18 23:17:47.311944"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:17:47.311944"], ["points", 1], ["updated_at", "2014-03-18 23:17:47.311944"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:17:47.311944"], ["points", 1], ["updated_at", "2014-03-18 23:17:47.311944"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:17:47.311944"], ["updated_at", "2014-03-18 23:17:47.311944"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:17:47.311944"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:17:47.311944"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:17:47.311944"], ["points", 1], ["updated_at", "2014-03-18 23:17:47.311944"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:17:47.311944"], ["points", 1], ["updated_at", "2014-03-18 23:17:47.311944"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:17:47.311944"], ["points", 1], ["updated_at", "2014-03-18 23:17:47.311944"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:17:47.311944"], ["updated_at", "2014-03-18 23:17:47.311944"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:17:47.311944"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:17:47.311944"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:17:47.311944"], ["goal_id", 2], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:17:47.311944"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 3) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:17:47.311944"], ["goal_id", 3], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:17:47.311944"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.3ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:18:34.161553"], ["points", 1], ["updated_at", "2014-03-18 23:18:34.161553"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:18:34.166248"], ["updated_at", "2014-03-18 23:18:34.166248"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:18:34.199573"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:18:34.199573"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 28ms (ActiveRecord: 1.1ms)  (1.8ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:18:34.205592"], ["points", 1], ["updated_at", "2014-03-18 23:18:34.205592"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:18:34.207322"], ["updated_at", "2014-03-18 23:18:34.207322"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:18:34.214370"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:18:34.214370"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 6ms (ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:18:34.220938"], ["updated_at", "2014-03-18 23:18:34.220938"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:18:34.225330"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 23:18:34.225330"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:18:34.227104"], ["updated_at", "2014-03-18 23:18:34.227104"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:18:34.273200"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:18:34.273200"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 7ms (ActiveRecord: 0.6ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:18:34.277097"], ["updated_at", "2014-03-18 23:18:34.277097"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:18:34.279061"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 23:18:34.279061"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:18:34.280811"], ["updated_at", "2014-03-18 23:18:34.280811"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:18:34.288422"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:18:34.288422"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 7ms (ActiveRecord: 0.7ms)  (0.1ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:18:34.296916"], ["points", 100], ["updated_at", "2014-03-18 23:18:34.296916"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:18:34.300575"], ["goal_id", 1], ["updated_at", "2014-03-18 23:18:34.300575"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:18:34.309939"], ["description", "Consectetur tempora illo nemo alias quod cumque a."], ["goal_id", 1], ["image", nil], ["name", "vitae"], ["updated_at", "2014-03-18 23:18:34.309939"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.2ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (6.3ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:18:34.328427"], ["points", 100], ["updated_at", "2014-03-18 23:18:34.328427"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:18:34.330860"], ["goal_id", 1], ["updated_at", "2014-03-18 23:18:34.330860"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:18:34.332819"], ["description", "Consectetur tempora illo nemo alias quod cumque a."], ["goal_id", 1], ["image", nil], ["name", "vitae"], ["updated_at", "2014-03-18 23:18:34.332819"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (1.9ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:18:34.343023"], ["points", 100], ["updated_at", "2014-03-18 23:18:34.343023"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:18:34.346362"], ["goal_id", 1], ["updated_at", "2014-03-18 23:18:34.346362"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:18:34.349242"], ["description", "Consectetur tempora illo nemo alias quod cumque a."], ["goal_id", 1], ["image", nil], ["name", "vitae"], ["updated_at", "2014-03-18 23:18:34.349242"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (2.2ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:18:34.360481"], ["updated_at", "2014-03-18 23:18:34.360481"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ArticlesController#show as HTML Parameters: {"id"=>"1"} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Completed 200 OK in 4ms (Views: 3.1ms | ActiveRecord: 0.1ms)  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:18:34.370791"], ["updated_at", "2014-03-18 23:18:34.370791"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_medals" ("created_at", "description", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:18:34.372739"], ["description", "Consectetur tempora illo nemo alias quod cumque a."], ["image", nil], ["name", "vitae"], ["updated_at", "2014-03-18 23:18:34.372739"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:18:34.374496"], ["points", 1], ["updated_at", "2014-03-18 23:18:34.374496"]] SQL (0.1ms) UPDATE "gamification_medals" SET "goal_id" = ?, "updated_at" = ? WHERE "gamification_medals"."id" = 1 [["goal_id", 1], ["updated_at", "2014-03-18 23:18:34.375368"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:18:34.377993"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:18:34.377993"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]]  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:18:34.384177"], ["updated_at", "2014-03-18 23:18:34.384177"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.4ms) INSERT INTO "gamification_rewards" ("created_at", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-03-18 23:18:34.386635"], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:18:34.386635"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.2ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "gamification_rewards" SET "updated_at" = '2014-03-18 23:18:34.390536', "seen_at" = '2014-03-18 23:18:34.390536' WHERE "gamification_rewards"."id" = 1  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]]  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:18:34.398117"], ["points", 1], ["updated_at", "2014-03-18 23:18:34.398117"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:18:34.400087"], ["updated_at", "2014-03-18 23:18:34.400087"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:18:34.405029"], ["points", 1], ["updated_at", "2014-03-18 23:18:34.405029"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:18:34.407397"], ["updated_at", "2014-03-18 23:18:34.407397"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:18:34.410377"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:18:34.410377"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:18:34.414469"], ["points", 1], ["updated_at", "2014-03-18 23:18:34.414469"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:18:34.415893"], ["points", 1], ["updated_at", "2014-03-18 23:18:34.415893"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:18:34.417040"], ["updated_at", "2014-03-18 23:18:34.417040"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:18:34.419471"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:18:34.419471"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:18:34.424719"], ["points", 1], ["updated_at", "2014-03-18 23:18:34.424719"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:18:34.426453"], ["points", 1], ["updated_at", "2014-03-18 23:18:34.426453"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:18:34.427921"], ["points", 1], ["updated_at", "2014-03-18 23:18:34.427921"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:18:34.429165"], ["updated_at", "2014-03-18 23:18:34.429165"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:18:34.431881"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:18:34.431881"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:18:34.436840"], ["goal_id", 2], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:18:34.436840"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 3) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:18:34.439236"], ["goal_id", 3], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:18:34.439236"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:18:34.442322"], ["points", 1], ["updated_at", "2014-03-18 23:18:34.442322"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:18:34.443699"], ["updated_at", "2014-03-18 23:18:34.443699"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:18:34.445882"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:18:34.445882"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.7ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:18:34.452282"], ["points", 1], ["updated_at", "2014-03-18 23:18:34.452282"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:18:34.453847"], ["updated_at", "2014-03-18 23:18:34.453847"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:18:34.456553"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:18:34.456553"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:18:34.460153"], ["points", 1], ["updated_at", "2014-03-18 23:18:34.460153"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:18:34.461517"], ["points", 1], ["updated_at", "2014-03-18 23:18:34.461517"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:18:34.462634"], ["updated_at", "2014-03-18 23:18:34.462634"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:18:34.468433"], ["seen_at", "2014-03-16 23:18:34.466851"], ["updated_at", "2014-03-18 23:18:34.468433"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE ("gamification_rewards"."seen_at" IS NOT NULL)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:18:34.472152"], ["updated_at", "2014-03-18 23:18:34.472152"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."seen_at" IS NULL  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:18:34.472152"], ["seen_at", "2014-03-16 23:18:34.472152"], ["updated_at", "2014-03-18 23:18:34.472152"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:18:34.472152"], ["updated_at", "2014-03-18 23:18:34.472152"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:18:34.472152"], ["updated_at", "2014-03-18 23:18:34.472152"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:18:34.472152"], ["updated_at", "2014-03-18 23:18:34.472152"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.3ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:18:54.876839"], ["updated_at", "2014-03-18 23:18:54.876839"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:18:54.884291"], ["updated_at", "2014-03-18 23:18:54.884291"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (1.7ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:18:54.896402"], ["updated_at", "2014-03-18 23:18:54.896402"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.4ms) INSERT INTO "gamification_rewards" ("created_at", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-03-18 23:18:54.917238"], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:18:54.917238"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.2ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "gamification_rewards" SET "updated_at" = '2014-03-18 23:18:54.929175', "seen_at" = '2014-03-18 23:18:54.929175' WHERE "gamification_rewards"."id" = 1  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]]  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:18:54.940850"], ["points", 1], ["updated_at", "2014-03-18 23:18:54.940850"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:18:54.942458"], ["updated_at", "2014-03-18 23:18:54.942458"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:18:54.944901"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:18:54.944901"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.2ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:18:54.987904"], ["points", 1], ["updated_at", "2014-03-18 23:18:54.987904"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:18:54.989338"], ["updated_at", "2014-03-18 23:18:54.989338"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:18:54.993094"], ["points", 1], ["updated_at", "2014-03-18 23:18:54.993094"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:18:54.994462"], ["updated_at", "2014-03-18 23:18:54.994462"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:18:54.997225"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:18:54.997225"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:18:55.000692"], ["points", 1], ["updated_at", "2014-03-18 23:18:55.000692"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:18:55.002166"], ["updated_at", "2014-03-18 23:18:55.002166"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:18:55.004456"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:18:55.004456"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:18:55.009485"], ["points", 1], ["updated_at", "2014-03-18 23:18:55.009485"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:18:55.011074"], ["points", 1], ["updated_at", "2014-03-18 23:18:55.011074"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:18:55.012248"], ["updated_at", "2014-03-18 23:18:55.012248"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:18:55.014733"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:18:55.014733"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:18:55.019685"], ["points", 1], ["updated_at", "2014-03-18 23:18:55.019685"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:18:55.021072"], ["points", 1], ["updated_at", "2014-03-18 23:18:55.021072"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:18:55.022971"], ["updated_at", "2014-03-18 23:18:55.022971"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:18:55.028178"], ["points", 1], ["updated_at", "2014-03-18 23:18:55.028178"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:18:55.029672"], ["points", 1], ["updated_at", "2014-03-18 23:18:55.029672"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:18:55.030878"], ["points", 1], ["updated_at", "2014-03-18 23:18:55.030878"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:18:55.031879"], ["updated_at", "2014-03-18 23:18:55.031879"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:18:55.034158"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:18:55.034158"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:18:55.037736"], ["goal_id", 2], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:18:55.037736"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 3) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:18:55.039891"], ["goal_id", 3], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:18:55.039891"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:18:55.043469"], ["updated_at", "2014-03-18 23:18:55.043469"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:18:55.045187"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 23:18:55.045187"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:18:55.046820"], ["updated_at", "2014-03-18 23:18:55.046820"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:18:55.055975"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:18:55.055975"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 7ms (ActiveRecord: 0.7ms)  (0.1ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:18:55.060451"], ["updated_at", "2014-03-18 23:18:55.060451"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:18:55.062175"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 23:18:55.062175"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:18:55.063591"], ["updated_at", "2014-03-18 23:18:55.063591"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:18:55.071407"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:18:55.071407"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 7ms (ActiveRecord: 0.6ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:18:55.075715"], ["points", 1], ["updated_at", "2014-03-18 23:18:55.075715"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:18:55.077217"], ["updated_at", "2014-03-18 23:18:55.077217"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:18:55.083098"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:18:55.083098"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 5ms (ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:18:55.087244"], ["points", 1], ["updated_at", "2014-03-18 23:18:55.087244"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:18:55.088717"], ["updated_at", "2014-03-18 23:18:55.088717"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:18:55.094934"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:18:55.094934"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 5ms (ActiveRecord: 0.5ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:18:55.099590"], ["updated_at", "2014-03-18 23:18:55.099590"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "gamification_medals" ("created_at", "description", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:18:55.108332"], ["description", "Voluptas mollitia alias voluptate ut quam molestiae maxime."], ["image", nil], ["name", "ea"], ["updated_at", "2014-03-18 23:18:55.108332"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:18:55.113765"], ["points", 1], ["updated_at", "2014-03-18 23:18:55.113765"]] SQL (0.1ms) UPDATE "gamification_medals" SET "goal_id" = ?, "updated_at" = ? WHERE "gamification_medals"."id" = 1 [["goal_id", 1], ["updated_at", "2014-03-18 23:18:55.114925"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:18:55.117948"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:18:55.117948"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]]  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:18:55.123580"], ["updated_at", "2014-03-18 23:18:55.123580"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ArticlesController#show as HTML Parameters: {"id"=>"1"} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Completed 200 OK in 5ms (Views: 3.8ms | ActiveRecord: 0.0ms)  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:18:55.134759"], ["points", 100], ["updated_at", "2014-03-18 23:18:55.134759"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:18:55.137270"], ["goal_id", 1], ["updated_at", "2014-03-18 23:18:55.137270"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:18:55.139285"], ["description", "Voluptas mollitia alias voluptate ut quam molestiae maxime."], ["goal_id", 1], ["image", nil], ["name", "ea"], ["updated_at", "2014-03-18 23:18:55.139285"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (1.7ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:18:55.150608"], ["points", 100], ["updated_at", "2014-03-18 23:18:55.150608"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:18:55.153008"], ["goal_id", 1], ["updated_at", "2014-03-18 23:18:55.153008"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:18:55.154995"], ["description", "Voluptas mollitia alias voluptate ut quam molestiae maxime."], ["goal_id", 1], ["image", nil], ["name", "ea"], ["updated_at", "2014-03-18 23:18:55.154995"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (2.0ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:18:55.165366"], ["points", 100], ["updated_at", "2014-03-18 23:18:55.165366"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:18:55.167971"], ["goal_id", 1], ["updated_at", "2014-03-18 23:18:55.167971"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:18:55.170035"], ["description", "Voluptas mollitia alias voluptate ut quam molestiae maxime."], ["goal_id", 1], ["image", nil], ["name", "ea"], ["updated_at", "2014-03-18 23:18:55.170035"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (1.9ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:18:55.181023"], ["seen_at", "2014-03-16 23:18:55.179268"], ["updated_at", "2014-03-18 23:18:55.181023"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE ("gamification_rewards"."seen_at" IS NOT NULL)  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:18:55.185713"], ["updated_at", "2014-03-18 23:18:55.185713"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."seen_at" IS NULL  (0.3ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:18:55.188380"], ["updated_at", "2014-03-18 23:18:55.188380"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:18:55.188380"], ["seen_at", "2014-03-16 23:18:55.188380"], ["updated_at", "2014-03-18 23:18:55.188380"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.3ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:19:07.125504"], ["updated_at", "2014-03-18 23:19:07.125504"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.2ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (1.0ms) INSERT INTO "gamification_rewards" ("created_at", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-03-18 23:19:07.147616"], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:19:07.147616"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.2ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "gamification_rewards" SET "updated_at" = '2014-03-18 23:19:07.160863', "seen_at" = '2014-03-18 23:19:07.160863' WHERE "gamification_rewards"."id" = 1  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]]  (2.0ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:19:07.174940"], ["points", 100], ["updated_at", "2014-03-18 23:19:07.174940"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:19:07.178456"], ["goal_id", 1], ["updated_at", "2014-03-18 23:19:07.178456"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:19:07.190205"], ["description", "Neque rerum possimus alias nesciunt odio rerum."], ["goal_id", 1], ["image", nil], ["name", "nobis"], ["updated_at", "2014-03-18 23:19:07.190205"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.2ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (6.0ms)  (0.8ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:19:07.245227"], ["points", 100], ["updated_at", "2014-03-18 23:19:07.245227"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:19:07.247882"], ["goal_id", 1], ["updated_at", "2014-03-18 23:19:07.247882"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:19:07.249932"], ["description", "Neque rerum possimus alias nesciunt odio rerum."], ["goal_id", 1], ["image", nil], ["name", "nobis"], ["updated_at", "2014-03-18 23:19:07.249932"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (1.6ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:19:07.259320"], ["points", 100], ["updated_at", "2014-03-18 23:19:07.259320"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:19:07.261797"], ["goal_id", 1], ["updated_at", "2014-03-18 23:19:07.261797"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:19:07.263819"], ["description", "Neque rerum possimus alias nesciunt odio rerum."], ["goal_id", 1], ["image", nil], ["name", "nobis"], ["updated_at", "2014-03-18 23:19:07.263819"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (1.8ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:19:07.272460"], ["seen_at", "2014-03-16 23:19:07.272460"], ["updated_at", "2014-03-18 23:19:07.272460"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:19:07.272460"], ["updated_at", "2014-03-18 23:19:07.272460"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:19:07.272460"], ["seen_at", "2014-03-16 23:19:07.272460"], ["updated_at", "2014-03-18 23:19:07.272460"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE ("gamification_rewards"."seen_at" IS NOT NULL)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:19:07.272460"], ["updated_at", "2014-03-18 23:19:07.272460"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."seen_at" IS NULL  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:19:07.272460"], ["updated_at", "2014-03-18 23:19:07.272460"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:19:07.272460"], ["description", "Neque rerum possimus alias nesciunt odio rerum."], ["image", nil], ["name", "nobis"], ["updated_at", "2014-03-18 23:19:07.272460"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:19:07.272460"], ["points", 1], ["updated_at", "2014-03-18 23:19:07.272460"]] SQL (0.0ms) UPDATE "gamification_medals" SET "goal_id" = ? WHERE "gamification_medals"."id" = 1 [["goal_id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:19:07.272460"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:19:07.272460"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:19:07.272460"], ["points", 1], ["updated_at", "2014-03-18 23:19:07.272460"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:19:07.272460"], ["points", 1], ["updated_at", "2014-03-18 23:19:07.272460"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:19:07.272460"], ["updated_at", "2014-03-18 23:19:07.272460"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:19:07.272460"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:19:07.272460"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:19:07.272460"], ["points", 1], ["updated_at", "2014-03-18 23:19:07.272460"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:19:07.272460"], ["points", 1], ["updated_at", "2014-03-18 23:19:07.272460"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:19:07.272460"], ["points", 1], ["updated_at", "2014-03-18 23:19:07.272460"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:19:07.272460"], ["updated_at", "2014-03-18 23:19:07.272460"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:19:07.272460"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:19:07.272460"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:19:07.272460"], ["goal_id", 2], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:19:07.272460"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 3) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:19:07.272460"], ["goal_id", 3], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:19:07.272460"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:19:07.272460"], ["points", 1], ["updated_at", "2014-03-18 23:19:07.272460"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:19:07.272460"], ["points", 1], ["updated_at", "2014-03-18 23:19:07.272460"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:19:07.272460"], ["updated_at", "2014-03-18 23:19:07.272460"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:19:07.272460"], ["points", 1], ["updated_at", "2014-03-18 23:19:07.272460"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:19:07.272460"], ["updated_at", "2014-03-18 23:19:07.272460"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:19:07.272460"], ["points", 1], ["updated_at", "2014-03-18 23:19:07.272460"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:19:07.272460"], ["updated_at", "2014-03-18 23:19:07.272460"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:19:07.272460"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:19:07.272460"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:19:07.272460"], ["points", 1], ["updated_at", "2014-03-18 23:19:07.272460"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:19:07.272460"], ["updated_at", "2014-03-18 23:19:07.272460"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:19:07.272460"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:19:07.272460"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:19:07.272460"], ["points", 1], ["updated_at", "2014-03-18 23:19:07.272460"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:19:07.272460"], ["updated_at", "2014-03-18 23:19:07.272460"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:19:07.272460"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:19:07.272460"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:19:07.272460"], ["points", 1], ["updated_at", "2014-03-18 23:19:07.272460"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:19:07.272460"], ["updated_at", "2014-03-18 23:19:07.272460"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:19:07.272460"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:19:07.272460"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:19:07.272460"], ["points", 1], ["updated_at", "2014-03-18 23:19:07.272460"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:19:07.272460"], ["updated_at", "2014-03-18 23:19:07.272460"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:19:07.272460"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:19:07.272460"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:19:07.272460"], ["updated_at", "2014-03-18 23:19:07.272460"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:19:07.272460"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 23:19:07.272460"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:19:07.272460"], ["updated_at", "2014-03-18 23:19:07.272460"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:19:07.272460"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:19:07.272460"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:19:07.272460"], ["updated_at", "2014-03-18 23:19:07.272460"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:19:07.272460"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 23:19:07.272460"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:19:07.272460"], ["updated_at", "2014-03-18 23:19:07.272460"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:19:07.272460"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:19:07.272460"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:19:07.272460"], ["updated_at", "2014-03-18 23:19:07.272460"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ArticlesController#show as HTML Parameters: {"id"=>"1"} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Completed 200 OK in 0ms (Views: 0.0ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:19:07.272460"], ["updated_at", "2014-03-18 23:19:07.272460"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:19:07.272460"], ["updated_at", "2014-03-18 23:19:07.272460"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.3ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:19:55.492613"], ["points", 1], ["updated_at", "2014-03-18 23:19:55.492613"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:19:55.496007"], ["points", 1], ["updated_at", "2014-03-18 23:19:55.496007"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:19:55.497952"], ["points", 1], ["updated_at", "2014-03-18 23:19:55.497952"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:19:55.499932"], ["updated_at", "2014-03-18 23:19:55.499932"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.2ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:19:55.517239"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:19:55.517239"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.2ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:19:55.532231"], ["goal_id", 2], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:19:55.532231"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 3) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:19:55.536171"], ["goal_id", 3], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:19:55.536171"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (1.9ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:19:55.542627"], ["points", 1], ["updated_at", "2014-03-18 23:19:55.542627"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:19:55.544967"], ["points", 1], ["updated_at", "2014-03-18 23:19:55.544967"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:19:55.546676"], ["updated_at", "2014-03-18 23:19:55.546676"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:19:55.551942"], ["points", 1], ["updated_at", "2014-03-18 23:19:55.551942"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:19:55.553360"], ["updated_at", "2014-03-18 23:19:55.553360"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:19:55.555891"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:19:55.555891"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:19:55.559119"], ["points", 1], ["updated_at", "2014-03-18 23:19:55.559119"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:19:55.560471"], ["updated_at", "2014-03-18 23:19:55.560471"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:19:55.562690"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:19:55.562690"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:19:55.567746"], ["points", 1], ["updated_at", "2014-03-18 23:19:55.567746"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:19:55.569256"], ["updated_at", "2014-03-18 23:19:55.569256"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:19:55.571594"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:19:55.571594"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:19:55.576029"], ["points", 1], ["updated_at", "2014-03-18 23:19:55.576029"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:19:55.578219"], ["updated_at", "2014-03-18 23:19:55.578219"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:19:55.582252"], ["points", 1], ["updated_at", "2014-03-18 23:19:55.582252"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:19:55.583790"], ["points", 1], ["updated_at", "2014-03-18 23:19:55.583790"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:19:55.585281"], ["updated_at", "2014-03-18 23:19:55.585281"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:19:55.624699"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:19:55.624699"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:19:55.632046"], ["updated_at", "2014-03-18 23:19:55.632046"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ArticlesController#show as HTML Parameters: {"id"=>"1"} Article Load (0.2ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Rendered articles/show.html.erb within layouts/application (0.3ms) Completed 200 OK in 7ms (Views: 5.3ms | ActiveRecord: 0.2ms)  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:19:55.649279"], ["updated_at", "2014-03-18 23:19:55.649279"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.4ms) INSERT INTO "gamification_rewards" ("created_at", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-03-18 23:19:55.652079"], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:19:55.652079"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:19:55.657473"], ["updated_at", "2014-03-18 23:19:55.657473"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "gamification_medals" ("created_at", "description", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:19:55.666902"], ["description", "Dolorem quos molestiae est quo enim nesciunt eaque a."], ["image", nil], ["name", "blanditiis"], ["updated_at", "2014-03-18 23:19:55.666902"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:19:55.671997"], ["points", 1], ["updated_at", "2014-03-18 23:19:55.671997"]] SQL (0.1ms) UPDATE "gamification_medals" SET "goal_id" = ?, "updated_at" = ? WHERE "gamification_medals"."id" = 1 [["goal_id", 1], ["updated_at", "2014-03-18 23:19:55.673088"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:19:55.676078"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:19:55.676078"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:19:55.682789"], ["points", 100], ["updated_at", "2014-03-18 23:19:55.682789"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:19:55.685973"], ["goal_id", 1], ["updated_at", "2014-03-18 23:19:55.685973"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:19:55.688831"], ["description", "Dolorem quos molestiae est quo enim nesciunt eaque a."], ["goal_id", 1], ["image", nil], ["name", "blanditiis"], ["updated_at", "2014-03-18 23:19:55.688831"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (3.0ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:19:55.703268"], ["points", 100], ["updated_at", "2014-03-18 23:19:55.703268"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:19:55.705896"], ["goal_id", 1], ["updated_at", "2014-03-18 23:19:55.705896"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:19:55.708630"], ["description", "Dolorem quos molestiae est quo enim nesciunt eaque a."], ["goal_id", 1], ["image", nil], ["name", "blanditiis"], ["updated_at", "2014-03-18 23:19:55.708630"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (3.7ms)  (0.5ms) rollback transaction  (0.0ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:19:55.723045"], ["points", 100], ["updated_at", "2014-03-18 23:19:55.723045"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:19:55.725679"], ["goal_id", 1], ["updated_at", "2014-03-18 23:19:55.725679"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:19:55.727729"], ["description", "Dolorem quos molestiae est quo enim nesciunt eaque a."], ["goal_id", 1], ["image", nil], ["name", "blanditiis"], ["updated_at", "2014-03-18 23:19:55.727729"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (2.3ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:19:55.739500"], ["updated_at", "2014-03-18 23:19:55.739500"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:19:55.741900"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 23:19:55.741900"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:19:55.744172"], ["updated_at", "2014-03-18 23:19:55.744172"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:19:55.753339"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:19:55.753339"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 7ms (ActiveRecord: 0.6ms)  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:19:55.757726"], ["updated_at", "2014-03-18 23:19:55.757726"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:19:55.759436"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 23:19:55.759436"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:19:55.761861"], ["updated_at", "2014-03-18 23:19:55.761861"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:19:55.770225"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:19:55.770225"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 7ms (ActiveRecord: 0.7ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:19:55.775221"], ["points", 1], ["updated_at", "2014-03-18 23:19:55.775221"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:19:55.776803"], ["updated_at", "2014-03-18 23:19:55.776803"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:19:55.782838"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:19:55.782838"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 5ms (ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:19:55.787854"], ["points", 1], ["updated_at", "2014-03-18 23:19:55.787854"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:19:55.789598"], ["updated_at", "2014-03-18 23:19:55.789598"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:19:55.796794"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:19:55.796794"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 6ms (ActiveRecord: 0.5ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:19:55.800620"], ["updated_at", "2014-03-18 23:19:55.800620"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:19:55.800620"], ["seen_at", "2014-03-16 23:19:55.800620"], ["updated_at", "2014-03-18 23:19:55.800620"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:19:55.800620"], ["updated_at", "2014-03-18 23:19:55.800620"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."seen_at" IS NULL  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:19:55.800620"], ["seen_at", "2014-03-16 23:19:55.800620"], ["updated_at", "2014-03-18 23:19:55.800620"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE ("gamification_rewards"."seen_at" IS NOT NULL)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:19:55.800620"], ["updated_at", "2014-03-18 23:19:55.800620"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:19:55.800620"], ["updated_at", "2014-03-18 23:19:55.800620"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.3ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:21:53.243432"], ["updated_at", "2014-03-18 23:21:53.243432"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:21:53.256022"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 23:21:53.256022"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:21:53.259505"], ["updated_at", "2014-03-18 23:21:53.259505"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:21:53.293449"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:21:53.293449"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 30ms (ActiveRecord: 1.3ms)  (0.1ms) SELECT COUNT(*) FROM "gamification_rewards"  (1.9ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:21:53.301571"], ["updated_at", "2014-03-18 23:21:53.301571"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:21:53.303867"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 23:21:53.303867"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:21:53.305753"], ["updated_at", "2014-03-18 23:21:53.305753"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:21:53.348493"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:21:53.348493"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 41ms (ActiveRecord: 0.7ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:21:53.353258"], ["points", 1], ["updated_at", "2014-03-18 23:21:53.353258"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:21:53.354766"], ["updated_at", "2014-03-18 23:21:53.354766"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:21:53.361188"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:21:53.361188"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 6ms (ActiveRecord: 0.6ms)  (0.1ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:21:53.366775"], ["points", 1], ["updated_at", "2014-03-18 23:21:53.366775"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:21:53.368616"], ["updated_at", "2014-03-18 23:21:53.368616"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:21:53.376321"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:21:53.376321"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 6ms (ActiveRecord: 0.5ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:21:53.380503"], ["points", 1], ["updated_at", "2014-03-18 23:21:53.380503"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:21:53.381880"], ["points", 1], ["updated_at", "2014-03-18 23:21:53.381880"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:21:53.383078"], ["updated_at", "2014-03-18 23:21:53.383078"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.3ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:21:53.388271"], ["points", 1], ["updated_at", "2014-03-18 23:21:53.388271"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:21:53.390369"], ["updated_at", "2014-03-18 23:21:53.390369"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:21:53.393453"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:21:53.393453"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:21:53.398488"], ["points", 1], ["updated_at", "2014-03-18 23:21:53.398488"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:21:53.400237"], ["updated_at", "2014-03-18 23:21:53.400237"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:21:53.404618"], ["points", 1], ["updated_at", "2014-03-18 23:21:53.404618"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:21:53.406077"], ["updated_at", "2014-03-18 23:21:53.406077"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:21:53.408788"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:21:53.408788"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:21:53.412717"], ["points", 1], ["updated_at", "2014-03-18 23:21:53.412717"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:21:53.414757"], ["updated_at", "2014-03-18 23:21:53.414757"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:21:53.417737"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:21:53.417737"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:21:53.424223"], ["points", 1], ["updated_at", "2014-03-18 23:21:53.424223"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:21:53.426495"], ["points", 1], ["updated_at", "2014-03-18 23:21:53.426495"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:21:53.428006"], ["updated_at", "2014-03-18 23:21:53.428006"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:21:53.430482"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:21:53.430482"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:21:53.435794"], ["points", 1], ["updated_at", "2014-03-18 23:21:53.435794"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:21:53.437986"], ["points", 1], ["updated_at", "2014-03-18 23:21:53.437986"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:21:53.439753"], ["points", 1], ["updated_at", "2014-03-18 23:21:53.439753"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:21:53.441170"], ["updated_at", "2014-03-18 23:21:53.441170"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:21:53.444130"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:21:53.444130"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:21:53.447588"], ["goal_id", 2], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:21:53.447588"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 3) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:21:53.449863"], ["goal_id", 3], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:21:53.449863"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:21:53.452731"], ["updated_at", "2014-03-18 23:21:53.452731"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "gamification_medals" ("created_at", "description", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:21:53.461452"], ["description", "Magnam maxime quisquam suscipit delectus omnis excepturi quam."], ["image", nil], ["name", "eius"], ["updated_at", "2014-03-18 23:21:53.461452"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:21:53.467151"], ["points", 1], ["updated_at", "2014-03-18 23:21:53.467151"]] SQL (0.2ms) UPDATE "gamification_medals" SET "goal_id" = ?, "updated_at" = ? WHERE "gamification_medals"."id" = 1 [["goal_id", 1], ["updated_at", "2014-03-18 23:21:53.468525"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:21:53.472586"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:21:53.472586"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:21:53.480335"], ["updated_at", "2014-03-18 23:21:53.480335"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ArticlesController#show as HTML Parameters: {"id"=>"1"} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Completed 200 OK in 6ms (Views: 5.2ms | ActiveRecord: 0.1ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:21:53.493090"], ["updated_at", "2014-03-18 23:21:53.493090"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.4ms) INSERT INTO "gamification_rewards" ("created_at", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-03-18 23:21:53.496569"], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:21:53.496569"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.3ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "gamification_rewards" SET "updated_at" = '2014-03-18 23:21:53.501324', "seen_at" = '2014-03-18 23:21:53.501324' WHERE "gamification_rewards"."id" = 1  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]]  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:21:53.509041"], ["updated_at", "2014-03-18 23:21:53.509041"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:21:53.510617"], ["updated_at", "2014-03-18 23:21:53.510617"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:21:53.517608"], ["points", 100], ["updated_at", "2014-03-18 23:21:53.517608"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.4ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:21:53.520127"], ["goal_id", 1], ["updated_at", "2014-03-18 23:21:53.520127"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:21:53.523049"], ["description", "Magnam maxime quisquam suscipit delectus omnis excepturi quam."], ["goal_id", 1], ["image", nil], ["name", "eius"], ["updated_at", "2014-03-18 23:21:53.523049"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (1.9ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:21:53.535343"], ["points", 100], ["updated_at", "2014-03-18 23:21:53.535343"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:21:53.537808"], ["goal_id", 1], ["updated_at", "2014-03-18 23:21:53.537808"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:21:53.539858"], ["description", "Magnam maxime quisquam suscipit delectus omnis excepturi quam."], ["goal_id", 1], ["image", nil], ["name", "eius"], ["updated_at", "2014-03-18 23:21:53.539858"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (2.3ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:21:53.551079"], ["points", 100], ["updated_at", "2014-03-18 23:21:53.551079"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:21:53.554589"], ["goal_id", 1], ["updated_at", "2014-03-18 23:21:53.554589"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:21:53.557481"], ["description", "Magnam maxime quisquam suscipit delectus omnis excepturi quam."], ["goal_id", 1], ["image", nil], ["name", "eius"], ["updated_at", "2014-03-18 23:21:53.557481"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (2.3ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.2ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:21:53.571321"], ["updated_at", "2014-03-18 23:21:53.571321"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:21:53.576320"], ["seen_at", "2014-03-16 23:21:53.574205"], ["updated_at", "2014-03-18 23:21:53.576320"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.2ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:21:53.581564"], ["seen_at", "2014-03-16 23:21:53.579601"], ["updated_at", "2014-03-18 23:21:53.581564"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE ("gamification_rewards"."seen_at" IS NOT NULL)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.2ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:21:53.587622"], ["updated_at", "2014-03-18 23:21:53.587622"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."seen_at" IS NULL  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.3ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:22:25.799829"], ["updated_at", "2014-03-18 23:22:25.799829"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:22:25.812987"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 23:22:25.812987"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:22:25.816497"], ["updated_at", "2014-03-18 23:22:25.816497"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:22:25.851762"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:22:25.851762"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 32ms (ActiveRecord: 1.3ms)  (0.1ms) SELECT COUNT(*) FROM "gamification_rewards"  (1.9ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:22:25.859742"], ["updated_at", "2014-03-18 23:22:25.859742"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:22:25.862346"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 23:22:25.862346"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:22:25.864418"], ["updated_at", "2014-03-18 23:22:25.864418"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:22:25.907048"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:22:25.907048"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 42ms (ActiveRecord: 0.6ms)  (0.5ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:22:25.911612"], ["points", 1], ["updated_at", "2014-03-18 23:22:25.911612"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:22:25.913084"], ["updated_at", "2014-03-18 23:22:25.913084"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.2ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:22:25.920611"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:22:25.920611"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 7ms (ActiveRecord: 0.7ms)  (0.1ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:22:25.926168"], ["points", 1], ["updated_at", "2014-03-18 23:22:25.926168"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:22:25.928071"], ["updated_at", "2014-03-18 23:22:25.928071"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:22:25.934983"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:22:25.934983"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 5ms (ActiveRecord: 0.5ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:22:25.940899"], ["seen_at", "2014-03-16 23:22:25.938948"], ["updated_at", "2014-03-18 23:22:25.940899"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE ("gamification_rewards"."seen_at" IS NOT NULL)  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.2ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:22:25.947703"], ["updated_at", "2014-03-18 23:22:25.947703"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."seen_at" IS NULL  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:22:25.951156"], ["updated_at", "2014-03-18 23:22:25.951156"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:22:25.951156"], ["seen_at", "2014-03-16 23:22:25.951156"], ["updated_at", "2014-03-18 23:22:25.951156"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:22:25.951156"], ["points", 1], ["updated_at", "2014-03-18 23:22:25.951156"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:22:25.951156"], ["updated_at", "2014-03-18 23:22:25.951156"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:22:25.951156"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:22:25.951156"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:22:25.951156"], ["points", 1], ["updated_at", "2014-03-18 23:22:25.951156"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:22:25.951156"], ["updated_at", "2014-03-18 23:22:25.951156"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:22:25.951156"], ["points", 1], ["updated_at", "2014-03-18 23:22:25.951156"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:22:25.951156"], ["updated_at", "2014-03-18 23:22:25.951156"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:22:25.951156"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:22:25.951156"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:22:25.951156"], ["points", 1], ["updated_at", "2014-03-18 23:22:25.951156"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:22:25.951156"], ["updated_at", "2014-03-18 23:22:25.951156"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:22:25.951156"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:22:25.951156"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:22:25.951156"], ["points", 1], ["updated_at", "2014-03-18 23:22:25.951156"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:22:25.951156"], ["points", 1], ["updated_at", "2014-03-18 23:22:25.951156"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:22:25.951156"], ["points", 1], ["updated_at", "2014-03-18 23:22:25.951156"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:22:25.951156"], ["updated_at", "2014-03-18 23:22:25.951156"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:22:25.951156"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:22:25.951156"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:22:25.951156"], ["goal_id", 2], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:22:25.951156"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 3) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:22:25.951156"], ["goal_id", 3], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:22:25.951156"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:22:25.951156"], ["points", 1], ["updated_at", "2014-03-18 23:22:25.951156"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:22:25.951156"], ["points", 1], ["updated_at", "2014-03-18 23:22:25.951156"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:22:25.951156"], ["updated_at", "2014-03-18 23:22:25.951156"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:22:25.951156"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:22:25.951156"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:22:25.951156"], ["points", 1], ["updated_at", "2014-03-18 23:22:25.951156"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:22:25.951156"], ["points", 1], ["updated_at", "2014-03-18 23:22:25.951156"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:22:25.951156"], ["updated_at", "2014-03-18 23:22:25.951156"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:22:25.951156"], ["points", 100], ["updated_at", "2014-03-18 23:22:25.951156"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:22:25.951156"], ["goal_id", 1], ["updated_at", "2014-03-18 23:22:25.951156"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:22:25.951156"], ["description", "Asperiores omnis qui minima pariatur."], ["goal_id", 1], ["image", nil], ["name", "maxime"], ["updated_at", "2014-03-18 23:22:25.951156"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:22:25.951156"], ["points", 100], ["updated_at", "2014-03-18 23:22:25.951156"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:22:25.951156"], ["goal_id", 1], ["updated_at", "2014-03-18 23:22:25.951156"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:22:25.951156"], ["description", "Asperiores omnis qui minima pariatur."], ["goal_id", 1], ["image", nil], ["name", "maxime"], ["updated_at", "2014-03-18 23:22:25.951156"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:22:25.951156"], ["points", 100], ["updated_at", "2014-03-18 23:22:25.951156"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:22:25.951156"], ["goal_id", 1], ["updated_at", "2014-03-18 23:22:25.951156"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:22:25.951156"], ["description", "Asperiores omnis qui minima pariatur."], ["goal_id", 1], ["image", nil], ["name", "maxime"], ["updated_at", "2014-03-18 23:22:25.951156"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:22:25.951156"], ["updated_at", "2014-03-18 23:22:25.951156"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-03-18 23:22:25.951156"], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:22:25.951156"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "gamification_rewards" SET "updated_at" = '2014-03-18 23:22:25.951156', "seen_at" = '2014-03-18 23:22:25.951156' WHERE "gamification_rewards"."id" = 1  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:22:25.951156"], ["updated_at", "2014-03-18 23:22:25.951156"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:22:25.951156"], ["description", "Asperiores omnis qui minima pariatur."], ["image", nil], ["name", "maxime"], ["updated_at", "2014-03-18 23:22:25.951156"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:22:25.951156"], ["points", 1], ["updated_at", "2014-03-18 23:22:25.951156"]] SQL (0.0ms) UPDATE "gamification_medals" SET "goal_id" = ? WHERE "gamification_medals"."id" = 1 [["goal_id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:22:25.951156"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:22:25.951156"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:22:25.951156"], ["updated_at", "2014-03-18 23:22:25.951156"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:22:25.951156"], ["updated_at", "2014-03-18 23:22:25.951156"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:22:25.951156"], ["updated_at", "2014-03-18 23:22:25.951156"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ArticlesController#show as HTML Parameters: {"id"=>"1"} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Completed 200 OK in 0ms (Views: 0.0ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.4ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.4ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:22:45.021175"], ["updated_at", "2014-03-18 23:22:45.021175"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."seen_at" IS NULL  (1.9ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:22:45.027841"], ["seen_at", "2014-03-16 23:22:45.027841"], ["updated_at", "2014-03-18 23:22:45.027841"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE ("gamification_rewards"."seen_at" IS NOT NULL)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:22:45.027841"], ["updated_at", "2014-03-18 23:22:45.027841"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:22:45.027841"], ["seen_at", "2014-03-16 23:22:45.027841"], ["updated_at", "2014-03-18 23:22:45.027841"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:22:45.027841"], ["updated_at", "2014-03-18 23:22:45.027841"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-03-18 23:22:45.027841"], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:22:45.027841"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "gamification_rewards" SET "updated_at" = '2014-03-18 23:22:45.027841', "seen_at" = '2014-03-18 23:22:45.027841' WHERE "gamification_rewards"."id" = 1  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:22:45.027841"], ["points", 1], ["updated_at", "2014-03-18 23:22:45.027841"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:22:45.027841"], ["updated_at", "2014-03-18 23:22:45.027841"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:22:45.027841"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:22:45.027841"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:22:45.027841"], ["points", 1], ["updated_at", "2014-03-18 23:22:45.027841"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:22:45.027841"], ["updated_at", "2014-03-18 23:22:45.027841"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:22:45.027841"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:22:45.027841"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:22:45.027841"], ["points", 1], ["updated_at", "2014-03-18 23:22:45.027841"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:22:45.027841"], ["points", 1], ["updated_at", "2014-03-18 23:22:45.027841"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:22:45.027841"], ["updated_at", "2014-03-18 23:22:45.027841"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:22:45.027841"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:22:45.027841"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:22:45.027841"], ["points", 1], ["updated_at", "2014-03-18 23:22:45.027841"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:22:45.027841"], ["points", 1], ["updated_at", "2014-03-18 23:22:45.027841"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:22:45.027841"], ["points", 1], ["updated_at", "2014-03-18 23:22:45.027841"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:22:45.027841"], ["updated_at", "2014-03-18 23:22:45.027841"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:22:45.027841"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:22:45.027841"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:22:45.027841"], ["goal_id", 2], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:22:45.027841"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 3) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:22:45.027841"], ["goal_id", 3], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:22:45.027841"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:22:45.027841"], ["points", 1], ["updated_at", "2014-03-18 23:22:45.027841"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:22:45.027841"], ["updated_at", "2014-03-18 23:22:45.027841"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:22:45.027841"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:22:45.027841"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:22:45.027841"], ["points", 1], ["updated_at", "2014-03-18 23:22:45.027841"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:22:45.027841"], ["updated_at", "2014-03-18 23:22:45.027841"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:22:45.027841"], ["points", 1], ["updated_at", "2014-03-18 23:22:45.027841"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:22:45.027841"], ["points", 1], ["updated_at", "2014-03-18 23:22:45.027841"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:22:45.027841"], ["updated_at", "2014-03-18 23:22:45.027841"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:22:45.027841"], ["points", 100], ["updated_at", "2014-03-18 23:22:45.027841"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:22:45.027841"], ["goal_id", 1], ["updated_at", "2014-03-18 23:22:45.027841"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:22:45.027841"], ["description", "Repellat ullam eum et maiores et sed est nostrum."], ["goal_id", 1], ["image", nil], ["name", "et"], ["updated_at", "2014-03-18 23:22:45.027841"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:22:45.027841"], ["points", 100], ["updated_at", "2014-03-18 23:22:45.027841"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:22:45.027841"], ["goal_id", 1], ["updated_at", "2014-03-18 23:22:45.027841"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:22:45.027841"], ["description", "Repellat ullam eum et maiores et sed est nostrum."], ["goal_id", 1], ["image", nil], ["name", "et"], ["updated_at", "2014-03-18 23:22:45.027841"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:22:45.027841"], ["points", 100], ["updated_at", "2014-03-18 23:22:45.027841"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:22:45.027841"], ["goal_id", 1], ["updated_at", "2014-03-18 23:22:45.027841"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:22:45.027841"], ["description", "Repellat ullam eum et maiores et sed est nostrum."], ["goal_id", 1], ["image", nil], ["name", "et"], ["updated_at", "2014-03-18 23:22:45.027841"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:22:45.027841"], ["updated_at", "2014-03-18 23:22:45.027841"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:22:45.027841"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 23:22:45.027841"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:22:45.027841"], ["updated_at", "2014-03-18 23:22:45.027841"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:22:45.027841"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:22:45.027841"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:22:45.027841"], ["updated_at", "2014-03-18 23:22:45.027841"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:22:45.027841"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 23:22:45.027841"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:22:45.027841"], ["updated_at", "2014-03-18 23:22:45.027841"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:22:45.027841"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:22:45.027841"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:22:45.027841"], ["points", 1], ["updated_at", "2014-03-18 23:22:45.027841"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:22:45.027841"], ["updated_at", "2014-03-18 23:22:45.027841"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:22:45.027841"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:22:45.027841"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:22:45.027841"], ["points", 1], ["updated_at", "2014-03-18 23:22:45.027841"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:22:45.027841"], ["updated_at", "2014-03-18 23:22:45.027841"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:22:45.027841"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:22:45.027841"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:22:45.027841"], ["updated_at", "2014-03-18 23:22:45.027841"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ArticlesController#show as HTML Parameters: {"id"=>"1"} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Completed 200 OK in 0ms (Views: 0.0ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:22:45.027841"], ["updated_at", "2014-03-18 23:22:45.027841"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:22:45.027841"], ["description", "Repellat ullam eum et maiores et sed est nostrum."], ["image", nil], ["name", "et"], ["updated_at", "2014-03-18 23:22:45.027841"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:22:45.027841"], ["points", 1], ["updated_at", "2014-03-18 23:22:45.027841"]] SQL (0.0ms) UPDATE "gamification_medals" SET "goal_id" = ? WHERE "gamification_medals"."id" = 1 [["goal_id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:22:45.027841"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:22:45.027841"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:22:45.027841"], ["updated_at", "2014-03-18 23:22:45.027841"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:22:45.027841"], ["updated_at", "2014-03-18 23:22:45.027841"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.3ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:23:29.059082"], ["updated_at", "2014-03-18 23:23:29.059082"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:23:29.065035"], ["updated_at", "2014-03-18 23:23:29.065035"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (2.1ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:23:29.077012"], ["updated_at", "2014-03-18 23:23:29.077012"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "gamification_medals" ("created_at", "description", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:23:29.089785"], ["description", "Quas vel eum voluptatem tempore."], ["image", nil], ["name", "rerum"], ["updated_at", "2014-03-18 23:23:29.089785"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:23:29.100167"], ["points", 1], ["updated_at", "2014-03-18 23:23:29.100167"]] SQL (0.2ms) UPDATE "gamification_medals" SET "goal_id" = ?, "updated_at" = ? WHERE "gamification_medals"."id" = 1 [["goal_id", 1], ["updated_at", "2014-03-18 23:23:29.101437"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.2ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:23:29.118116"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:23:29.118116"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]]  (1.1ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:23:29.166041"], ["points", 100], ["updated_at", "2014-03-18 23:23:29.166041"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:23:29.168538"], ["goal_id", 1], ["updated_at", "2014-03-18 23:23:29.168538"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:23:29.170592"], ["description", "Quas vel eum voluptatem tempore."], ["goal_id", 1], ["image", nil], ["name", "rerum"], ["updated_at", "2014-03-18 23:23:29.170592"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (1.9ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:23:29.183689"], ["points", 100], ["updated_at", "2014-03-18 23:23:29.183689"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:23:29.186250"], ["goal_id", 1], ["updated_at", "2014-03-18 23:23:29.186250"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:23:29.188318"], ["description", "Quas vel eum voluptatem tempore."], ["goal_id", 1], ["image", nil], ["name", "rerum"], ["updated_at", "2014-03-18 23:23:29.188318"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (2.0ms)  (0.5ms) rollback transaction  (0.2ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:23:29.199987"], ["points", 100], ["updated_at", "2014-03-18 23:23:29.199987"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:23:29.202675"], ["goal_id", 1], ["updated_at", "2014-03-18 23:23:29.202675"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:23:29.204904"], ["description", "Quas vel eum voluptatem tempore."], ["goal_id", 1], ["image", nil], ["name", "rerum"], ["updated_at", "2014-03-18 23:23:29.204904"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (1.7ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:23:29.215386"], ["updated_at", "2014-03-18 23:23:29.215386"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.4ms) INSERT INTO "gamification_rewards" ("created_at", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-03-18 23:23:29.218085"], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:23:29.218085"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "gamification_rewards" SET "updated_at" = '2014-03-18 23:23:29.225709', "seen_at" = '2014-03-18 23:23:29.225709' WHERE "gamification_rewards"."id" = 1  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.2ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:23:29.231204"], ["updated_at", "2014-03-18 23:23:29.231204"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:23:29.236218"], ["seen_at", "2014-03-16 23:23:29.234260"], ["updated_at", "2014-03-18 23:23:29.236218"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:23:29.238781"], ["updated_at", "2014-03-18 23:23:29.238781"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."seen_at" IS NULL  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:23:29.238781"], ["seen_at", "2014-03-16 23:23:29.238781"], ["updated_at", "2014-03-18 23:23:29.238781"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE ("gamification_rewards"."seen_at" IS NOT NULL)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:23:29.238781"], ["updated_at", "2014-03-18 23:23:29.238781"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ArticlesController#show as HTML Parameters: {"id"=>"1"} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Completed 200 OK in 0ms (Views: 0.0ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:23:29.238781"], ["points", 1], ["updated_at", "2014-03-18 23:23:29.238781"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:23:29.238781"], ["points", 1], ["updated_at", "2014-03-18 23:23:29.238781"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:23:29.238781"], ["updated_at", "2014-03-18 23:23:29.238781"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:23:29.238781"], ["points", 1], ["updated_at", "2014-03-18 23:23:29.238781"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:23:29.238781"], ["points", 1], ["updated_at", "2014-03-18 23:23:29.238781"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:23:29.238781"], ["points", 1], ["updated_at", "2014-03-18 23:23:29.238781"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:23:29.238781"], ["updated_at", "2014-03-18 23:23:29.238781"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:23:29.238781"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:23:29.238781"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:23:29.238781"], ["goal_id", 2], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:23:29.238781"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 3) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:23:29.238781"], ["goal_id", 3], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:23:29.238781"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:23:29.238781"], ["points", 1], ["updated_at", "2014-03-18 23:23:29.238781"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:23:29.238781"], ["updated_at", "2014-03-18 23:23:29.238781"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:23:29.238781"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:23:29.238781"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:23:29.238781"], ["points", 1], ["updated_at", "2014-03-18 23:23:29.238781"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:23:29.238781"], ["updated_at", "2014-03-18 23:23:29.238781"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:23:29.238781"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:23:29.238781"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:23:29.238781"], ["points", 1], ["updated_at", "2014-03-18 23:23:29.238781"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:23:29.238781"], ["updated_at", "2014-03-18 23:23:29.238781"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:23:29.238781"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:23:29.238781"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:23:29.238781"], ["points", 1], ["updated_at", "2014-03-18 23:23:29.238781"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:23:29.238781"], ["updated_at", "2014-03-18 23:23:29.238781"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:23:29.238781"], ["points", 1], ["updated_at", "2014-03-18 23:23:29.238781"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:23:29.238781"], ["points", 1], ["updated_at", "2014-03-18 23:23:29.238781"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:23:29.238781"], ["updated_at", "2014-03-18 23:23:29.238781"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:23:29.238781"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:23:29.238781"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:23:29.238781"], ["updated_at", "2014-03-18 23:23:29.238781"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:23:29.238781"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 23:23:29.238781"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:23:29.238781"], ["updated_at", "2014-03-18 23:23:29.238781"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:23:29.238781"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:23:29.238781"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:23:29.238781"], ["updated_at", "2014-03-18 23:23:29.238781"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:23:29.238781"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 23:23:29.238781"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:23:29.238781"], ["updated_at", "2014-03-18 23:23:29.238781"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:23:29.238781"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:23:29.238781"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:23:29.238781"], ["points", 1], ["updated_at", "2014-03-18 23:23:29.238781"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:23:29.238781"], ["updated_at", "2014-03-18 23:23:29.238781"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:23:29.238781"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:23:29.238781"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:23:29.238781"], ["points", 1], ["updated_at", "2014-03-18 23:23:29.238781"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:23:29.238781"], ["updated_at", "2014-03-18 23:23:29.238781"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:23:29.238781"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:23:29.238781"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.5ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:29:02.706278"], ["seen_at", "2014-03-16 23:29:02.706278"], ["updated_at", "2014-03-18 23:29:02.706278"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE ("gamification_rewards"."seen_at" IS NOT NULL)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:29:02.706278"], ["updated_at", "2014-03-18 23:29:02.706278"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."seen_at" IS NULL  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:29:02.706278"], ["updated_at", "2014-03-18 23:29:02.706278"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:29:02.706278"], ["seen_at", "2014-03-16 23:29:02.706278"], ["updated_at", "2014-03-18 23:29:02.706278"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:29:02.706278"], ["updated_at", "2014-03-18 23:29:02.706278"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ArticlesController#show as HTML Parameters: {"id"=>"1"} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Rendered articles/show.html.erb within layouts/application (0.0ms) Completed 200 OK in 0ms (Views: 0.0ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:29:02.706278"], ["updated_at", "2014-03-18 23:29:02.706278"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:29:02.706278"], ["updated_at", "2014-03-18 23:29:02.706278"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:29:02.706278"], ["updated_at", "2014-03-18 23:29:02.706278"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-03-18 23:29:02.706278"], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:29:02.706278"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "gamification_rewards" SET "updated_at" = '2014-03-18 23:29:02.706278', "seen_at" = '2014-03-18 23:29:02.706278' WHERE "gamification_rewards"."id" = 1  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:29:02.706278"], ["points", 1], ["updated_at", "2014-03-18 23:29:02.706278"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:29:02.706278"], ["points", 1], ["updated_at", "2014-03-18 23:29:02.706278"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:29:02.706278"], ["points", 1], ["updated_at", "2014-03-18 23:29:02.706278"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:29:02.706278"], ["updated_at", "2014-03-18 23:29:02.706278"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:29:02.706278"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:29:02.706278"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:29:02.706278"], ["goal_id", 2], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:29:02.706278"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 3) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:29:02.706278"], ["goal_id", 3], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:29:02.706278"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:29:02.706278"], ["points", 1], ["updated_at", "2014-03-18 23:29:02.706278"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:29:02.706278"], ["updated_at", "2014-03-18 23:29:02.706278"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:29:02.706278"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:29:02.706278"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:29:02.706278"], ["points", 1], ["updated_at", "2014-03-18 23:29:02.706278"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:29:02.706278"], ["updated_at", "2014-03-18 23:29:02.706278"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:29:02.706278"], ["points", 1], ["updated_at", "2014-03-18 23:29:02.706278"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:29:02.706278"], ["updated_at", "2014-03-18 23:29:02.706278"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:29:02.706278"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:29:02.706278"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:29:02.706278"], ["points", 1], ["updated_at", "2014-03-18 23:29:02.706278"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:29:02.706278"], ["updated_at", "2014-03-18 23:29:02.706278"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:29:02.706278"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:29:02.706278"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:29:02.706278"], ["points", 1], ["updated_at", "2014-03-18 23:29:02.706278"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:29:02.706278"], ["points", 1], ["updated_at", "2014-03-18 23:29:02.706278"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:29:02.706278"], ["updated_at", "2014-03-18 23:29:02.706278"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:29:02.706278"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:29:02.706278"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:29:02.706278"], ["points", 1], ["updated_at", "2014-03-18 23:29:02.706278"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:29:02.706278"], ["points", 1], ["updated_at", "2014-03-18 23:29:02.706278"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:29:02.706278"], ["updated_at", "2014-03-18 23:29:02.706278"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:29:02.706278"], ["updated_at", "2014-03-18 23:29:02.706278"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:29:02.706278"], ["description", "Non ab dolor quisquam earum nostrum."], ["image", nil], ["name", "nobis"], ["updated_at", "2014-03-18 23:29:02.706278"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:29:02.706278"], ["points", 1], ["updated_at", "2014-03-18 23:29:02.706278"]] SQL (0.0ms) UPDATE "gamification_medals" SET "goal_id" = ? WHERE "gamification_medals"."id" = 1 [["goal_id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:29:02.706278"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:29:02.706278"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:29:02.706278"], ["updated_at", "2014-03-18 23:29:02.706278"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:29:02.706278"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 23:29:02.706278"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:29:02.706278"], ["updated_at", "2014-03-18 23:29:02.706278"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:29:02.706278"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:29:02.706278"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:29:02.706278"], ["updated_at", "2014-03-18 23:29:02.706278"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:29:02.706278"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 23:29:02.706278"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:29:02.706278"], ["updated_at", "2014-03-18 23:29:02.706278"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:29:02.706278"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:29:02.706278"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:29:02.706278"], ["points", 1], ["updated_at", "2014-03-18 23:29:02.706278"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:29:02.706278"], ["updated_at", "2014-03-18 23:29:02.706278"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:29:02.706278"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:29:02.706278"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:29:02.706278"], ["points", 1], ["updated_at", "2014-03-18 23:29:02.706278"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:29:02.706278"], ["updated_at", "2014-03-18 23:29:02.706278"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:29:02.706278"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:29:02.706278"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:29:02.706278"], ["points", 100], ["updated_at", "2014-03-18 23:29:02.706278"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:29:02.706278"], ["goal_id", 1], ["updated_at", "2014-03-18 23:29:02.706278"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:29:02.706278"], ["description", "Non ab dolor quisquam earum nostrum."], ["goal_id", 1], ["image", nil], ["name", "nobis"], ["updated_at", "2014-03-18 23:29:02.706278"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:29:02.706278"], ["points", 100], ["updated_at", "2014-03-18 23:29:02.706278"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:29:02.706278"], ["goal_id", 1], ["updated_at", "2014-03-18 23:29:02.706278"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:29:02.706278"], ["description", "Non ab dolor quisquam earum nostrum."], ["goal_id", 1], ["image", nil], ["name", "nobis"], ["updated_at", "2014-03-18 23:29:02.706278"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:29:02.706278"], ["points", 100], ["updated_at", "2014-03-18 23:29:02.706278"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:29:02.706278"], ["goal_id", 1], ["updated_at", "2014-03-18 23:29:02.706278"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:29:02.706278"], ["description", "Non ab dolor quisquam earum nostrum."], ["goal_id", 1], ["image", nil], ["name", "nobis"], ["updated_at", "2014-03-18 23:29:02.706278"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (0.0ms)  (0.0ms) rollback transaction  (0.3ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:29:14.007183"], ["updated_at", "2014-03-18 23:29:14.007183"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:29:14.022084"], ["description", "Numquam ea recusandae ex architecto."], ["image", nil], ["name", "nulla"], ["updated_at", "2014-03-18 23:29:14.022084"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:29:14.032821"], ["points", 1], ["updated_at", "2014-03-18 23:29:14.032821"]] SQL (0.1ms) UPDATE "gamification_medals" SET "goal_id" = ?, "updated_at" = ? WHERE "gamification_medals"."id" = 1 [["goal_id", 1], ["updated_at", "2014-03-18 23:29:14.034053"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.2ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:29:14.049616"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:29:14.049616"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]]  (2.0ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:29:14.061546"], ["seen_at", "2014-03-16 23:29:14.061546"], ["updated_at", "2014-03-18 23:29:14.061546"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE ("gamification_rewards"."seen_at" IS NOT NULL)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:29:14.061546"], ["seen_at", "2014-03-16 23:29:14.061546"], ["updated_at", "2014-03-18 23:29:14.061546"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:29:14.061546"], ["updated_at", "2014-03-18 23:29:14.061546"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:29:14.061546"], ["updated_at", "2014-03-18 23:29:14.061546"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."seen_at" IS NULL  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:29:14.061546"], ["updated_at", "2014-03-18 23:29:14.061546"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-03-18 23:29:14.061546"], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:29:14.061546"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:29:14.061546"], ["updated_at", "2014-03-18 23:29:14.061546"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ArticlesController#show as HTML Parameters: {"id"=>"1"} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Completed 200 OK in 0ms (Views: 0.0ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:29:14.061546"], ["updated_at", "2014-03-18 23:29:14.061546"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:29:14.061546"], ["updated_at", "2014-03-18 23:29:14.061546"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:29:14.061546"], ["points", 100], ["updated_at", "2014-03-18 23:29:14.061546"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:29:14.061546"], ["goal_id", 1], ["updated_at", "2014-03-18 23:29:14.061546"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:29:14.061546"], ["description", "Numquam ea recusandae ex architecto."], ["goal_id", 1], ["image", nil], ["name", "nulla"], ["updated_at", "2014-03-18 23:29:14.061546"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:29:14.061546"], ["points", 100], ["updated_at", "2014-03-18 23:29:14.061546"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:29:14.061546"], ["goal_id", 1], ["updated_at", "2014-03-18 23:29:14.061546"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:29:14.061546"], ["description", "Numquam ea recusandae ex architecto."], ["goal_id", 1], ["image", nil], ["name", "nulla"], ["updated_at", "2014-03-18 23:29:14.061546"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:29:14.061546"], ["points", 100], ["updated_at", "2014-03-18 23:29:14.061546"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:29:14.061546"], ["goal_id", 1], ["updated_at", "2014-03-18 23:29:14.061546"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:29:14.061546"], ["description", "Numquam ea recusandae ex architecto."], ["goal_id", 1], ["image", nil], ["name", "nulla"], ["updated_at", "2014-03-18 23:29:14.061546"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:29:14.061546"], ["points", 1], ["updated_at", "2014-03-18 23:29:14.061546"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:29:14.061546"], ["updated_at", "2014-03-18 23:29:14.061546"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:29:14.061546"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:29:14.061546"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:29:14.061546"], ["points", 1], ["updated_at", "2014-03-18 23:29:14.061546"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:29:14.061546"], ["updated_at", "2014-03-18 23:29:14.061546"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:29:14.061546"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:29:14.061546"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:29:14.061546"], ["updated_at", "2014-03-18 23:29:14.061546"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:29:14.061546"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 23:29:14.061546"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:29:14.061546"], ["updated_at", "2014-03-18 23:29:14.061546"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:29:14.061546"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:29:14.061546"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:29:14.061546"], ["updated_at", "2014-03-18 23:29:14.061546"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:29:14.061546"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 23:29:14.061546"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:29:14.061546"], ["updated_at", "2014-03-18 23:29:14.061546"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:29:14.061546"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:29:14.061546"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:29:14.061546"], ["points", 1], ["updated_at", "2014-03-18 23:29:14.061546"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:29:14.061546"], ["points", 1], ["updated_at", "2014-03-18 23:29:14.061546"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:29:14.061546"], ["updated_at", "2014-03-18 23:29:14.061546"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:29:14.061546"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:29:14.061546"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:29:14.061546"], ["points", 1], ["updated_at", "2014-03-18 23:29:14.061546"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:29:14.061546"], ["points", 1], ["updated_at", "2014-03-18 23:29:14.061546"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:29:14.061546"], ["points", 1], ["updated_at", "2014-03-18 23:29:14.061546"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:29:14.061546"], ["updated_at", "2014-03-18 23:29:14.061546"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:29:14.061546"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:29:14.061546"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:29:14.061546"], ["goal_id", 2], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:29:14.061546"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 3) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:29:14.061546"], ["goal_id", 3], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:29:14.061546"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:29:14.061546"], ["points", 1], ["updated_at", "2014-03-18 23:29:14.061546"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:29:14.061546"], ["updated_at", "2014-03-18 23:29:14.061546"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:29:14.061546"], ["points", 1], ["updated_at", "2014-03-18 23:29:14.061546"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:29:14.061546"], ["updated_at", "2014-03-18 23:29:14.061546"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:29:14.061546"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:29:14.061546"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:29:14.061546"], ["points", 1], ["updated_at", "2014-03-18 23:29:14.061546"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:29:14.061546"], ["points", 1], ["updated_at", "2014-03-18 23:29:14.061546"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:29:14.061546"], ["updated_at", "2014-03-18 23:29:14.061546"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:29:14.061546"], ["points", 1], ["updated_at", "2014-03-18 23:29:14.061546"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:29:14.061546"], ["updated_at", "2014-03-18 23:29:14.061546"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:29:14.061546"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:29:14.061546"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:29:14.061546"], ["points", 1], ["updated_at", "2014-03-18 23:29:14.061546"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:29:14.061546"], ["updated_at", "2014-03-18 23:29:14.061546"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:29:14.061546"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:29:14.061546"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.3ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:29:30.555001"], ["updated_at", "2014-03-18 23:29:30.555001"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:29:30.560978"], ["updated_at", "2014-03-18 23:29:30.560978"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (2.0ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:29:30.573162"], ["updated_at", "2014-03-18 23:29:30.573162"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.5ms) INSERT INTO "gamification_rewards" ("created_at", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-03-18 23:29:30.594595"], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:29:30.594595"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "gamification_rewards" SET "updated_at" = '2014-03-18 23:29:30.611805', "seen_at" = '2014-03-18 23:29:30.611805' WHERE "gamification_rewards"."id" = 1  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:29:30.615988"], ["updated_at", "2014-03-18 23:29:30.615988"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:29:30.622337"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 23:29:30.622337"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:29:30.624046"], ["updated_at", "2014-03-18 23:29:30.624046"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.2ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:29:30.672863"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:29:30.672863"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 12ms (ActiveRecord: 1.2ms)  (0.1ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.8ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:29:30.678876"], ["updated_at", "2014-03-18 23:29:30.678876"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:29:30.680874"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 23:29:30.680874"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:29:30.682296"], ["updated_at", "2014-03-18 23:29:30.682296"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:29:30.689215"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:29:30.689215"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 6ms (ActiveRecord: 0.5ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:29:30.693533"], ["points", 1], ["updated_at", "2014-03-18 23:29:30.693533"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:29:30.695008"], ["updated_at", "2014-03-18 23:29:30.695008"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:29:30.702014"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:29:30.702014"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 6ms (ActiveRecord: 0.5ms)  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:29:30.706447"], ["points", 1], ["updated_at", "2014-03-18 23:29:30.706447"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:29:30.707990"], ["updated_at", "2014-03-18 23:29:30.707990"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:29:30.714870"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:29:30.714870"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 6ms (ActiveRecord: 0.6ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:29:30.720253"], ["points", 100], ["updated_at", "2014-03-18 23:29:30.720253"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:29:30.722804"], ["goal_id", 1], ["updated_at", "2014-03-18 23:29:30.722804"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:29:30.732110"], ["description", "Id tempore modi et pariatur distinctio omnis."], ["goal_id", 1], ["image", nil], ["name", "eum"], ["updated_at", "2014-03-18 23:29:30.732110"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.2ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (5.4ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:29:30.749976"], ["points", 100], ["updated_at", "2014-03-18 23:29:30.749976"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:29:30.752589"], ["goal_id", 1], ["updated_at", "2014-03-18 23:29:30.752589"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:29:30.754726"], ["description", "Id tempore modi et pariatur distinctio omnis."], ["goal_id", 1], ["image", nil], ["name", "eum"], ["updated_at", "2014-03-18 23:29:30.754726"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (1.9ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:29:30.765373"], ["points", 100], ["updated_at", "2014-03-18 23:29:30.765373"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:29:30.767960"], ["goal_id", 1], ["updated_at", "2014-03-18 23:29:30.767960"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:29:30.769879"], ["description", "Id tempore modi et pariatur distinctio omnis."], ["goal_id", 1], ["image", nil], ["name", "eum"], ["updated_at", "2014-03-18 23:29:30.769879"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (1.6ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:29:30.779413"], ["updated_at", "2014-03-18 23:29:30.779413"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "gamification_medals" ("created_at", "description", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:29:30.781935"], ["description", "Id tempore modi et pariatur distinctio omnis."], ["image", nil], ["name", "eum"], ["updated_at", "2014-03-18 23:29:30.781935"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:29:30.784542"], ["points", 1], ["updated_at", "2014-03-18 23:29:30.784542"]] SQL (0.3ms) UPDATE "gamification_medals" SET "goal_id" = ?, "updated_at" = ? WHERE "gamification_medals"."id" = 1 [["goal_id", 1], ["updated_at", "2014-03-18 23:29:30.785816"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:29:30.790010"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:29:30.790010"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.2ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]]  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:29:30.797540"], ["updated_at", "2014-03-18 23:29:30.797540"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.2ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:29:30.802522"], ["seen_at", "2014-03-16 23:29:30.800106"], ["updated_at", "2014-03-18 23:29:30.802522"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:29:30.805100"], ["updated_at", "2014-03-18 23:29:30.805100"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."seen_at" IS NULL  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:29:30.805100"], ["seen_at", "2014-03-16 23:29:30.805100"], ["updated_at", "2014-03-18 23:29:30.805100"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE ("gamification_rewards"."seen_at" IS NOT NULL)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:29:30.805100"], ["points", 1], ["updated_at", "2014-03-18 23:29:30.805100"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:29:30.805100"], ["points", 1], ["updated_at", "2014-03-18 23:29:30.805100"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:29:30.805100"], ["updated_at", "2014-03-18 23:29:30.805100"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:29:30.805100"], ["points", 1], ["updated_at", "2014-03-18 23:29:30.805100"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:29:30.805100"], ["points", 1], ["updated_at", "2014-03-18 23:29:30.805100"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:29:30.805100"], ["updated_at", "2014-03-18 23:29:30.805100"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:29:30.805100"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:29:30.805100"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:29:30.805100"], ["points", 1], ["updated_at", "2014-03-18 23:29:30.805100"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:29:30.805100"], ["points", 1], ["updated_at", "2014-03-18 23:29:30.805100"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:29:30.805100"], ["points", 1], ["updated_at", "2014-03-18 23:29:30.805100"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:29:30.805100"], ["updated_at", "2014-03-18 23:29:30.805100"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:29:30.805100"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:29:30.805100"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:29:30.805100"], ["goal_id", 2], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:29:30.805100"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 3) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:29:30.805100"], ["goal_id", 3], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:29:30.805100"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:29:30.805100"], ["points", 1], ["updated_at", "2014-03-18 23:29:30.805100"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:29:30.805100"], ["updated_at", "2014-03-18 23:29:30.805100"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:29:30.805100"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:29:30.805100"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:29:30.805100"], ["points", 1], ["updated_at", "2014-03-18 23:29:30.805100"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:29:30.805100"], ["updated_at", "2014-03-18 23:29:30.805100"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:29:30.805100"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:29:30.805100"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:29:30.805100"], ["points", 1], ["updated_at", "2014-03-18 23:29:30.805100"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:29:30.805100"], ["updated_at", "2014-03-18 23:29:30.805100"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:29:30.805100"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:29:30.805100"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:29:30.805100"], ["points", 1], ["updated_at", "2014-03-18 23:29:30.805100"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:29:30.805100"], ["updated_at", "2014-03-18 23:29:30.805100"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:29:30.805100"], ["updated_at", "2014-03-18 23:29:30.805100"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ArticlesController#show as HTML Parameters: {"id"=>"1"} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Completed 200 OK in 0ms (Views: 0.0ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.3ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:30:13.607619"], ["updated_at", "2014-03-18 23:30:13.607619"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:30:13.620665"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 23:30:13.620665"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:30:13.624253"], ["updated_at", "2014-03-18 23:30:13.624253"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:30:13.659507"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:30:13.659507"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 31ms (ActiveRecord: 1.3ms)  (0.1ms) SELECT COUNT(*) FROM "gamification_rewards"  (1.8ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:30:13.666762"], ["updated_at", "2014-03-18 23:30:13.666762"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:30:13.668905"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-18 23:30:13.668905"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:30:13.670766"], ["updated_at", "2014-03-18 23:30:13.670766"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (34.6ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:30:13.713026"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:30:13.713026"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 41ms (ActiveRecord: 35.2ms)  (0.7ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:30:13.717775"], ["points", 1], ["updated_at", "2014-03-18 23:30:13.717775"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:30:13.719606"], ["updated_at", "2014-03-18 23:30:13.719606"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:30:13.726682"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:30:13.726682"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 6ms (ActiveRecord: 0.6ms)  (0.1ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:30:13.731692"], ["points", 1], ["updated_at", "2014-03-18 23:30:13.731692"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:30:13.733600"], ["updated_at", "2014-03-18 23:30:13.733600"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:30:13.740001"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:30:13.740001"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 5ms (ActiveRecord: 0.4ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:30:13.744722"], ["updated_at", "2014-03-18 23:30:13.744722"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:30:13.746169"], ["updated_at", "2014-03-18 23:30:13.746169"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:30:13.754647"], ["updated_at", "2014-03-18 23:30:13.754647"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:30:13.758977"], ["seen_at", "2014-03-16 23:30:13.757250"], ["updated_at", "2014-03-18 23:30:13.758977"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:30:13.762895"], ["updated_at", "2014-03-18 23:30:13.762895"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."seen_at" IS NULL  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:30:13.765299"], ["seen_at", "2014-03-16 23:30:13.765299"], ["updated_at", "2014-03-18 23:30:13.765299"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE ("gamification_rewards"."seen_at" IS NOT NULL)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:30:13.765299"], ["updated_at", "2014-03-18 23:30:13.765299"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:30:13.765299"], ["description", "Quam illo facere minima aut quae et repudiandae."], ["image", nil], ["name", "vero"], ["updated_at", "2014-03-18 23:30:13.765299"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:30:13.765299"], ["points", 1], ["updated_at", "2014-03-18 23:30:13.765299"]] SQL (0.0ms) UPDATE "gamification_medals" SET "goal_id" = ? WHERE "gamification_medals"."id" = 1 [["goal_id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:30:13.765299"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:30:13.765299"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:30:13.765299"], ["updated_at", "2014-03-18 23:30:13.765299"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ArticlesController#show as HTML Parameters: {"id"=>"1"} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Completed 200 OK in 0ms (Views: 0.0ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:30:13.765299"], ["updated_at", "2014-03-18 23:30:13.765299"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-03-18 23:30:13.765299"], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:30:13.765299"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "gamification_rewards" SET "updated_at" = '2014-03-18 23:30:13.765299', "seen_at" = '2014-03-18 23:30:13.765299' WHERE "gamification_rewards"."id" = 1  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:30:13.765299"], ["points", 100], ["updated_at", "2014-03-18 23:30:13.765299"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:30:13.765299"], ["goal_id", 1], ["updated_at", "2014-03-18 23:30:13.765299"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:30:13.765299"], ["description", "Quam illo facere minima aut quae et repudiandae."], ["goal_id", 1], ["image", nil], ["name", "vero"], ["updated_at", "2014-03-18 23:30:13.765299"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:30:13.765299"], ["points", 100], ["updated_at", "2014-03-18 23:30:13.765299"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:30:13.765299"], ["goal_id", 1], ["updated_at", "2014-03-18 23:30:13.765299"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:30:13.765299"], ["description", "Quam illo facere minima aut quae et repudiandae."], ["goal_id", 1], ["image", nil], ["name", "vero"], ["updated_at", "2014-03-18 23:30:13.765299"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:30:13.765299"], ["points", 100], ["updated_at", "2014-03-18 23:30:13.765299"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:30:13.765299"], ["goal_id", 1], ["updated_at", "2014-03-18 23:30:13.765299"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:30:13.765299"], ["description", "Quam illo facere minima aut quae et repudiandae."], ["goal_id", 1], ["image", nil], ["name", "vero"], ["updated_at", "2014-03-18 23:30:13.765299"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:30:13.765299"], ["points", 1], ["updated_at", "2014-03-18 23:30:13.765299"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:30:13.765299"], ["points", 1], ["updated_at", "2014-03-18 23:30:13.765299"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:30:13.765299"], ["updated_at", "2014-03-18 23:30:13.765299"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:30:13.765299"], ["points", 1], ["updated_at", "2014-03-18 23:30:13.765299"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:30:13.765299"], ["updated_at", "2014-03-18 23:30:13.765299"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:30:13.765299"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:30:13.765299"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:30:13.765299"], ["points", 1], ["updated_at", "2014-03-18 23:30:13.765299"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:30:13.765299"], ["updated_at", "2014-03-18 23:30:13.765299"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:30:13.765299"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:30:13.765299"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:30:13.765299"], ["points", 1], ["updated_at", "2014-03-18 23:30:13.765299"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:30:13.765299"], ["points", 1], ["updated_at", "2014-03-18 23:30:13.765299"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:30:13.765299"], ["updated_at", "2014-03-18 23:30:13.765299"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:30:13.765299"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:30:13.765299"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:30:13.765299"], ["points", 1], ["updated_at", "2014-03-18 23:30:13.765299"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:30:13.765299"], ["updated_at", "2014-03-18 23:30:13.765299"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:30:13.765299"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:30:13.765299"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:30:13.765299"], ["points", 1], ["updated_at", "2014-03-18 23:30:13.765299"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:30:13.765299"], ["updated_at", "2014-03-18 23:30:13.765299"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:30:13.765299"], ["points", 1], ["updated_at", "2014-03-18 23:30:13.765299"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:30:13.765299"], ["points", 1], ["updated_at", "2014-03-18 23:30:13.765299"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-18 23:30:13.765299"], ["points", 1], ["updated_at", "2014-03-18 23:30:13.765299"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-18 23:30:13.765299"], ["updated_at", "2014-03-18 23:30:13.765299"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:30:13.765299"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:30:13.765299"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:30:13.765299"], ["goal_id", 2], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:30:13.765299"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 3) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-18 23:30:13.765299"], ["goal_id", 3], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-18 23:30:13.765299"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.3ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-19 15:01:21.663958"], ["updated_at", "2014-03-19 15:01:21.663958"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (1.0ms) INSERT INTO "gamification_rewards" ("created_at", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-03-19 15:01:21.693113"], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-19 15:01:21.693113"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "gamification_rewards" SET "updated_at" = '2014-03-19 15:01:21.713255', "seen_at" = '2014-03-19 15:01:21.713255' WHERE "gamification_rewards"."id" = 1  (30.7ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-19 15:01:21.752751"], ["points", 1], ["updated_at", "2014-03-19 15:01:21.752751"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-19 15:01:21.754349"], ["updated_at", "2014-03-19 15:01:21.754349"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-19 15:01:21.756654"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-19 15:01:21.756654"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-19 15:01:21.761912"], ["points", 1], ["updated_at", "2014-03-19 15:01:21.761912"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-19 15:01:21.763218"], ["updated_at", "2014-03-19 15:01:21.763218"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-19 15:01:21.766721"], ["points", 1], ["updated_at", "2014-03-19 15:01:21.766721"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-19 15:01:21.768028"], ["updated_at", "2014-03-19 15:01:21.768028"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-19 15:01:21.770450"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-19 15:01:21.770450"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-19 15:01:21.774208"], ["points", 1], ["updated_at", "2014-03-19 15:01:21.774208"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-19 15:01:21.775533"], ["updated_at", "2014-03-19 15:01:21.775533"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-19 15:01:21.777667"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-19 15:01:21.777667"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.7ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-19 15:01:21.784124"], ["points", 1], ["updated_at", "2014-03-19 15:01:21.784124"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-19 15:01:21.785623"], ["points", 1], ["updated_at", "2014-03-19 15:01:21.785623"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-19 15:01:21.786812"], ["updated_at", "2014-03-19 15:01:21.786812"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-19 15:01:21.789248"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-19 15:01:21.789248"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-19 15:01:21.794043"], ["points", 1], ["updated_at", "2014-03-19 15:01:21.794043"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-19 15:01:21.795410"], ["points", 1], ["updated_at", "2014-03-19 15:01:21.795410"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-19 15:01:21.796702"], ["points", 1], ["updated_at", "2014-03-19 15:01:21.796702"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-19 15:01:21.797652"], ["updated_at", "2014-03-19 15:01:21.797652"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-19 15:01:21.799717"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-19 15:01:21.799717"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-19 15:01:21.803986"], ["goal_id", 2], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-19 15:01:21.803986"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 3) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-19 15:01:21.806130"], ["goal_id", 3], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-19 15:01:21.806130"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-19 15:01:21.809008"], ["points", 1], ["updated_at", "2014-03-19 15:01:21.809008"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-19 15:01:21.810301"], ["points", 1], ["updated_at", "2014-03-19 15:01:21.810301"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-19 15:01:21.811430"], ["updated_at", "2014-03-19 15:01:21.811430"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-19 15:01:21.819053"], ["seen_at", "2014-03-17 15:01:21.815904"], ["updated_at", "2014-03-19 15:01:21.819053"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE ("gamification_rewards"."seen_at" IS NOT NULL)  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-19 15:01:21.823654"], ["updated_at", "2014-03-19 15:01:21.823654"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."seen_at" IS NULL  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-19 15:01:21.826216"], ["updated_at", "2014-03-19 15:01:21.826216"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-19 15:01:21.826216"], ["seen_at", "2014-03-17 15:01:21.826216"], ["updated_at", "2014-03-19 15:01:21.826216"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-19 15:01:21.826216"], ["updated_at", "2014-03-19 15:01:21.826216"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-19 15:01:21.826216"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-19 15:01:21.826216"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-19 15:01:21.826216"], ["updated_at", "2014-03-19 15:01:21.826216"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-19 15:01:21.826216"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-19 15:01:21.826216"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-19 15:01:21.826216"], ["updated_at", "2014-03-19 15:01:21.826216"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-19 15:01:21.826216"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-19 15:01:21.826216"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-19 15:01:21.826216"], ["updated_at", "2014-03-19 15:01:21.826216"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-19 15:01:21.826216"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-19 15:01:21.826216"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-19 15:01:21.826216"], ["points", 1], ["updated_at", "2014-03-19 15:01:21.826216"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-19 15:01:21.826216"], ["updated_at", "2014-03-19 15:01:21.826216"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-19 15:01:21.826216"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-19 15:01:21.826216"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-19 15:01:21.826216"], ["points", 1], ["updated_at", "2014-03-19 15:01:21.826216"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-19 15:01:21.826216"], ["updated_at", "2014-03-19 15:01:21.826216"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-19 15:01:21.826216"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-19 15:01:21.826216"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-19 15:01:21.826216"], ["updated_at", "2014-03-19 15:01:21.826216"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ArticlesController#show as HTML Parameters: {"id"=>"1"} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Completed 200 OK in 0ms (Views: 0.0ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-19 15:01:21.826216"], ["updated_at", "2014-03-19 15:01:21.826216"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-19 15:01:21.826216"], ["description", "Voluptatum aut sit facilis repellendus."], ["image", nil], ["name", "labore"], ["updated_at", "2014-03-19 15:01:21.826216"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-19 15:01:21.826216"], ["points", 1], ["updated_at", "2014-03-19 15:01:21.826216"]] SQL (0.0ms) UPDATE "gamification_medals" SET "goal_id" = ? WHERE "gamification_medals"."id" = 1 [["goal_id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-19 15:01:21.826216"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-19 15:01:21.826216"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-19 15:01:21.826216"], ["points", 100], ["updated_at", "2014-03-19 15:01:21.826216"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-19 15:01:21.826216"], ["goal_id", 1], ["updated_at", "2014-03-19 15:01:21.826216"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-19 15:01:21.826216"], ["description", "Voluptatum aut sit facilis repellendus."], ["goal_id", 1], ["image", nil], ["name", "labore"], ["updated_at", "2014-03-19 15:01:21.826216"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-19 15:01:21.826216"], ["points", 100], ["updated_at", "2014-03-19 15:01:21.826216"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-19 15:01:21.826216"], ["goal_id", 1], ["updated_at", "2014-03-19 15:01:21.826216"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-19 15:01:21.826216"], ["description", "Voluptatum aut sit facilis repellendus."], ["goal_id", 1], ["image", nil], ["name", "labore"], ["updated_at", "2014-03-19 15:01:21.826216"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-19 15:01:21.826216"], ["points", 100], ["updated_at", "2014-03-19 15:01:21.826216"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-19 15:01:21.826216"], ["goal_id", 1], ["updated_at", "2014-03-19 15:01:21.826216"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-19 15:01:21.826216"], ["description", "Voluptatum aut sit facilis repellendus."], ["goal_id", 1], ["image", nil], ["name", "labore"], ["updated_at", "2014-03-19 15:01:21.826216"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-19 15:01:21.826216"], ["updated_at", "2014-03-19 15:01:21.826216"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-19 15:01:21.826216"], ["updated_at", "2014-03-19 15:01:21.826216"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.3ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-19 15:11:46.680653"], ["points", 1], ["updated_at", "2014-03-19 15:11:46.680653"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-19 15:11:46.684149"], ["points", 1], ["updated_at", "2014-03-19 15:11:46.684149"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-19 15:11:46.687097"], ["updated_at", "2014-03-19 15:11:46.687097"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-19 15:11:46.705235"], ["points", 1], ["updated_at", "2014-03-19 15:11:46.705235"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-19 15:11:46.706749"], ["updated_at", "2014-03-19 15:11:46.706749"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-19 15:11:46.751605"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-19 15:11:46.751605"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-19 15:11:46.757263"], ["points", 1], ["updated_at", "2014-03-19 15:11:46.757263"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-19 15:11:46.758730"], ["updated_at", "2014-03-19 15:11:46.758730"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-19 15:11:46.761284"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-19 15:11:46.761284"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-19 15:11:46.764649"], ["points", 1], ["updated_at", "2014-03-19 15:11:46.764649"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-19 15:11:46.766081"], ["points", 1], ["updated_at", "2014-03-19 15:11:46.766081"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-19 15:11:46.767239"], ["points", 1], ["updated_at", "2014-03-19 15:11:46.767239"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-19 15:11:46.768214"], ["updated_at", "2014-03-19 15:11:46.768214"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-19 15:11:46.770281"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-19 15:11:46.770281"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-19 15:11:46.773844"], ["goal_id", 2], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-19 15:11:46.773844"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 3) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-19 15:11:46.776032"], ["goal_id", 3], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-19 15:11:46.776032"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-19 15:11:46.779020"], ["points", 1], ["updated_at", "2014-03-19 15:11:46.779020"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-19 15:11:46.780432"], ["updated_at", "2014-03-19 15:11:46.780432"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-19 15:11:46.783947"], ["points", 1], ["updated_at", "2014-03-19 15:11:46.783947"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-19 15:11:46.785271"], ["updated_at", "2014-03-19 15:11:46.785271"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-19 15:11:46.787498"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-19 15:11:46.787498"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-19 15:11:46.792907"], ["points", 1], ["updated_at", "2014-03-19 15:11:46.792907"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-19 15:11:46.794445"], ["points", 1], ["updated_at", "2014-03-19 15:11:46.794445"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-19 15:11:46.795709"], ["updated_at", "2014-03-19 15:11:46.795709"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-19 15:11:46.798139"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-19 15:11:46.798139"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-19 15:11:46.803042"], ["updated_at", "2014-03-19 15:11:46.803042"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "gamification_medals" ("created_at", "description", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-19 15:11:46.813591"], ["description", "Tenetur vitae aut harum ut assumenda possimus sunt."], ["image", nil], ["name", "aperiam"], ["updated_at", "2014-03-19 15:11:46.813591"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-19 15:11:46.817960"], ["points", 1], ["updated_at", "2014-03-19 15:11:46.817960"]] SQL (0.1ms) UPDATE "gamification_medals" SET "goal_id" = ?, "updated_at" = ? WHERE "gamification_medals"."id" = 1 [["goal_id", 1], ["updated_at", "2014-03-19 15:11:46.818766"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-19 15:11:46.821652"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-19 15:11:46.821652"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.2ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Goal Load (0.2ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-19 15:11:46.831022"], ["updated_at", "2014-03-19 15:11:46.831022"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.4ms) INSERT INTO "gamification_rewards" ("created_at", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-03-19 15:11:46.834757"], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-19 15:11:46.834757"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "gamification_rewards" SET "updated_at" = '2014-03-19 15:11:46.840635', "seen_at" = '2014-03-19 15:11:46.840635' WHERE "gamification_rewards"."id" = 1  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-19 15:11:46.845627"], ["seen_at", "2014-03-17 15:11:46.843855"], ["updated_at", "2014-03-19 15:11:46.845627"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-19 15:11:46.849043"], ["updated_at", "2014-03-19 15:11:46.849043"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-19 15:11:46.852463"], ["updated_at", "2014-03-19 15:11:46.852463"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."seen_at" IS NULL  (0.3ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-19 15:11:46.854974"], ["seen_at", "2014-03-17 15:11:46.854974"], ["updated_at", "2014-03-19 15:11:46.854974"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE ("gamification_rewards"."seen_at" IS NOT NULL)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-19 15:11:46.854974"], ["updated_at", "2014-03-19 15:11:46.854974"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ArticlesController#show as HTML Parameters: {"id"=>"1"} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Completed 200 OK in 0ms (Views: 0.0ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-19 15:11:46.854974"], ["updated_at", "2014-03-19 15:11:46.854974"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-19 15:11:46.854974"], ["updated_at", "2014-03-19 15:11:46.854974"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-19 15:11:46.854974"], ["points", 100], ["updated_at", "2014-03-19 15:11:46.854974"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-19 15:11:46.854974"], ["goal_id", 1], ["updated_at", "2014-03-19 15:11:46.854974"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-19 15:11:46.854974"], ["description", "Tenetur vitae aut harum ut assumenda possimus sunt."], ["goal_id", 1], ["image", nil], ["name", "aperiam"], ["updated_at", "2014-03-19 15:11:46.854974"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-19 15:11:46.854974"], ["points", 100], ["updated_at", "2014-03-19 15:11:46.854974"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-19 15:11:46.854974"], ["goal_id", 1], ["updated_at", "2014-03-19 15:11:46.854974"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-19 15:11:46.854974"], ["description", "Tenetur vitae aut harum ut assumenda possimus sunt."], ["goal_id", 1], ["image", nil], ["name", "aperiam"], ["updated_at", "2014-03-19 15:11:46.854974"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-19 15:11:46.854974"], ["points", 100], ["updated_at", "2014-03-19 15:11:46.854974"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-19 15:11:46.854974"], ["goal_id", 1], ["updated_at", "2014-03-19 15:11:46.854974"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-19 15:11:46.854974"], ["description", "Tenetur vitae aut harum ut assumenda possimus sunt."], ["goal_id", 1], ["image", nil], ["name", "aperiam"], ["updated_at", "2014-03-19 15:11:46.854974"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-19 15:11:46.854974"], ["points", 1], ["updated_at", "2014-03-19 15:11:46.854974"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-19 15:11:46.854974"], ["updated_at", "2014-03-19 15:11:46.854974"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-19 15:11:46.854974"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-19 15:11:46.854974"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-19 15:11:46.854974"], ["points", 1], ["updated_at", "2014-03-19 15:11:46.854974"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-19 15:11:46.854974"], ["updated_at", "2014-03-19 15:11:46.854974"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-19 15:11:46.854974"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-19 15:11:46.854974"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-19 15:11:46.854974"], ["updated_at", "2014-03-19 15:11:46.854974"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-19 15:11:46.854974"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-19 15:11:46.854974"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-19 15:11:46.854974"], ["updated_at", "2014-03-19 15:11:46.854974"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-19 15:11:46.854974"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-19 15:11:46.854974"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-19 15:11:46.854974"], ["updated_at", "2014-03-19 15:11:46.854974"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-19 15:11:46.854974"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-19 15:11:46.854974"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-19 15:11:46.854974"], ["updated_at", "2014-03-19 15:11:46.854974"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-19 15:11:46.854974"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-19 15:11:46.854974"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.0ms) rollback transaction  (0.4ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 12:16:38.760478"], ["updated_at", "2014-03-23 12:16:38.760478"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.9ms) INSERT INTO "gamification_rewards" ("created_at", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-03-23 12:16:38.822670"], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 12:16:38.822670"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "gamification_rewards" SET "updated_at" = '2014-03-23 12:16:38.841540', "seen_at" = '2014-03-23 12:16:38.841540' WHERE "gamification_rewards"."id" = 1  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.8ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 12:16:38.846649"], ["updated_at", "2014-03-23 12:16:38.846649"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.2ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.4ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 12:16:38.853428"], ["seen_at", "2014-03-21 12:16:38.848876"], ["updated_at", "2014-03-23 12:16:38.853428"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 12:16:38.856679"], ["seen_at", "2014-03-21 12:16:38.856679"], ["updated_at", "2014-03-23 12:16:38.856679"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE ("gamification_rewards"."seen_at" IS NOT NULL)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 12:16:38.856679"], ["updated_at", "2014-03-23 12:16:38.856679"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."seen_at" IS NULL  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 12:16:38.856679"], ["points", 1], ["updated_at", "2014-03-23 12:16:38.856679"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 12:16:38.856679"], ["points", 1], ["updated_at", "2014-03-23 12:16:38.856679"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 12:16:38.856679"], ["updated_at", "2014-03-23 12:16:38.856679"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 12:16:38.856679"], ["points", 1], ["updated_at", "2014-03-23 12:16:38.856679"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 12:16:38.856679"], ["points", 1], ["updated_at", "2014-03-23 12:16:38.856679"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 12:16:38.856679"], ["points", 1], ["updated_at", "2014-03-23 12:16:38.856679"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 12:16:38.856679"], ["updated_at", "2014-03-23 12:16:38.856679"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 12:16:38.856679"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 12:16:38.856679"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 12:16:38.856679"], ["goal_id", 2], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 12:16:38.856679"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 3) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 12:16:38.856679"], ["goal_id", 3], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 12:16:38.856679"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 12:16:38.856679"], ["points", 1], ["updated_at", "2014-03-23 12:16:38.856679"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 12:16:38.856679"], ["updated_at", "2014-03-23 12:16:38.856679"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 12:16:38.856679"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 12:16:38.856679"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 12:16:38.856679"], ["points", 1], ["updated_at", "2014-03-23 12:16:38.856679"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 12:16:38.856679"], ["updated_at", "2014-03-23 12:16:38.856679"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 12:16:38.856679"], ["points", 1], ["updated_at", "2014-03-23 12:16:38.856679"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 12:16:38.856679"], ["points", 1], ["updated_at", "2014-03-23 12:16:38.856679"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 12:16:38.856679"], ["updated_at", "2014-03-23 12:16:38.856679"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 12:16:38.856679"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 12:16:38.856679"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 12:16:38.856679"], ["points", 1], ["updated_at", "2014-03-23 12:16:38.856679"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 12:16:38.856679"], ["updated_at", "2014-03-23 12:16:38.856679"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 12:16:38.856679"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 12:16:38.856679"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 12:16:38.856679"], ["points", 1], ["updated_at", "2014-03-23 12:16:38.856679"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 12:16:38.856679"], ["updated_at", "2014-03-23 12:16:38.856679"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 12:16:38.856679"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 12:16:38.856679"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 12:16:38.856679"], ["updated_at", "2014-03-23 12:16:38.856679"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 12:16:38.856679"], ["description", "Voluptatem possimus consequuntur asperiores placeat aut laudantium."], ["image", nil], ["name", "voluptatem"], ["updated_at", "2014-03-23 12:16:38.856679"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 12:16:38.856679"], ["points", 1], ["updated_at", "2014-03-23 12:16:38.856679"]] SQL (0.0ms) UPDATE "gamification_medals" SET "goal_id" = ? WHERE "gamification_medals"."id" = 1 [["goal_id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 12:16:38.856679"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 12:16:38.856679"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 12:16:38.856679"], ["updated_at", "2014-03-23 12:16:38.856679"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ArticlesController#show as HTML Parameters: {"id"=>"1"} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Completed 200 OK in 0ms (Views: 0.0ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 12:16:38.856679"], ["updated_at", "2014-03-23 12:16:38.856679"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 12:16:38.856679"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-23 12:16:38.856679"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 12:16:38.856679"], ["updated_at", "2014-03-23 12:16:38.856679"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 12:16:38.856679"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 12:16:38.856679"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 12:16:38.856679"], ["updated_at", "2014-03-23 12:16:38.856679"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 12:16:38.856679"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-23 12:16:38.856679"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 12:16:38.856679"], ["updated_at", "2014-03-23 12:16:38.856679"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 12:16:38.856679"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 12:16:38.856679"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 12:16:38.856679"], ["points", 1], ["updated_at", "2014-03-23 12:16:38.856679"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 12:16:38.856679"], ["updated_at", "2014-03-23 12:16:38.856679"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 12:16:38.856679"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 12:16:38.856679"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 12:16:38.856679"], ["points", 1], ["updated_at", "2014-03-23 12:16:38.856679"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 12:16:38.856679"], ["updated_at", "2014-03-23 12:16:38.856679"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 12:16:38.856679"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 12:16:38.856679"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 12:16:38.856679"], ["points", 100], ["updated_at", "2014-03-23 12:16:38.856679"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 12:16:38.856679"], ["goal_id", 1], ["updated_at", "2014-03-23 12:16:38.856679"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-23 12:16:38.856679"], ["description", "Voluptatem possimus consequuntur asperiores placeat aut laudantium."], ["goal_id", 1], ["image", nil], ["name", "voluptatem"], ["updated_at", "2014-03-23 12:16:38.856679"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 12:16:38.856679"], ["points", 100], ["updated_at", "2014-03-23 12:16:38.856679"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 12:16:38.856679"], ["goal_id", 1], ["updated_at", "2014-03-23 12:16:38.856679"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-23 12:16:38.856679"], ["description", "Voluptatem possimus consequuntur asperiores placeat aut laudantium."], ["goal_id", 1], ["image", nil], ["name", "voluptatem"], ["updated_at", "2014-03-23 12:16:38.856679"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 12:16:38.856679"], ["points", 100], ["updated_at", "2014-03-23 12:16:38.856679"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 12:16:38.856679"], ["goal_id", 1], ["updated_at", "2014-03-23 12:16:38.856679"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-23 12:16:38.856679"], ["description", "Voluptatem possimus consequuntur asperiores placeat aut laudantium."], ["goal_id", 1], ["image", nil], ["name", "voluptatem"], ["updated_at", "2014-03-23 12:16:38.856679"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 12:16:38.856679"], ["updated_at", "2014-03-23 12:16:38.856679"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 12:16:38.856679"], ["updated_at", "2014-03-23 12:16:38.856679"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.3ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 12:44:08.963384"], ["updated_at", "2014-03-23 12:44:08.963384"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 12:44:09.011186"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-23 12:44:09.011186"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 12:44:09.014865"], ["updated_at", "2014-03-23 12:44:09.014865"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 12:44:09.049226"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 12:44:09.049226"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 30ms (ActiveRecord: 1.1ms)  (0.1ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 12:44:09.054306"], ["updated_at", "2014-03-23 12:44:09.054306"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 12:44:09.055973"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-23 12:44:09.055973"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 12:44:09.057370"], ["updated_at", "2014-03-23 12:44:09.057370"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 12:44:09.064686"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 12:44:09.064686"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 7ms (ActiveRecord: 0.6ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 12:44:09.069138"], ["points", 1], ["updated_at", "2014-03-23 12:44:09.069138"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 12:44:09.070584"], ["updated_at", "2014-03-23 12:44:09.070584"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 12:44:09.076559"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 12:44:09.076559"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 5ms (ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 12:44:09.080981"], ["points", 1], ["updated_at", "2014-03-23 12:44:09.080981"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 12:44:09.082424"], ["updated_at", "2014-03-23 12:44:09.082424"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 12:44:09.088399"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 12:44:09.088399"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 5ms (ActiveRecord: 0.6ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 12:44:09.094385"], ["updated_at", "2014-03-23 12:44:09.094385"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 12:44:09.096349"], ["updated_at", "2014-03-23 12:44:09.096349"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 12:44:09.103236"], ["updated_at", "2014-03-23 12:44:09.103236"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ArticlesController#show as HTML Parameters: {"id"=>"1"} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Completed 200 OK in 6ms (Views: 4.9ms | ActiveRecord: 0.0ms)  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 12:44:09.115695"], ["seen_at", "2014-03-21 12:44:09.113711"], ["updated_at", "2014-03-23 12:44:09.115695"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE ("gamification_rewards"."seen_at" IS NOT NULL)  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 12:44:09.118738"], ["updated_at", "2014-03-23 12:44:09.118738"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."seen_at" IS NULL  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 12:44:09.118738"], ["updated_at", "2014-03-23 12:44:09.118738"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 12:44:09.118738"], ["seen_at", "2014-03-21 12:44:09.118738"], ["updated_at", "2014-03-23 12:44:09.118738"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 12:44:09.118738"], ["points", 100], ["updated_at", "2014-03-23 12:44:09.118738"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 12:44:09.118738"], ["goal_id", 1], ["updated_at", "2014-03-23 12:44:09.118738"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-23 12:44:09.118738"], ["description", "Ducimus et inventore dolores quos."], ["goal_id", 1], ["image", nil], ["name", "eligendi"], ["updated_at", "2014-03-23 12:44:09.118738"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 12:44:09.118738"], ["points", 100], ["updated_at", "2014-03-23 12:44:09.118738"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 12:44:09.118738"], ["goal_id", 1], ["updated_at", "2014-03-23 12:44:09.118738"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-23 12:44:09.118738"], ["description", "Ducimus et inventore dolores quos."], ["goal_id", 1], ["image", nil], ["name", "eligendi"], ["updated_at", "2014-03-23 12:44:09.118738"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 12:44:09.118738"], ["points", 100], ["updated_at", "2014-03-23 12:44:09.118738"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 12:44:09.118738"], ["goal_id", 1], ["updated_at", "2014-03-23 12:44:09.118738"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-23 12:44:09.118738"], ["description", "Ducimus et inventore dolores quos."], ["goal_id", 1], ["image", nil], ["name", "eligendi"], ["updated_at", "2014-03-23 12:44:09.118738"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 12:44:09.118738"], ["updated_at", "2014-03-23 12:44:09.118738"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 12:44:09.118738"], ["description", "Ducimus et inventore dolores quos."], ["image", nil], ["name", "eligendi"], ["updated_at", "2014-03-23 12:44:09.118738"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 12:44:09.118738"], ["points", 1], ["updated_at", "2014-03-23 12:44:09.118738"]] SQL (0.0ms) UPDATE "gamification_medals" SET "goal_id" = ? WHERE "gamification_medals"."id" = 1 [["goal_id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 12:44:09.118738"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 12:44:09.118738"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 12:44:09.118738"], ["updated_at", "2014-03-23 12:44:09.118738"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-03-23 12:44:09.118738"], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 12:44:09.118738"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "gamification_rewards" SET "updated_at" = '2014-03-23 12:44:09.118738', "seen_at" = '2014-03-23 12:44:09.118738' WHERE "gamification_rewards"."id" = 1  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 12:44:09.118738"], ["points", 1], ["updated_at", "2014-03-23 12:44:09.118738"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 12:44:09.118738"], ["updated_at", "2014-03-23 12:44:09.118738"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 12:44:09.118738"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 12:44:09.118738"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 12:44:09.118738"], ["points", 1], ["updated_at", "2014-03-23 12:44:09.118738"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 12:44:09.118738"], ["updated_at", "2014-03-23 12:44:09.118738"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 12:44:09.118738"], ["points", 1], ["updated_at", "2014-03-23 12:44:09.118738"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 12:44:09.118738"], ["points", 1], ["updated_at", "2014-03-23 12:44:09.118738"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 12:44:09.118738"], ["updated_at", "2014-03-23 12:44:09.118738"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 12:44:09.118738"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 12:44:09.118738"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 12:44:09.118738"], ["points", 1], ["updated_at", "2014-03-23 12:44:09.118738"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 12:44:09.118738"], ["points", 1], ["updated_at", "2014-03-23 12:44:09.118738"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 12:44:09.118738"], ["points", 1], ["updated_at", "2014-03-23 12:44:09.118738"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 12:44:09.118738"], ["updated_at", "2014-03-23 12:44:09.118738"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 12:44:09.118738"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 12:44:09.118738"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 12:44:09.118738"], ["goal_id", 2], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 12:44:09.118738"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 3) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 12:44:09.118738"], ["goal_id", 3], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 12:44:09.118738"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 12:44:09.118738"], ["points", 1], ["updated_at", "2014-03-23 12:44:09.118738"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 12:44:09.118738"], ["updated_at", "2014-03-23 12:44:09.118738"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 12:44:09.118738"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 12:44:09.118738"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 12:44:09.118738"], ["points", 1], ["updated_at", "2014-03-23 12:44:09.118738"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 12:44:09.118738"], ["updated_at", "2014-03-23 12:44:09.118738"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 12:44:09.118738"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 12:44:09.118738"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 12:44:09.118738"], ["points", 1], ["updated_at", "2014-03-23 12:44:09.118738"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 12:44:09.118738"], ["points", 1], ["updated_at", "2014-03-23 12:44:09.118738"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 12:44:09.118738"], ["updated_at", "2014-03-23 12:44:09.118738"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) rollback transaction  (0.3ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 13:21:41.114596"], ["points", 100], ["updated_at", "2014-03-23 13:21:41.114596"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.2ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (1.3ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 13:21:41.133871"], ["goal_id", 1], ["updated_at", "2014-03-23 13:21:41.133871"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-23 13:21:41.145151"], ["description", "Blanditiis odit ut vitae ex incidunt aut."], ["goal_id", 1], ["image", nil], ["name", "voluptate"], ["updated_at", "2014-03-23 13:21:41.145151"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (7.7ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 13:21:41.165423"], ["points", 100], ["updated_at", "2014-03-23 13:21:41.165423"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 13:21:41.167909"], ["goal_id", 1], ["updated_at", "2014-03-23 13:21:41.167909"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-23 13:21:41.169811"], ["description", "Blanditiis odit ut vitae ex incidunt aut."], ["goal_id", 1], ["image", nil], ["name", "voluptate"], ["updated_at", "2014-03-23 13:21:41.169811"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (1.6ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 13:21:41.178886"], ["points", 100], ["updated_at", "2014-03-23 13:21:41.178886"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 13:21:41.181208"], ["goal_id", 1], ["updated_at", "2014-03-23 13:21:41.181208"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-23 13:21:41.183115"], ["description", "Blanditiis odit ut vitae ex incidunt aut."], ["goal_id", 1], ["image", nil], ["name", "voluptate"], ["updated_at", "2014-03-23 13:21:41.183115"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (1.6ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 13:21:41.193225"], ["updated_at", "2014-03-23 13:21:41.193225"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ArticlesController#show as HTML Parameters: {"id"=>"1"} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Completed 200 OK in 5ms (Views: 3.6ms | ActiveRecord: 0.1ms)  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 13:21:41.206957"], ["points", 1], ["updated_at", "2014-03-23 13:21:41.206957"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 13:21:41.209675"], ["updated_at", "2014-03-23 13:21:41.209675"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 13:21:41.225864"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 13:21:41.225864"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 12ms (ActiveRecord: 0.6ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 13:21:41.230077"], ["points", 1], ["updated_at", "2014-03-23 13:21:41.230077"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 13:21:41.231474"], ["updated_at", "2014-03-23 13:21:41.231474"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 13:21:41.237202"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 13:21:41.237202"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 5ms (ActiveRecord: 0.4ms)  (0.1ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 13:21:41.278297"], ["updated_at", "2014-03-23 13:21:41.278297"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 13:21:41.280091"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-23 13:21:41.280091"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 13:21:41.281572"], ["updated_at", "2014-03-23 13:21:41.281572"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 13:21:41.288778"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 13:21:41.288778"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 6ms (ActiveRecord: 0.6ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 13:21:41.292784"], ["updated_at", "2014-03-23 13:21:41.292784"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 13:21:41.294657"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-23 13:21:41.294657"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 13:21:41.296129"], ["updated_at", "2014-03-23 13:21:41.296129"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 13:21:41.302906"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 13:21:41.302906"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 6ms (ActiveRecord: 0.5ms)  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 13:21:41.307399"], ["points", 1], ["updated_at", "2014-03-23 13:21:41.307399"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 13:21:41.308773"], ["updated_at", "2014-03-23 13:21:41.308773"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 13:21:41.310987"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 13:21:41.310987"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 13:21:41.317927"], ["points", 1], ["updated_at", "2014-03-23 13:21:41.317927"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 13:21:41.320103"], ["updated_at", "2014-03-23 13:21:41.320103"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 13:21:41.323392"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 13:21:41.323392"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 13:21:41.327612"], ["points", 1], ["updated_at", "2014-03-23 13:21:41.327612"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 13:21:41.329075"], ["points", 1], ["updated_at", "2014-03-23 13:21:41.329075"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 13:21:41.330341"], ["points", 1], ["updated_at", "2014-03-23 13:21:41.330341"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 13:21:41.331334"], ["updated_at", "2014-03-23 13:21:41.331334"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 13:21:41.333475"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 13:21:41.333475"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 13:21:41.336994"], ["goal_id", 2], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 13:21:41.336994"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 3) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 13:21:41.339207"], ["goal_id", 3], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 13:21:41.339207"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 13:21:41.341981"], ["points", 1], ["updated_at", "2014-03-23 13:21:41.341981"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 13:21:41.343345"], ["points", 1], ["updated_at", "2014-03-23 13:21:41.343345"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 13:21:41.344520"], ["updated_at", "2014-03-23 13:21:41.344520"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 13:21:41.348813"], ["points", 1], ["updated_at", "2014-03-23 13:21:41.348813"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 13:21:41.350135"], ["points", 1], ["updated_at", "2014-03-23 13:21:41.350135"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 13:21:41.351325"], ["updated_at", "2014-03-23 13:21:41.351325"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 13:21:41.353740"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 13:21:41.353740"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 13:21:41.359573"], ["points", 1], ["updated_at", "2014-03-23 13:21:41.359573"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 13:21:41.361177"], ["updated_at", "2014-03-23 13:21:41.361177"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 13:21:41.365207"], ["points", 1], ["updated_at", "2014-03-23 13:21:41.365207"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 13:21:41.366653"], ["updated_at", "2014-03-23 13:21:41.366653"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 13:21:41.369114"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 13:21:41.369114"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 13:21:41.374438"], ["updated_at", "2014-03-23 13:21:41.374438"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."seen_at" IS NULL  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 13:21:41.377195"], ["seen_at", "2014-03-21 13:21:41.377195"], ["updated_at", "2014-03-23 13:21:41.377195"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 13:21:41.377195"], ["updated_at", "2014-03-23 13:21:41.377195"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 13:21:41.377195"], ["seen_at", "2014-03-21 13:21:41.377195"], ["updated_at", "2014-03-23 13:21:41.377195"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE ("gamification_rewards"."seen_at" IS NOT NULL)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 13:21:41.377195"], ["updated_at", "2014-03-23 13:21:41.377195"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 13:21:41.377195"], ["description", "Blanditiis odit ut vitae ex incidunt aut."], ["image", nil], ["name", "voluptate"], ["updated_at", "2014-03-23 13:21:41.377195"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 13:21:41.377195"], ["points", 1], ["updated_at", "2014-03-23 13:21:41.377195"]] SQL (0.0ms) UPDATE "gamification_medals" SET "goal_id" = ? WHERE "gamification_medals"."id" = 1 [["goal_id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 13:21:41.377195"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 13:21:41.377195"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 13:21:41.377195"], ["updated_at", "2014-03-23 13:21:41.377195"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 13:21:41.377195"], ["updated_at", "2014-03-23 13:21:41.377195"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 13:21:41.377195"], ["updated_at", "2014-03-23 13:21:41.377195"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-03-23 13:21:41.377195"], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 13:21:41.377195"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "gamification_rewards" SET "updated_at" = '2014-03-23 13:21:41.377195', "seen_at" = '2014-03-23 13:21:41.377195' WHERE "gamification_rewards"."id" = 1  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.3ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 13:21:50.071006"], ["points", 100], ["updated_at", "2014-03-23 13:21:50.071006"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 13:21:50.087489"], ["goal_id", 1], ["updated_at", "2014-03-23 13:21:50.087489"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-23 13:21:50.097315"], ["description", "Occaecati reprehenderit et sed."], ["goal_id", 1], ["image", nil], ["name", "minima"], ["updated_at", "2014-03-23 13:21:50.097315"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (6.3ms)  (1.6ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 13:21:50.115767"], ["points", 100], ["updated_at", "2014-03-23 13:21:50.115767"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 13:21:50.118198"], ["goal_id", 1], ["updated_at", "2014-03-23 13:21:50.118198"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-23 13:21:50.120139"], ["description", "Occaecati reprehenderit et sed."], ["goal_id", 1], ["image", nil], ["name", "minima"], ["updated_at", "2014-03-23 13:21:50.120139"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (1.5ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 13:21:50.129105"], ["points", 100], ["updated_at", "2014-03-23 13:21:50.129105"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 13:21:50.131427"], ["goal_id", 1], ["updated_at", "2014-03-23 13:21:50.131427"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-23 13:21:50.133701"], ["description", "Occaecati reprehenderit et sed."], ["goal_id", 1], ["image", nil], ["name", "minima"], ["updated_at", "2014-03-23 13:21:50.133701"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (1.6ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 13:21:50.144214"], ["updated_at", "2014-03-23 13:21:50.144214"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 13:21:50.148041"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-23 13:21:50.148041"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 13:21:50.151329"], ["updated_at", "2014-03-23 13:21:50.151329"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 13:21:50.170369"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 13:21:50.170369"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 15ms (ActiveRecord: 0.8ms)  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 13:21:50.175440"], ["updated_at", "2014-03-23 13:21:50.175440"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 13:21:50.177265"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-23 13:21:50.177265"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 13:21:50.178683"], ["updated_at", "2014-03-23 13:21:50.178683"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 13:21:50.185607"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 13:21:50.185607"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 6ms (ActiveRecord: 0.5ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 13:21:50.189917"], ["points", 1], ["updated_at", "2014-03-23 13:21:50.189917"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 13:21:50.191371"], ["updated_at", "2014-03-23 13:21:50.191371"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 13:21:50.197201"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 13:21:50.197201"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 5ms (ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 13:21:50.201617"], ["points", 1], ["updated_at", "2014-03-23 13:21:50.201617"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 13:21:50.238947"], ["updated_at", "2014-03-23 13:21:50.238947"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 13:21:50.245094"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 13:21:50.245094"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 5ms (ActiveRecord: 0.4ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 13:21:50.249867"], ["updated_at", "2014-03-23 13:21:50.249867"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-03-23 13:21:50.252398"], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 13:21:50.252398"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "gamification_rewards" SET "updated_at" = '2014-03-23 13:21:50.256258', "seen_at" = '2014-03-23 13:21:50.256258' WHERE "gamification_rewards"."id" = 1  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 13:21:50.259229"], ["updated_at", "2014-03-23 13:21:50.259229"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_medals" ("created_at", "description", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 13:21:50.260982"], ["description", "Occaecati reprehenderit et sed."], ["image", nil], ["name", "minima"], ["updated_at", "2014-03-23 13:21:50.260982"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 13:21:50.262786"], ["points", 1], ["updated_at", "2014-03-23 13:21:50.262786"]] SQL (0.1ms) UPDATE "gamification_medals" SET "goal_id" = ?, "updated_at" = ? WHERE "gamification_medals"."id" = 1 [["goal_id", 1], ["updated_at", "2014-03-23 13:21:50.263532"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 13:21:50.266348"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 13:21:50.266348"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 13:21:50.271620"], ["points", 1], ["updated_at", "2014-03-23 13:21:50.271620"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 13:21:50.272981"], ["points", 1], ["updated_at", "2014-03-23 13:21:50.272981"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 13:21:50.274179"], ["updated_at", "2014-03-23 13:21:50.274179"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 13:21:50.278574"], ["points", 1], ["updated_at", "2014-03-23 13:21:50.278574"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 13:21:50.280122"], ["points", 1], ["updated_at", "2014-03-23 13:21:50.280122"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 13:21:50.281393"], ["points", 1], ["updated_at", "2014-03-23 13:21:50.281393"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 13:21:50.282749"], ["updated_at", "2014-03-23 13:21:50.282749"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 13:21:50.285466"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 13:21:50.285466"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 13:21:50.290242"], ["goal_id", 2], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 13:21:50.290242"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 3) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 13:21:50.292880"], ["goal_id", 3], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 13:21:50.292880"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 13:21:50.295960"], ["points", 1], ["updated_at", "2014-03-23 13:21:50.295960"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 13:21:50.297355"], ["updated_at", "2014-03-23 13:21:50.297355"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 13:21:50.300134"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 13:21:50.300134"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 13:21:50.303606"], ["points", 1], ["updated_at", "2014-03-23 13:21:50.303606"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 13:21:50.305018"], ["updated_at", "2014-03-23 13:21:50.305018"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 13:21:50.307238"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 13:21:50.307238"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 13:21:50.312142"], ["points", 1], ["updated_at", "2014-03-23 13:21:50.312142"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 13:21:50.313669"], ["points", 1], ["updated_at", "2014-03-23 13:21:50.313669"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 13:21:50.314892"], ["updated_at", "2014-03-23 13:21:50.314892"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 13:21:50.317520"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 13:21:50.317520"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 13:21:50.322107"], ["points", 1], ["updated_at", "2014-03-23 13:21:50.322107"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 13:21:50.323482"], ["updated_at", "2014-03-23 13:21:50.323482"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 13:21:50.325678"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 13:21:50.325678"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 13:21:50.329452"], ["points", 1], ["updated_at", "2014-03-23 13:21:50.329452"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 13:21:50.331448"], ["updated_at", "2014-03-23 13:21:50.331448"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 13:21:50.336945"], ["updated_at", "2014-03-23 13:21:50.336945"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ArticlesController#show as HTML Parameters: {"id"=>"1"} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Completed 200 OK in 4ms (Views: 2.9ms | ActiveRecord: 0.1ms)  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 13:21:50.347504"], ["updated_at", "2014-03-23 13:21:50.347504"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 13:21:50.351337"], ["seen_at", "2014-03-21 13:21:50.349853"], ["updated_at", "2014-03-23 13:21:50.351337"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 13:21:50.353457"], ["updated_at", "2014-03-23 13:21:50.353457"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."seen_at" IS NULL  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 13:21:50.353457"], ["seen_at", "2014-03-21 13:21:50.353457"], ["updated_at", "2014-03-23 13:21:50.353457"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE ("gamification_rewards"."seen_at" IS NOT NULL)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 13:21:50.353457"], ["updated_at", "2014-03-23 13:21:50.353457"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 13:21:50.353457"], ["updated_at", "2014-03-23 13:21:50.353457"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.3ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 13:22:29.334335"], ["updated_at", "2014-03-23 13:22:29.334335"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 13:22:29.340632"], ["updated_at", "2014-03-23 13:22:29.340632"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (1.8ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 13:22:29.383330"], ["updated_at", "2014-03-23 13:22:29.383330"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.5ms) INSERT INTO "gamification_rewards" ("created_at", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-03-23 13:22:29.400641"], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 13:22:29.400641"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "gamification_rewards" SET "updated_at" = '2014-03-23 13:22:29.413933', "seen_at" = '2014-03-23 13:22:29.413933' WHERE "gamification_rewards"."id" = 1  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 13:22:29.424601"], ["points", 100], ["updated_at", "2014-03-23 13:22:29.424601"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 13:22:29.427755"], ["goal_id", 1], ["updated_at", "2014-03-23 13:22:29.427755"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-23 13:22:29.436972"], ["description", "Vel amet quis voluptatum aperiam quia."], ["goal_id", 1], ["image", nil], ["name", "beatae"], ["updated_at", "2014-03-23 13:22:29.436972"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (3.8ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 13:22:29.451553"], ["points", 100], ["updated_at", "2014-03-23 13:22:29.451553"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 13:22:29.453868"], ["goal_id", 1], ["updated_at", "2014-03-23 13:22:29.453868"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-23 13:22:29.455777"], ["description", "Vel amet quis voluptatum aperiam quia."], ["goal_id", 1], ["image", nil], ["name", "beatae"], ["updated_at", "2014-03-23 13:22:29.455777"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (1.7ms)  (0.7ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 13:22:29.465462"], ["points", 100], ["updated_at", "2014-03-23 13:22:29.465462"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 13:22:29.468098"], ["goal_id", 1], ["updated_at", "2014-03-23 13:22:29.468098"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-23 13:22:29.470760"], ["description", "Vel amet quis voluptatum aperiam quia."], ["goal_id", 1], ["image", nil], ["name", "beatae"], ["updated_at", "2014-03-23 13:22:29.470760"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (1.7ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 13:22:29.481809"], ["updated_at", "2014-03-23 13:22:29.481809"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 13:22:29.485742"], ["seen_at", "2014-03-21 13:22:29.484118"], ["updated_at", "2014-03-23 13:22:29.485742"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 13:22:29.489679"], ["seen_at", "2014-03-21 13:22:29.488242"], ["updated_at", "2014-03-23 13:22:29.489679"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE ("gamification_rewards"."seen_at" IS NOT NULL)  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 13:22:29.492545"], ["updated_at", "2014-03-23 13:22:29.492545"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."seen_at" IS NULL  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 13:22:29.492545"], ["points", 1], ["updated_at", "2014-03-23 13:22:29.492545"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 13:22:29.492545"], ["points", 1], ["updated_at", "2014-03-23 13:22:29.492545"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 13:22:29.492545"], ["updated_at", "2014-03-23 13:22:29.492545"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 13:22:29.492545"], ["points", 1], ["updated_at", "2014-03-23 13:22:29.492545"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 13:22:29.492545"], ["updated_at", "2014-03-23 13:22:29.492545"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 13:22:29.492545"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 13:22:29.492545"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 13:22:29.492545"], ["points", 1], ["updated_at", "2014-03-23 13:22:29.492545"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 13:22:29.492545"], ["updated_at", "2014-03-23 13:22:29.492545"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 13:22:29.492545"], ["points", 1], ["updated_at", "2014-03-23 13:22:29.492545"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 13:22:29.492545"], ["points", 1], ["updated_at", "2014-03-23 13:22:29.492545"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 13:22:29.492545"], ["points", 1], ["updated_at", "2014-03-23 13:22:29.492545"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 13:22:29.492545"], ["updated_at", "2014-03-23 13:22:29.492545"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 13:22:29.492545"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 13:22:29.492545"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 13:22:29.492545"], ["goal_id", 2], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 13:22:29.492545"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 3) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 13:22:29.492545"], ["goal_id", 3], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 13:22:29.492545"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 13:22:29.492545"], ["points", 1], ["updated_at", "2014-03-23 13:22:29.492545"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 13:22:29.492545"], ["points", 1], ["updated_at", "2014-03-23 13:22:29.492545"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 13:22:29.492545"], ["updated_at", "2014-03-23 13:22:29.492545"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 13:22:29.492545"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 13:22:29.492545"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 13:22:29.492545"], ["points", 1], ["updated_at", "2014-03-23 13:22:29.492545"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 13:22:29.492545"], ["updated_at", "2014-03-23 13:22:29.492545"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 13:22:29.492545"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 13:22:29.492545"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 13:22:29.492545"], ["points", 1], ["updated_at", "2014-03-23 13:22:29.492545"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 13:22:29.492545"], ["updated_at", "2014-03-23 13:22:29.492545"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 13:22:29.492545"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 13:22:29.492545"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 13:22:29.492545"], ["updated_at", "2014-03-23 13:22:29.492545"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 13:22:29.492545"], ["description", "Vel amet quis voluptatum aperiam quia."], ["image", nil], ["name", "beatae"], ["updated_at", "2014-03-23 13:22:29.492545"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 13:22:29.492545"], ["points", 1], ["updated_at", "2014-03-23 13:22:29.492545"]] SQL (0.0ms) UPDATE "gamification_medals" SET "goal_id" = ? WHERE "gamification_medals"."id" = 1 [["goal_id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 13:22:29.492545"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 13:22:29.492545"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 13:22:29.492545"], ["updated_at", "2014-03-23 13:22:29.492545"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 13:22:29.492545"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-23 13:22:29.492545"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 13:22:29.492545"], ["updated_at", "2014-03-23 13:22:29.492545"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 13:22:29.492545"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 13:22:29.492545"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 13:22:29.492545"], ["updated_at", "2014-03-23 13:22:29.492545"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 13:22:29.492545"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-23 13:22:29.492545"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 13:22:29.492545"], ["updated_at", "2014-03-23 13:22:29.492545"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 13:22:29.492545"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 13:22:29.492545"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 13:22:29.492545"], ["points", 1], ["updated_at", "2014-03-23 13:22:29.492545"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 13:22:29.492545"], ["updated_at", "2014-03-23 13:22:29.492545"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 13:22:29.492545"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 13:22:29.492545"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 13:22:29.492545"], ["points", 1], ["updated_at", "2014-03-23 13:22:29.492545"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 13:22:29.492545"], ["updated_at", "2014-03-23 13:22:29.492545"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 13:22:29.492545"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 13:22:29.492545"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 13:22:29.492545"], ["updated_at", "2014-03-23 13:22:29.492545"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ArticlesController#show as HTML Parameters: {"id"=>"1"} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Completed 200 OK in 0ms (Views: 0.0ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.3ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 16:35:19.560858"], ["points", 100], ["updated_at", "2014-03-23 16:35:19.560858"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (1.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 16:35:19.577039"], ["goal_id", 1], ["updated_at", "2014-03-23 16:35:19.577039"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-23 16:35:19.586816"], ["description", "Accusantium dignissimos repellendus hic veniam ipsum asperiores suscipit autem."], ["goal_id", 1], ["image", nil], ["name", "rem"], ["updated_at", "2014-03-23 16:35:19.586816"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.2ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (7.7ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 16:35:19.609139"], ["points", 100], ["updated_at", "2014-03-23 16:35:19.609139"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 16:35:19.611635"], ["goal_id", 1], ["updated_at", "2014-03-23 16:35:19.611635"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-23 16:35:19.613576"], ["description", "Accusantium dignissimos repellendus hic veniam ipsum asperiores suscipit autem."], ["goal_id", 1], ["image", nil], ["name", "rem"], ["updated_at", "2014-03-23 16:35:19.613576"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (1.7ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 16:35:19.623065"], ["points", 100], ["updated_at", "2014-03-23 16:35:19.623065"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 16:35:19.625559"], ["goal_id", 1], ["updated_at", "2014-03-23 16:35:19.625559"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-23 16:35:19.627491"], ["description", "Accusantium dignissimos repellendus hic veniam ipsum asperiores suscipit autem."], ["goal_id", 1], ["image", nil], ["name", "rem"], ["updated_at", "2014-03-23 16:35:19.627491"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (1.8ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 16:35:19.638751"], ["updated_at", "2014-03-23 16:35:19.638751"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.4ms) INSERT INTO "gamification_rewards" ("created_at", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-03-23 16:35:19.643931"], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 16:35:19.643931"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "gamification_rewards" SET "updated_at" = '2014-03-23 16:35:19.653651', "seen_at" = '2014-03-23 16:35:19.653651' WHERE "gamification_rewards"."id" = 1  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 16:35:19.658472"], ["updated_at", "2014-03-23 16:35:19.658472"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 16:35:19.662522"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-23 16:35:19.662522"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 16:35:19.664102"], ["updated_at", "2014-03-23 16:35:19.664102"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 16:35:19.674798"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 16:35:19.674798"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 9ms (ActiveRecord: 0.7ms)  (0.1ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 16:35:19.679180"], ["updated_at", "2014-03-23 16:35:19.679180"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 16:35:19.680899"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-23 16:35:19.680899"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 16:35:19.682320"], ["updated_at", "2014-03-23 16:35:19.682320"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (33.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 16:35:19.724047"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 16:35:19.724047"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 41ms (ActiveRecord: 34.0ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 16:35:19.728631"], ["points", 1], ["updated_at", "2014-03-23 16:35:19.728631"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 16:35:19.730215"], ["updated_at", "2014-03-23 16:35:19.730215"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 16:35:19.736260"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 16:35:19.736260"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 5ms (ActiveRecord: 0.5ms)  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 16:35:19.740393"], ["points", 1], ["updated_at", "2014-03-23 16:35:19.740393"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 16:35:19.741803"], ["updated_at", "2014-03-23 16:35:19.741803"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 16:35:19.747542"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 16:35:19.747542"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 5ms (ActiveRecord: 0.4ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 16:35:19.752211"], ["updated_at", "2014-03-23 16:35:19.752211"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 16:35:19.753643"], ["updated_at", "2014-03-23 16:35:19.753643"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 16:35:19.757521"], ["updated_at", "2014-03-23 16:35:19.757521"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."seen_at" IS NULL  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 16:35:19.757521"], ["seen_at", "2014-03-21 16:35:19.757521"], ["updated_at", "2014-03-23 16:35:19.757521"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE ("gamification_rewards"."seen_at" IS NOT NULL)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 16:35:19.757521"], ["updated_at", "2014-03-23 16:35:19.757521"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 16:35:19.757521"], ["seen_at", "2014-03-21 16:35:19.757521"], ["updated_at", "2014-03-23 16:35:19.757521"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 16:35:19.757521"], ["updated_at", "2014-03-23 16:35:19.757521"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ArticlesController#show as HTML Parameters: {"id"=>"1"} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Completed 200 OK in 0ms (Views: 0.0ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 16:35:19.757521"], ["updated_at", "2014-03-23 16:35:19.757521"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 16:35:19.757521"], ["description", "Accusantium dignissimos repellendus hic veniam ipsum asperiores suscipit autem."], ["image", nil], ["name", "rem"], ["updated_at", "2014-03-23 16:35:19.757521"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 16:35:19.757521"], ["points", 1], ["updated_at", "2014-03-23 16:35:19.757521"]] SQL (0.0ms) UPDATE "gamification_medals" SET "goal_id" = ? WHERE "gamification_medals"."id" = 1 [["goal_id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 16:35:19.757521"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 16:35:19.757521"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 16:35:19.757521"], ["points", 1], ["updated_at", "2014-03-23 16:35:19.757521"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 16:35:19.757521"], ["points", 1], ["updated_at", "2014-03-23 16:35:19.757521"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 16:35:19.757521"], ["points", 1], ["updated_at", "2014-03-23 16:35:19.757521"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 16:35:19.757521"], ["updated_at", "2014-03-23 16:35:19.757521"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 16:35:19.757521"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 16:35:19.757521"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 16:35:19.757521"], ["goal_id", 2], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 16:35:19.757521"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 3) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 16:35:19.757521"], ["goal_id", 3], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 16:35:19.757521"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 16:35:19.757521"], ["points", 1], ["updated_at", "2014-03-23 16:35:19.757521"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 16:35:19.757521"], ["updated_at", "2014-03-23 16:35:19.757521"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 16:35:19.757521"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 16:35:19.757521"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 16:35:19.757521"], ["points", 1], ["updated_at", "2014-03-23 16:35:19.757521"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 16:35:19.757521"], ["updated_at", "2014-03-23 16:35:19.757521"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 16:35:19.757521"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 16:35:19.757521"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 16:35:19.757521"], ["points", 1], ["updated_at", "2014-03-23 16:35:19.757521"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 16:35:19.757521"], ["updated_at", "2014-03-23 16:35:19.757521"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 16:35:19.757521"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 16:35:19.757521"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 16:35:19.757521"], ["points", 1], ["updated_at", "2014-03-23 16:35:19.757521"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 16:35:19.757521"], ["updated_at", "2014-03-23 16:35:19.757521"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 16:35:19.757521"], ["points", 1], ["updated_at", "2014-03-23 16:35:19.757521"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 16:35:19.757521"], ["points", 1], ["updated_at", "2014-03-23 16:35:19.757521"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 16:35:19.757521"], ["updated_at", "2014-03-23 16:35:19.757521"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 16:35:19.757521"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 16:35:19.757521"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 16:35:19.757521"], ["points", 1], ["updated_at", "2014-03-23 16:35:19.757521"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 16:35:19.757521"], ["points", 1], ["updated_at", "2014-03-23 16:35:19.757521"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 16:35:19.757521"], ["updated_at", "2014-03-23 16:35:19.757521"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) rollback transaction  (0.3ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 16:43:12.753948"], ["updated_at", "2014-03-23 16:43:12.753948"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 16:43:12.798533"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-23 16:43:12.798533"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 16:43:12.802236"], ["updated_at", "2014-03-23 16:43:12.802236"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 16:43:12.835424"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 16:43:12.835424"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 29ms (ActiveRecord: 1.1ms)  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards"  (2.0ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 16:43:12.842455"], ["updated_at", "2014-03-23 16:43:12.842455"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 16:43:12.844322"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-23 16:43:12.844322"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 16:43:12.845763"], ["updated_at", "2014-03-23 16:43:12.845763"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 16:43:12.852493"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 16:43:12.852493"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 6ms (ActiveRecord: 0.6ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 16:43:12.857330"], ["points", 1], ["updated_at", "2014-03-23 16:43:12.857330"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 16:43:12.858895"], ["updated_at", "2014-03-23 16:43:12.858895"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 16:43:12.865013"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 16:43:12.865013"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 5ms (ActiveRecord: 0.5ms)  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.5ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 16:43:12.869452"], ["points", 1], ["updated_at", "2014-03-23 16:43:12.869452"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 16:43:12.870988"], ["updated_at", "2014-03-23 16:43:12.870988"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 16:43:12.876775"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 16:43:12.876775"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 5ms (ActiveRecord: 0.4ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 16:43:12.881260"], ["updated_at", "2014-03-23 16:43:12.881260"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 16:43:12.882636"], ["updated_at", "2014-03-23 16:43:12.882636"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 16:43:12.889669"], ["seen_at", "2014-03-21 16:43:12.887776"], ["updated_at", "2014-03-23 16:43:12.889669"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE ("gamification_rewards"."seen_at" IS NOT NULL)  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 16:43:12.892666"], ["updated_at", "2014-03-23 16:43:12.892666"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 16:43:12.892666"], ["seen_at", "2014-03-21 16:43:12.892666"], ["updated_at", "2014-03-23 16:43:12.892666"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 16:43:12.892666"], ["updated_at", "2014-03-23 16:43:12.892666"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."seen_at" IS NULL  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 16:43:12.892666"], ["updated_at", "2014-03-23 16:43:12.892666"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-03-23 16:43:12.892666"], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 16:43:12.892666"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "gamification_rewards" SET "updated_at" = '2014-03-23 16:43:12.892666', "seen_at" = '2014-03-23 16:43:12.892666' WHERE "gamification_rewards"."id" = 1  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 16:43:12.892666"], ["updated_at", "2014-03-23 16:43:12.892666"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ArticlesController#show as HTML Parameters: {"id"=>"1"} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Completed 200 OK in 0ms (Views: 0.0ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 16:43:12.892666"], ["points", 1], ["updated_at", "2014-03-23 16:43:12.892666"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 16:43:12.892666"], ["updated_at", "2014-03-23 16:43:12.892666"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 16:43:12.892666"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 16:43:12.892666"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 16:43:12.892666"], ["points", 1], ["updated_at", "2014-03-23 16:43:12.892666"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 16:43:12.892666"], ["updated_at", "2014-03-23 16:43:12.892666"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 16:43:12.892666"], ["points", 1], ["updated_at", "2014-03-23 16:43:12.892666"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 16:43:12.892666"], ["points", 1], ["updated_at", "2014-03-23 16:43:12.892666"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 16:43:12.892666"], ["points", 1], ["updated_at", "2014-03-23 16:43:12.892666"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 16:43:12.892666"], ["updated_at", "2014-03-23 16:43:12.892666"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 16:43:12.892666"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 16:43:12.892666"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 16:43:12.892666"], ["goal_id", 2], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 16:43:12.892666"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 3) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 16:43:12.892666"], ["goal_id", 3], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 16:43:12.892666"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 16:43:12.892666"], ["points", 1], ["updated_at", "2014-03-23 16:43:12.892666"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 16:43:12.892666"], ["points", 1], ["updated_at", "2014-03-23 16:43:12.892666"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 16:43:12.892666"], ["updated_at", "2014-03-23 16:43:12.892666"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 16:43:12.892666"], ["points", 1], ["updated_at", "2014-03-23 16:43:12.892666"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 16:43:12.892666"], ["points", 1], ["updated_at", "2014-03-23 16:43:12.892666"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 16:43:12.892666"], ["updated_at", "2014-03-23 16:43:12.892666"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 16:43:12.892666"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 16:43:12.892666"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 16:43:12.892666"], ["points", 1], ["updated_at", "2014-03-23 16:43:12.892666"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 16:43:12.892666"], ["updated_at", "2014-03-23 16:43:12.892666"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 16:43:12.892666"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 16:43:12.892666"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 16:43:12.892666"], ["points", 1], ["updated_at", "2014-03-23 16:43:12.892666"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 16:43:12.892666"], ["updated_at", "2014-03-23 16:43:12.892666"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 16:43:12.892666"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 16:43:12.892666"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 16:43:12.892666"], ["points", 100], ["updated_at", "2014-03-23 16:43:12.892666"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 16:43:12.892666"], ["goal_id", 1], ["updated_at", "2014-03-23 16:43:12.892666"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-23 16:43:12.892666"], ["description", "Cupiditate magni repellendus porro quo nemo."], ["goal_id", 1], ["image", nil], ["name", "voluptatem"], ["updated_at", "2014-03-23 16:43:12.892666"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 16:43:12.892666"], ["points", 100], ["updated_at", "2014-03-23 16:43:12.892666"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 16:43:12.892666"], ["goal_id", 1], ["updated_at", "2014-03-23 16:43:12.892666"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-23 16:43:12.892666"], ["description", "Cupiditate magni repellendus porro quo nemo."], ["goal_id", 1], ["image", nil], ["name", "voluptatem"], ["updated_at", "2014-03-23 16:43:12.892666"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 16:43:12.892666"], ["points", 100], ["updated_at", "2014-03-23 16:43:12.892666"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 16:43:12.892666"], ["goal_id", 1], ["updated_at", "2014-03-23 16:43:12.892666"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-23 16:43:12.892666"], ["description", "Cupiditate magni repellendus porro quo nemo."], ["goal_id", 1], ["image", nil], ["name", "voluptatem"], ["updated_at", "2014-03-23 16:43:12.892666"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-23 16:43:12.892666"], ["updated_at", "2014-03-23 16:43:12.892666"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 16:43:12.892666"], ["description", "Cupiditate magni repellendus porro quo nemo."], ["image", nil], ["name", "voluptatem"], ["updated_at", "2014-03-23 16:43:12.892666"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-23 16:43:12.892666"], ["points", 1], ["updated_at", "2014-03-23 16:43:12.892666"]] SQL (0.0ms) UPDATE "gamification_medals" SET "goal_id" = ? WHERE "gamification_medals"."id" = 1 [["goal_id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-23 16:43:12.892666"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-23 16:43:12.892666"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.3ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-26 12:43:23.840030"], ["updated_at", "2014-03-26 12:43:23.840030"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.2ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (1.0ms) INSERT INTO "gamification_rewards" ("created_at", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-03-26 12:43:23.899468"], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-26 12:43:23.899468"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "gamification_rewards" SET "updated_at" = '2014-03-26 12:43:23.920779', "seen_at" = '2014-03-26 12:43:23.920779' WHERE "gamification_rewards"."id" = 1  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-26 12:43:23.926484"], ["seen_at", "2014-03-24 12:43:23.923823"], ["updated_at", "2014-03-26 12:43:23.926484"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE ("gamification_rewards"."seen_at" IS NOT NULL)  (0.4ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-26 12:43:23.929558"], ["updated_at", "2014-03-26 12:43:23.929558"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."seen_at" IS NULL  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-26 12:43:23.929558"], ["seen_at", "2014-03-24 12:43:23.929558"], ["updated_at", "2014-03-26 12:43:23.929558"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-26 12:43:23.929558"], ["updated_at", "2014-03-26 12:43:23.929558"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-26 12:43:23.929558"], ["points", 1], ["updated_at", "2014-03-26 12:43:23.929558"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-26 12:43:23.929558"], ["updated_at", "2014-03-26 12:43:23.929558"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-26 12:43:23.929558"], ["points", 1], ["updated_at", "2014-03-26 12:43:23.929558"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-26 12:43:23.929558"], ["updated_at", "2014-03-26 12:43:23.929558"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-26 12:43:23.929558"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-26 12:43:23.929558"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-26 12:43:23.929558"], ["points", 1], ["updated_at", "2014-03-26 12:43:23.929558"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-26 12:43:23.929558"], ["points", 1], ["updated_at", "2014-03-26 12:43:23.929558"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-26 12:43:23.929558"], ["points", 1], ["updated_at", "2014-03-26 12:43:23.929558"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-26 12:43:23.929558"], ["updated_at", "2014-03-26 12:43:23.929558"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-26 12:43:23.929558"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-26 12:43:23.929558"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-26 12:43:23.929558"], ["goal_id", 2], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-26 12:43:23.929558"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 3) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-26 12:43:23.929558"], ["goal_id", 3], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-26 12:43:23.929558"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-26 12:43:23.929558"], ["points", 1], ["updated_at", "2014-03-26 12:43:23.929558"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-26 12:43:23.929558"], ["updated_at", "2014-03-26 12:43:23.929558"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-26 12:43:23.929558"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-26 12:43:23.929558"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-26 12:43:23.929558"], ["points", 1], ["updated_at", "2014-03-26 12:43:23.929558"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-26 12:43:23.929558"], ["updated_at", "2014-03-26 12:43:23.929558"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-26 12:43:23.929558"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-26 12:43:23.929558"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-26 12:43:23.929558"], ["points", 1], ["updated_at", "2014-03-26 12:43:23.929558"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-26 12:43:23.929558"], ["points", 1], ["updated_at", "2014-03-26 12:43:23.929558"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-26 12:43:23.929558"], ["updated_at", "2014-03-26 12:43:23.929558"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-26 12:43:23.929558"], ["points", 1], ["updated_at", "2014-03-26 12:43:23.929558"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-26 12:43:23.929558"], ["points", 1], ["updated_at", "2014-03-26 12:43:23.929558"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-26 12:43:23.929558"], ["updated_at", "2014-03-26 12:43:23.929558"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-26 12:43:23.929558"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-26 12:43:23.929558"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-26 12:43:23.929558"], ["points", 100], ["updated_at", "2014-03-26 12:43:23.929558"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-26 12:43:23.929558"], ["goal_id", 1], ["updated_at", "2014-03-26 12:43:23.929558"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-26 12:43:23.929558"], ["description", "Et molestiae minima ipsum."], ["goal_id", 1], ["image", nil], ["name", "maxime"], ["updated_at", "2014-03-26 12:43:23.929558"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-26 12:43:23.929558"], ["points", 100], ["updated_at", "2014-03-26 12:43:23.929558"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-26 12:43:23.929558"], ["goal_id", 1], ["updated_at", "2014-03-26 12:43:23.929558"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-26 12:43:23.929558"], ["description", "Et molestiae minima ipsum."], ["goal_id", 1], ["image", nil], ["name", "maxime"], ["updated_at", "2014-03-26 12:43:23.929558"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-26 12:43:23.929558"], ["points", 100], ["updated_at", "2014-03-26 12:43:23.929558"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-26 12:43:23.929558"], ["goal_id", 1], ["updated_at", "2014-03-26 12:43:23.929558"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-03-26 12:43:23.929558"], ["description", "Et molestiae minima ipsum."], ["goal_id", 1], ["image", nil], ["name", "maxime"], ["updated_at", "2014-03-26 12:43:23.929558"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-26 12:43:23.929558"], ["points", 1], ["updated_at", "2014-03-26 12:43:23.929558"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-26 12:43:23.929558"], ["updated_at", "2014-03-26 12:43:23.929558"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-26 12:43:23.929558"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-26 12:43:23.929558"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-26 12:43:23.929558"], ["points", 1], ["updated_at", "2014-03-26 12:43:23.929558"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-26 12:43:23.929558"], ["updated_at", "2014-03-26 12:43:23.929558"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-26 12:43:23.929558"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-26 12:43:23.929558"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-26 12:43:23.929558"], ["updated_at", "2014-03-26 12:43:23.929558"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-26 12:43:23.929558"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-26 12:43:23.929558"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-26 12:43:23.929558"], ["updated_at", "2014-03-26 12:43:23.929558"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-26 12:43:23.929558"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-26 12:43:23.929558"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-26 12:43:23.929558"], ["updated_at", "2014-03-26 12:43:23.929558"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-26 12:43:23.929558"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-03-26 12:43:23.929558"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-26 12:43:23.929558"], ["updated_at", "2014-03-26 12:43:23.929558"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-26 12:43:23.929558"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-26 12:43:23.929558"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-26 12:43:23.929558"], ["updated_at", "2014-03-26 12:43:23.929558"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-26 12:43:23.929558"], ["updated_at", "2014-03-26 12:43:23.929558"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-26 12:43:23.929558"], ["updated_at", "2014-03-26 12:43:23.929558"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ArticlesController#show as HTML Parameters: {"id"=>"1"} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Completed 200 OK in 0ms (Views: 0.0ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-03-26 12:43:23.929558"], ["updated_at", "2014-03-26 12:43:23.929558"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-26 12:43:23.929558"], ["description", "Et molestiae minima ipsum."], ["image", nil], ["name", "maxime"], ["updated_at", "2014-03-26 12:43:23.929558"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-03-26 12:43:23.929558"], ["points", 1], ["updated_at", "2014-03-26 12:43:23.929558"]] SQL (0.0ms) UPDATE "gamification_medals" SET "goal_id" = ? WHERE "gamification_medals"."id" = 1 [["goal_id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-03-26 12:43:23.929558"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-03-26 12:43:23.929558"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.3ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:46:49.694096"], ["updated_at", "2014-04-10 11:46:49.694096"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:46:49.711859"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-04-10 11:46:49.711859"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:46:49.716406"], ["updated_at", "2014-04-10 11:46:49.716406"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:46:49.799850"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:46:49.799850"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 78ms (ActiveRecord: 1.3ms)  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.6ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:46:49.806037"], ["updated_at", "2014-04-10 11:46:49.806037"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:46:49.807830"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-04-10 11:46:49.807830"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:46:49.809252"], ["updated_at", "2014-04-10 11:46:49.809252"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:46:49.816321"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:46:49.816321"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 6ms (ActiveRecord: 0.6ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:46:49.820674"], ["points", 1], ["updated_at", "2014-04-10 11:46:49.820674"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:46:49.822063"], ["updated_at", "2014-04-10 11:46:49.822063"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:46:49.827852"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:46:49.827852"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 5ms (ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:46:49.832625"], ["points", 1], ["updated_at", "2014-04-10 11:46:49.832625"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:46:49.834037"], ["updated_at", "2014-04-10 11:46:49.834037"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:46:49.839912"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:46:49.839912"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 5ms (ActiveRecord: 0.5ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:46:49.844949"], ["updated_at", "2014-04-10 11:46:49.844949"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ArticlesController#show as HTML Parameters: {"id"=>"1"} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Completed 200 OK in 11ms (Views: 9.9ms | ActiveRecord: 0.1ms)  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:46:49.862619"], ["points", 1], ["updated_at", "2014-04-10 11:46:49.862619"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:46:49.864748"], ["points", 1], ["updated_at", "2014-04-10 11:46:49.864748"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:46:49.866505"], ["points", 1], ["updated_at", "2014-04-10 11:46:49.866505"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:46:49.867812"], ["updated_at", "2014-04-10 11:46:49.867812"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:46:49.871247"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:46:49.871247"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:46:49.874890"], ["goal_id", 2], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:46:49.874890"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 3) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:46:49.877074"], ["goal_id", 3], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:46:49.877074"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:46:49.880176"], ["points", 1], ["updated_at", "2014-04-10 11:46:49.880176"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:46:49.881692"], ["updated_at", "2014-04-10 11:46:49.881692"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:46:49.884915"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:46:49.884915"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:46:49.888990"], ["points", 1], ["updated_at", "2014-04-10 11:46:49.888990"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:46:49.890784"], ["updated_at", "2014-04-10 11:46:49.890784"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:46:49.895401"], ["points", 1], ["updated_at", "2014-04-10 11:46:49.895401"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:46:49.897063"], ["points", 1], ["updated_at", "2014-04-10 11:46:49.897063"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:46:49.898433"], ["updated_at", "2014-04-10 11:46:49.898433"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:46:49.901218"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:46:49.901218"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:46:49.906200"], ["points", 1], ["updated_at", "2014-04-10 11:46:49.906200"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:46:49.907681"], ["updated_at", "2014-04-10 11:46:49.907681"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:46:49.910203"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:46:49.910203"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:46:49.914409"], ["points", 1], ["updated_at", "2014-04-10 11:46:49.914409"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:46:49.915933"], ["updated_at", "2014-04-10 11:46:49.915933"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:46:49.918631"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:46:49.918631"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:46:49.925689"], ["points", 1], ["updated_at", "2014-04-10 11:46:49.925689"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:46:49.927284"], ["points", 1], ["updated_at", "2014-04-10 11:46:49.927284"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:46:49.928536"], ["updated_at", "2014-04-10 11:46:49.928536"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:46:49.934109"], ["updated_at", "2014-04-10 11:46:49.934109"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:46:49.935497"], ["updated_at", "2014-04-10 11:46:49.935497"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:46:49.952425"], ["points", 100], ["updated_at", "2014-04-10 11:46:49.952425"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.4ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:46:49.955258"], ["goal_id", 1], ["updated_at", "2014-04-10 11:46:49.955258"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:46:49.964278"], ["description", "Vel id iure ab ea qui rerum rerum quo."], ["goal_id", 1], ["image", nil], ["name", "minus"], ["updated_at", "2014-04-10 11:46:49.964278"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.2ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (5.1ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:46:49.983750"], ["points", 100], ["updated_at", "2014-04-10 11:46:49.983750"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:46:49.986296"], ["goal_id", 1], ["updated_at", "2014-04-10 11:46:49.986296"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:46:49.988285"], ["description", "Vel id iure ab ea qui rerum rerum quo."], ["goal_id", 1], ["image", nil], ["name", "minus"], ["updated_at", "2014-04-10 11:46:49.988285"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (2.4ms)  (0.7ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:46:49.999914"], ["points", 100], ["updated_at", "2014-04-10 11:46:49.999914"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.4ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:46:50.003948"], ["goal_id", 1], ["updated_at", "2014-04-10 11:46:50.003948"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:46:50.006436"], ["description", "Vel id iure ab ea qui rerum rerum quo."], ["goal_id", 1], ["image", nil], ["name", "minus"], ["updated_at", "2014-04-10 11:46:50.006436"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (1.6ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:46:50.014859"], ["updated_at", "2014-04-10 11:46:50.014859"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."seen_at" IS NULL  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:46:50.014859"], ["updated_at", "2014-04-10 11:46:50.014859"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:46:50.014859"], ["seen_at", "2014-04-08 11:46:50.014859"], ["updated_at", "2014-04-10 11:46:50.014859"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:46:50.014859"], ["seen_at", "2014-04-08 11:46:50.014859"], ["updated_at", "2014-04-10 11:46:50.014859"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE ("gamification_rewards"."seen_at" IS NOT NULL)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:46:50.014859"], ["points", 1], ["updated_at", "2014-04-10 11:46:50.014859"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:46:50.014859"], ["points", 1], ["updated_at", "2014-04-10 11:46:50.014859"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:46:50.014859"], ["description", "Vel id iure ab ea qui rerum rerum quo."], ["goal_id", 1], ["image", nil], ["name", "minus"], ["updated_at", "2014-04-10 11:46:50.014859"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:46:50.014859"], ["goal_id", 1], ["updated_at", "2014-04-10 11:46:50.014859"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:46:50.014859"], ["updated_at", "2014-04-10 11:46:50.014859"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:46:50.014859"], ["updated_at", "2014-04-10 11:46:50.014859"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:46:50.014859"], ["description", "Vel id iure ab ea qui rerum rerum quo."], ["image", nil], ["name", "minus"], ["updated_at", "2014-04-10 11:46:50.014859"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:46:50.014859"], ["points", 1], ["updated_at", "2014-04-10 11:46:50.014859"]] SQL (0.0ms) UPDATE "gamification_medals" SET "goal_id" = ? WHERE "gamification_medals"."id" = 1 [["goal_id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:46:50.014859"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:46:50.014859"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:46:50.014859"], ["updated_at", "2014-04-10 11:46:50.014859"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-04-10 11:46:50.014859"], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:46:50.014859"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "gamification_rewards" SET "updated_at" = '2014-04-10 11:46:50.014859', "seen_at" = '2014-04-10 11:46:50.014859' WHERE "gamification_rewards"."id" = 1  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.3ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.2ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.5ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:47:07.887778"], ["updated_at", "2014-04-10 11:47:07.887778"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."seen_at" IS NULL  (0.3ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:47:07.900196"], ["points", 1], ["updated_at", "2014-04-10 11:47:07.900196"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:47:07.940721"], ["points", 1], ["updated_at", "2014-04-10 11:47:07.940721"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:47:07.952228"], ["description", "Aut reiciendis ab et cum assumenda sunt aut maiores."], ["goal_id", 1], ["image", nil], ["name", "est"], ["updated_at", "2014-04-10 11:47:07.952228"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:47:07.955820"], ["goal_id", 1], ["updated_at", "2014-04-10 11:47:07.955820"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:47:07.958732"], ["goal_id", 2], ["updated_at", "2014-04-10 11:47:07.958732"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" Gamification::Goal Load (0.2ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.2ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 2]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 2]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.2ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:47:07.972027"], ["seen_at", "2014-04-08 11:47:07.969986"], ["updated_at", "2014-04-10 11:47:07.972027"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.2ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:47:07.976771"], ["updated_at", "2014-04-10 11:47:07.976771"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:47:07.981826"], ["seen_at", "2014-04-08 11:47:07.980005"], ["updated_at", "2014-04-10 11:47:07.981826"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE ("gamification_rewards"."seen_at" IS NOT NULL)  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:47:07.984994"], ["updated_at", "2014-04-10 11:47:07.984994"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:47:07.984994"], ["updated_at", "2014-04-10 11:47:07.984994"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:47:07.984994"], ["points", 1], ["updated_at", "2014-04-10 11:47:07.984994"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:47:07.984994"], ["points", 1], ["updated_at", "2014-04-10 11:47:07.984994"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:47:07.984994"], ["points", 1], ["updated_at", "2014-04-10 11:47:07.984994"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:47:07.984994"], ["updated_at", "2014-04-10 11:47:07.984994"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:47:07.984994"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:47:07.984994"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:47:07.984994"], ["goal_id", 2], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:47:07.984994"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 3) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:47:07.984994"], ["goal_id", 3], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:47:07.984994"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:47:07.984994"], ["points", 1], ["updated_at", "2014-04-10 11:47:07.984994"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:47:07.984994"], ["updated_at", "2014-04-10 11:47:07.984994"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:47:07.984994"], ["points", 1], ["updated_at", "2014-04-10 11:47:07.984994"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:47:07.984994"], ["updated_at", "2014-04-10 11:47:07.984994"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:47:07.984994"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:47:07.984994"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:47:07.984994"], ["points", 1], ["updated_at", "2014-04-10 11:47:07.984994"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:47:07.984994"], ["points", 1], ["updated_at", "2014-04-10 11:47:07.984994"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:47:07.984994"], ["updated_at", "2014-04-10 11:47:07.984994"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:47:07.984994"], ["points", 1], ["updated_at", "2014-04-10 11:47:07.984994"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:47:07.984994"], ["points", 1], ["updated_at", "2014-04-10 11:47:07.984994"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:47:07.984994"], ["updated_at", "2014-04-10 11:47:07.984994"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:47:07.984994"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:47:07.984994"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:47:07.984994"], ["points", 1], ["updated_at", "2014-04-10 11:47:07.984994"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:47:07.984994"], ["updated_at", "2014-04-10 11:47:07.984994"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:47:07.984994"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:47:07.984994"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:47:07.984994"], ["points", 1], ["updated_at", "2014-04-10 11:47:07.984994"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:47:07.984994"], ["updated_at", "2014-04-10 11:47:07.984994"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:47:07.984994"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:47:07.984994"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:47:07.984994"], ["points", 1], ["updated_at", "2014-04-10 11:47:07.984994"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:47:07.984994"], ["updated_at", "2014-04-10 11:47:07.984994"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:47:07.984994"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:47:07.984994"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:47:07.984994"], ["points", 1], ["updated_at", "2014-04-10 11:47:07.984994"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:47:07.984994"], ["updated_at", "2014-04-10 11:47:07.984994"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:47:07.984994"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:47:07.984994"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:47:07.984994"], ["updated_at", "2014-04-10 11:47:07.984994"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:47:07.984994"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-04-10 11:47:07.984994"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:47:07.984994"], ["updated_at", "2014-04-10 11:47:07.984994"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:47:07.984994"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:47:07.984994"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:47:07.984994"], ["updated_at", "2014-04-10 11:47:07.984994"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:47:07.984994"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-04-10 11:47:07.984994"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:47:07.984994"], ["updated_at", "2014-04-10 11:47:07.984994"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:47:07.984994"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:47:07.984994"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:47:07.984994"], ["points", 100], ["updated_at", "2014-04-10 11:47:07.984994"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:47:07.984994"], ["goal_id", 1], ["updated_at", "2014-04-10 11:47:07.984994"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:47:07.984994"], ["description", "Aut reiciendis ab et cum assumenda sunt aut maiores."], ["goal_id", 1], ["image", nil], ["name", "est"], ["updated_at", "2014-04-10 11:47:07.984994"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:47:07.984994"], ["points", 100], ["updated_at", "2014-04-10 11:47:07.984994"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:47:07.984994"], ["goal_id", 1], ["updated_at", "2014-04-10 11:47:07.984994"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:47:07.984994"], ["description", "Aut reiciendis ab et cum assumenda sunt aut maiores."], ["goal_id", 1], ["image", nil], ["name", "est"], ["updated_at", "2014-04-10 11:47:07.984994"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:47:07.984994"], ["points", 100], ["updated_at", "2014-04-10 11:47:07.984994"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:47:07.984994"], ["goal_id", 1], ["updated_at", "2014-04-10 11:47:07.984994"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:47:07.984994"], ["description", "Aut reiciendis ab et cum assumenda sunt aut maiores."], ["goal_id", 1], ["image", nil], ["name", "est"], ["updated_at", "2014-04-10 11:47:07.984994"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:47:07.984994"], ["updated_at", "2014-04-10 11:47:07.984994"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-04-10 11:47:07.984994"], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:47:07.984994"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "gamification_rewards" SET "updated_at" = '2014-04-10 11:47:07.984994', "seen_at" = '2014-04-10 11:47:07.984994' WHERE "gamification_rewards"."id" = 1  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:47:07.984994"], ["updated_at", "2014-04-10 11:47:07.984994"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ArticlesController#show as HTML Parameters: {"id"=>"1"} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Completed 200 OK in 0ms (Views: 0.0ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:47:07.984994"], ["updated_at", "2014-04-10 11:47:07.984994"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:47:07.984994"], ["description", "Aut reiciendis ab et cum assumenda sunt aut maiores."], ["image", nil], ["name", "est"], ["updated_at", "2014-04-10 11:47:07.984994"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:47:07.984994"], ["points", 1], ["updated_at", "2014-04-10 11:47:07.984994"]] SQL (0.0ms) UPDATE "gamification_medals" SET "goal_id" = ? WHERE "gamification_medals"."id" = 1 [["goal_id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:47:07.984994"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:47:07.984994"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.4ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:47:45.812044"], ["updated_at", "2014-04-10 11:47:45.812044"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ArticlesController#show as HTML Parameters: {"id"=>"1"} Article Load (0.2ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Rendered articles/show.html.erb within layouts/application (0.3ms) Completed 200 OK in 13ms (Views: 8.9ms | ActiveRecord: 0.2ms)  (1.7ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:47:45.846878"], ["points", 1], ["updated_at", "2014-04-10 11:47:45.846878"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:47:45.849990"], ["updated_at", "2014-04-10 11:47:45.849990"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.3ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.2ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:47:45.932255"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:47:45.932255"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 78ms (ActiveRecord: 1.6ms)  (1.8ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:47:45.938845"], ["points", 1], ["updated_at", "2014-04-10 11:47:45.938845"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:47:45.940253"], ["updated_at", "2014-04-10 11:47:45.940253"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:47:45.946612"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:47:45.946612"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 5ms (ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:47:45.952404"], ["updated_at", "2014-04-10 11:47:45.952404"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:47:45.954670"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-04-10 11:47:45.954670"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:47:45.958016"], ["updated_at", "2014-04-10 11:47:45.958016"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.2ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:47:45.966609"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:47:45.966609"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 7ms (ActiveRecord: 0.7ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:47:45.970408"], ["updated_at", "2014-04-10 11:47:45.970408"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:47:45.972077"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-04-10 11:47:45.972077"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:47:45.974228"], ["updated_at", "2014-04-10 11:47:45.974228"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:47:45.982152"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:47:45.982152"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 7ms (ActiveRecord: 0.6ms)  (0.1ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:47:45.989221"], ["points", 100], ["updated_at", "2014-04-10 11:47:45.989221"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:47:45.994070"], ["goal_id", 1], ["updated_at", "2014-04-10 11:47:45.994070"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:47:46.004680"], ["description", "Harum sunt illo minus."], ["goal_id", 1], ["image", nil], ["name", "neque"], ["updated_at", "2014-04-10 11:47:46.004680"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.2ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (4.9ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:47:46.020372"], ["points", 100], ["updated_at", "2014-04-10 11:47:46.020372"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:47:46.025744"], ["goal_id", 1], ["updated_at", "2014-04-10 11:47:46.025744"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:47:46.029270"], ["description", "Harum sunt illo minus."], ["goal_id", 1], ["image", nil], ["name", "neque"], ["updated_at", "2014-04-10 11:47:46.029270"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (1.9ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:47:46.040617"], ["points", 100], ["updated_at", "2014-04-10 11:47:46.040617"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.2ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.6ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:47:46.044644"], ["goal_id", 1], ["updated_at", "2014-04-10 11:47:46.044644"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:47:46.048393"], ["description", "Harum sunt illo minus."], ["goal_id", 1], ["image", nil], ["name", "neque"], ["updated_at", "2014-04-10 11:47:46.048393"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (2.1ms)  (0.7ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:47:46.058726"], ["updated_at", "2014-04-10 11:47:46.058726"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "gamification_medals" ("created_at", "description", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:47:46.061786"], ["description", "Harum sunt illo minus."], ["image", nil], ["name", "neque"], ["updated_at", "2014-04-10 11:47:46.061786"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:47:46.063962"], ["points", 1], ["updated_at", "2014-04-10 11:47:46.063962"]] SQL (0.1ms) UPDATE "gamification_medals" SET "goal_id" = ?, "updated_at" = ? WHERE "gamification_medals"."id" = 1 [["goal_id", 1], ["updated_at", "2014-04-10 11:47:46.064791"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:47:46.067831"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:47:46.067831"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:47:46.073582"], ["points", 1], ["updated_at", "2014-04-10 11:47:46.073582"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:47:46.075495"], ["points", 1], ["updated_at", "2014-04-10 11:47:46.075495"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:47:46.077425"], ["description", "Harum sunt illo minus."], ["goal_id", 1], ["image", nil], ["name", "neque"], ["updated_at", "2014-04-10 11:47:46.077425"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:47:46.079782"], ["goal_id", 1], ["updated_at", "2014-04-10 11:47:46.079782"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:47:46.082150"], ["goal_id", 2], ["updated_at", "2014-04-10 11:47:46.082150"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:47:46.084688"], ["updated_at", "2014-04-10 11:47:46.084688"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."seen_at" IS NULL  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:47:46.084688"], ["points", 1], ["updated_at", "2014-04-10 11:47:46.084688"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:47:46.084688"], ["points", 1], ["updated_at", "2014-04-10 11:47:46.084688"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:47:46.084688"], ["description", "Harum sunt illo minus."], ["goal_id", 1], ["image", nil], ["name", "neque"], ["updated_at", "2014-04-10 11:47:46.084688"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:47:46.084688"], ["goal_id", 1], ["updated_at", "2014-04-10 11:47:46.084688"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:47:46.084688"], ["goal_id", 2], ["updated_at", "2014-04-10 11:47:46.084688"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 2]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:47:46.084688"], ["seen_at", "2014-04-08 11:47:46.084688"], ["updated_at", "2014-04-10 11:47:46.084688"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:47:46.084688"], ["updated_at", "2014-04-10 11:47:46.084688"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:47:46.084688"], ["seen_at", "2014-04-08 11:47:46.084688"], ["updated_at", "2014-04-10 11:47:46.084688"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE ("gamification_rewards"."seen_at" IS NOT NULL)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:47:46.084688"], ["updated_at", "2014-04-10 11:47:46.084688"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:47:46.084688"], ["updated_at", "2014-04-10 11:47:46.084688"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:47:46.084688"], ["points", 1], ["updated_at", "2014-04-10 11:47:46.084688"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:47:46.084688"], ["updated_at", "2014-04-10 11:47:46.084688"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:47:46.084688"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:47:46.084688"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:47:46.084688"], ["points", 1], ["updated_at", "2014-04-10 11:47:46.084688"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:47:46.084688"], ["updated_at", "2014-04-10 11:47:46.084688"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:47:46.084688"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:47:46.084688"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:47:46.084688"], ["points", 1], ["updated_at", "2014-04-10 11:47:46.084688"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:47:46.084688"], ["points", 1], ["updated_at", "2014-04-10 11:47:46.084688"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:47:46.084688"], ["updated_at", "2014-04-10 11:47:46.084688"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:47:46.084688"], ["points", 1], ["updated_at", "2014-04-10 11:47:46.084688"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:47:46.084688"], ["points", 1], ["updated_at", "2014-04-10 11:47:46.084688"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:47:46.084688"], ["updated_at", "2014-04-10 11:47:46.084688"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:47:46.084688"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:47:46.084688"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:47:46.084688"], ["points", 1], ["updated_at", "2014-04-10 11:47:46.084688"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:47:46.084688"], ["updated_at", "2014-04-10 11:47:46.084688"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:47:46.084688"], ["points", 1], ["updated_at", "2014-04-10 11:47:46.084688"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:47:46.084688"], ["updated_at", "2014-04-10 11:47:46.084688"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:47:46.084688"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:47:46.084688"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:47:46.084688"], ["points", 1], ["updated_at", "2014-04-10 11:47:46.084688"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:47:46.084688"], ["points", 1], ["updated_at", "2014-04-10 11:47:46.084688"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:47:46.084688"], ["points", 1], ["updated_at", "2014-04-10 11:47:46.084688"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:47:46.084688"], ["updated_at", "2014-04-10 11:47:46.084688"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:47:46.084688"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:47:46.084688"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:47:46.084688"], ["goal_id", 2], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:47:46.084688"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 3) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:47:46.084688"], ["goal_id", 3], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:47:46.084688"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:47:46.084688"], ["updated_at", "2014-04-10 11:47:46.084688"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-04-10 11:47:46.084688"], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:47:46.084688"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "gamification_rewards" SET "updated_at" = '2014-04-10 11:47:46.084688', "seen_at" = '2014-04-10 11:47:46.084688' WHERE "gamification_rewards"."id" = 1  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.3ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:48:06.217731"], ["updated_at", "2014-04-10 11:48:06.217731"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:48:06.224620"], ["updated_at", "2014-04-10 11:48:06.224620"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (1.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:48:06.248005"], ["points", 1], ["updated_at", "2014-04-10 11:48:06.248005"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:48:06.250063"], ["points", 1], ["updated_at", "2014-04-10 11:48:06.250063"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:48:06.251328"], ["points", 1], ["updated_at", "2014-04-10 11:48:06.251328"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:48:06.252340"], ["updated_at", "2014-04-10 11:48:06.252340"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.2ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:48:06.306896"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:48:06.306896"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.2ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:48:06.320648"], ["goal_id", 2], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:48:06.320648"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 3) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:48:06.323042"], ["goal_id", 3], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:48:06.323042"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:48:06.326460"], ["points", 1], ["updated_at", "2014-04-10 11:48:06.326460"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:48:06.327838"], ["updated_at", "2014-04-10 11:48:06.327838"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:48:06.330597"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:48:06.330597"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:48:06.334456"], ["points", 1], ["updated_at", "2014-04-10 11:48:06.334456"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:48:06.336152"], ["updated_at", "2014-04-10 11:48:06.336152"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:48:06.338947"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:48:06.338947"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:48:06.345063"], ["points", 1], ["updated_at", "2014-04-10 11:48:06.345063"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:48:06.348775"], ["points", 1], ["updated_at", "2014-04-10 11:48:06.348775"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:48:06.351454"], ["updated_at", "2014-04-10 11:48:06.351454"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:48:06.354292"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:48:06.354292"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:48:06.358947"], ["points", 1], ["updated_at", "2014-04-10 11:48:06.358947"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:48:06.360378"], ["updated_at", "2014-04-10 11:48:06.360378"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:48:06.363539"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:48:06.363539"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:48:06.367557"], ["points", 1], ["updated_at", "2014-04-10 11:48:06.367557"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:48:06.369607"], ["updated_at", "2014-04-10 11:48:06.369607"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:48:06.374011"], ["points", 1], ["updated_at", "2014-04-10 11:48:06.374011"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:48:06.375627"], ["points", 1], ["updated_at", "2014-04-10 11:48:06.375627"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:48:06.376933"], ["updated_at", "2014-04-10 11:48:06.376933"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.2ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:48:06.383649"], ["updated_at", "2014-04-10 11:48:06.383649"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."seen_at" IS NULL  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:48:06.388487"], ["points", 1], ["updated_at", "2014-04-10 11:48:06.388487"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:48:06.390582"], ["points", 1], ["updated_at", "2014-04-10 11:48:06.390582"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:48:06.400726"], ["description", "Nostrum porro sed ipsum libero repellendus sequi ex."], ["goal_id", 1], ["image", nil], ["name", "aliquid"], ["updated_at", "2014-04-10 11:48:06.400726"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:48:06.403436"], ["goal_id", 1], ["updated_at", "2014-04-10 11:48:06.403436"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:48:06.406506"], ["goal_id", 2], ["updated_at", "2014-04-10 11:48:06.406506"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:48:06.409298"], ["updated_at", "2014-04-10 11:48:06.409298"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:48:06.409298"], ["seen_at", "2014-04-08 11:48:06.409298"], ["updated_at", "2014-04-10 11:48:06.409298"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:48:06.409298"], ["points", 1], ["updated_at", "2014-04-10 11:48:06.409298"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:48:06.409298"], ["points", 1], ["updated_at", "2014-04-10 11:48:06.409298"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:48:06.409298"], ["description", "Nostrum porro sed ipsum libero repellendus sequi ex."], ["goal_id", 1], ["image", nil], ["name", "aliquid"], ["updated_at", "2014-04-10 11:48:06.409298"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:48:06.409298"], ["goal_id", 1], ["updated_at", "2014-04-10 11:48:06.409298"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:48:06.409298"], ["goal_id", 2], ["updated_at", "2014-04-10 11:48:06.409298"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 2]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:48:06.409298"], ["seen_at", "2014-04-08 11:48:06.409298"], ["updated_at", "2014-04-10 11:48:06.409298"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE ("gamification_rewards"."seen_at" IS NOT NULL)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:48:06.409298"], ["updated_at", "2014-04-10 11:48:06.409298"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:48:06.409298"], ["description", "Nostrum porro sed ipsum libero repellendus sequi ex."], ["image", nil], ["name", "aliquid"], ["updated_at", "2014-04-10 11:48:06.409298"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:48:06.409298"], ["points", 1], ["updated_at", "2014-04-10 11:48:06.409298"]] SQL (0.0ms) UPDATE "gamification_medals" SET "goal_id" = ? WHERE "gamification_medals"."id" = 1 [["goal_id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:48:06.409298"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:48:06.409298"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:48:06.409298"], ["updated_at", "2014-04-10 11:48:06.409298"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-04-10 11:48:06.409298"], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:48:06.409298"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "gamification_rewards" SET "updated_at" = '2014-04-10 11:48:06.409298', "seen_at" = '2014-04-10 11:48:06.409298' WHERE "gamification_rewards"."id" = 1  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:48:06.409298"], ["updated_at", "2014-04-10 11:48:06.409298"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ArticlesController#show as HTML Parameters: {"id"=>"1"} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Completed 200 OK in 0ms (Views: 0.0ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:48:06.409298"], ["points", 100], ["updated_at", "2014-04-10 11:48:06.409298"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:48:06.409298"], ["goal_id", 1], ["updated_at", "2014-04-10 11:48:06.409298"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:48:06.409298"], ["description", "Nostrum porro sed ipsum libero repellendus sequi ex."], ["goal_id", 1], ["image", nil], ["name", "aliquid"], ["updated_at", "2014-04-10 11:48:06.409298"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:48:06.409298"], ["points", 100], ["updated_at", "2014-04-10 11:48:06.409298"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:48:06.409298"], ["goal_id", 1], ["updated_at", "2014-04-10 11:48:06.409298"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:48:06.409298"], ["description", "Nostrum porro sed ipsum libero repellendus sequi ex."], ["goal_id", 1], ["image", nil], ["name", "aliquid"], ["updated_at", "2014-04-10 11:48:06.409298"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:48:06.409298"], ["points", 100], ["updated_at", "2014-04-10 11:48:06.409298"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:48:06.409298"], ["goal_id", 1], ["updated_at", "2014-04-10 11:48:06.409298"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:48:06.409298"], ["description", "Nostrum porro sed ipsum libero repellendus sequi ex."], ["goal_id", 1], ["image", nil], ["name", "aliquid"], ["updated_at", "2014-04-10 11:48:06.409298"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:48:06.409298"], ["updated_at", "2014-04-10 11:48:06.409298"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:48:06.409298"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-04-10 11:48:06.409298"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:48:06.409298"], ["updated_at", "2014-04-10 11:48:06.409298"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:48:06.409298"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:48:06.409298"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:48:06.409298"], ["updated_at", "2014-04-10 11:48:06.409298"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:48:06.409298"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-04-10 11:48:06.409298"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:48:06.409298"], ["updated_at", "2014-04-10 11:48:06.409298"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:48:06.409298"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:48:06.409298"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:48:06.409298"], ["points", 1], ["updated_at", "2014-04-10 11:48:06.409298"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:48:06.409298"], ["updated_at", "2014-04-10 11:48:06.409298"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:48:06.409298"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:48:06.409298"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:48:06.409298"], ["points", 1], ["updated_at", "2014-04-10 11:48:06.409298"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:48:06.409298"], ["updated_at", "2014-04-10 11:48:06.409298"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:48:06.409298"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:48:06.409298"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.3ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:48:59.428708"], ["updated_at", "2014-04-10 11:48:59.428708"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "gamification_medals" ("created_at", "description", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:48:59.447429"], ["description", "Velit et nam quos harum non facilis."], ["image", nil], ["name", "quidem"], ["updated_at", "2014-04-10 11:48:59.447429"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:48:59.459447"], ["points", 1], ["updated_at", "2014-04-10 11:48:59.459447"]] SQL (0.1ms) UPDATE "gamification_medals" SET "goal_id" = ?, "updated_at" = ? WHERE "gamification_medals"."id" = 1 [["goal_id", 1], ["updated_at", "2014-04-10 11:48:59.460712"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.2ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:48:59.517179"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:48:59.517179"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.2ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]]  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:48:59.536398"], ["updated_at", "2014-04-10 11:48:59.536398"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ArticlesController#show as HTML Parameters: {"id"=>"1"} Article Load (0.2ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Rendered articles/show.html.erb within layouts/application (0.4ms) Completed 200 OK in 9ms (Views: 7.8ms | ActiveRecord: 0.2ms)  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:48:59.555945"], ["updated_at", "2014-04-10 11:48:59.555945"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:48:59.557827"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-04-10 11:48:59.557827"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:48:59.559282"], ["updated_at", "2014-04-10 11:48:59.559282"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.2ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:48:59.574613"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:48:59.574613"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 15ms (ActiveRecord: 1.0ms)  (0.1ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:48:59.580368"], ["updated_at", "2014-04-10 11:48:59.580368"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:48:59.582268"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-04-10 11:48:59.582268"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:48:59.583758"], ["updated_at", "2014-04-10 11:48:59.583758"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:48:59.590880"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:48:59.590880"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 6ms (ActiveRecord: 0.6ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:48:59.596374"], ["points", 1], ["updated_at", "2014-04-10 11:48:59.596374"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:48:59.598216"], ["updated_at", "2014-04-10 11:48:59.598216"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:48:59.604597"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:48:59.604597"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 5ms (ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:48:59.609013"], ["points", 1], ["updated_at", "2014-04-10 11:48:59.609013"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:48:59.610485"], ["updated_at", "2014-04-10 11:48:59.610485"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:48:59.617356"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:48:59.617356"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 6ms (ActiveRecord: 0.5ms)  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:48:59.622144"], ["updated_at", "2014-04-10 11:48:59.622144"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.5ms) INSERT INTO "gamification_rewards" ("created_at", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-04-10 11:48:59.625694"], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:48:59.625694"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "gamification_rewards" SET "updated_at" = '2014-04-10 11:48:59.630989', "seen_at" = '2014-04-10 11:48:59.630989' WHERE "gamification_rewards"."id" = 1  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:48:59.635333"], ["points", 100], ["updated_at", "2014-04-10 11:48:59.635333"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:48:59.637712"], ["goal_id", 1], ["updated_at", "2014-04-10 11:48:59.637712"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:48:59.639703"], ["description", "Velit et nam quos harum non facilis."], ["goal_id", 1], ["image", nil], ["name", "quidem"], ["updated_at", "2014-04-10 11:48:59.639703"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (2.9ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:48:59.654584"], ["points", 100], ["updated_at", "2014-04-10 11:48:59.654584"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.5ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:48:59.657089"], ["goal_id", 1], ["updated_at", "2014-04-10 11:48:59.657089"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:48:59.659958"], ["description", "Velit et nam quos harum non facilis."], ["goal_id", 1], ["image", nil], ["name", "quidem"], ["updated_at", "2014-04-10 11:48:59.659958"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (1.9ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:48:59.669874"], ["points", 100], ["updated_at", "2014-04-10 11:48:59.669874"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:48:59.672307"], ["goal_id", 1], ["updated_at", "2014-04-10 11:48:59.672307"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:48:59.674425"], ["description", "Velit et nam quos harum non facilis."], ["goal_id", 1], ["image", nil], ["name", "quidem"], ["updated_at", "2014-04-10 11:48:59.674425"]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (1.9ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:48:59.688611"], ["points", 1], ["updated_at", "2014-04-10 11:48:59.688611"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:48:59.690136"], ["points", 1], ["updated_at", "2014-04-10 11:48:59.690136"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:48:59.691409"], ["updated_at", "2014-04-10 11:48:59.691409"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:48:59.694159"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:48:59.694159"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:48:59.699171"], ["points", 1], ["updated_at", "2014-04-10 11:48:59.699171"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:48:59.700729"], ["updated_at", "2014-04-10 11:48:59.700729"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:48:59.703163"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:48:59.703163"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:48:59.708193"], ["points", 1], ["updated_at", "2014-04-10 11:48:59.708193"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:48:59.710068"], ["updated_at", "2014-04-10 11:48:59.710068"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:48:59.714338"], ["points", 1], ["updated_at", "2014-04-10 11:48:59.714338"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:48:59.715753"], ["points", 1], ["updated_at", "2014-04-10 11:48:59.715753"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:48:59.716944"], ["updated_at", "2014-04-10 11:48:59.716944"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:48:59.721628"], ["points", 1], ["updated_at", "2014-04-10 11:48:59.721628"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:48:59.723154"], ["updated_at", "2014-04-10 11:48:59.723154"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:48:59.726128"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:48:59.726128"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:48:59.731233"], ["points", 1], ["updated_at", "2014-04-10 11:48:59.731233"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:48:59.732881"], ["updated_at", "2014-04-10 11:48:59.732881"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:48:59.735246"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:48:59.735246"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:48:59.740796"], ["points", 1], ["updated_at", "2014-04-10 11:48:59.740796"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:48:59.742229"], ["points", 1], ["updated_at", "2014-04-10 11:48:59.742229"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:48:59.743756"], ["points", 1], ["updated_at", "2014-04-10 11:48:59.743756"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:48:59.744915"], ["updated_at", "2014-04-10 11:48:59.744915"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:48:59.747330"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:48:59.747330"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:48:59.751970"], ["goal_id", 2], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:48:59.751970"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 3) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:48:59.754530"], ["goal_id", 3], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:48:59.754530"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:48:59.757003"], ["points", 1], ["updated_at", "2014-04-10 11:48:59.757003"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:48:59.757003"], ["points", 1], ["updated_at", "2014-04-10 11:48:59.757003"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:48:59.757003"], ["description", "Velit et nam quos harum non facilis."], ["goal_id", 1], ["image", nil], ["name", "quidem"], ["updated_at", "2014-04-10 11:48:59.757003"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:48:59.757003"], ["goal_id", 1], ["updated_at", "2014-04-10 11:48:59.757003"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:48:59.757003"], ["goal_id", 2], ["updated_at", "2014-04-10 11:48:59.757003"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:48:59.757003"], ["updated_at", "2014-04-10 11:48:59.757003"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."seen_at" IS NULL  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:48:59.757003"], ["seen_at", "2014-04-08 11:48:59.757003"], ["updated_at", "2014-04-10 11:48:59.757003"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE ("gamification_rewards"."seen_at" IS NOT NULL)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:48:59.757003"], ["updated_at", "2014-04-10 11:48:59.757003"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:48:59.757003"], ["seen_at", "2014-04-08 11:48:59.757003"], ["updated_at", "2014-04-10 11:48:59.757003"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:48:59.757003"], ["points", 1], ["updated_at", "2014-04-10 11:48:59.757003"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:48:59.757003"], ["points", 1], ["updated_at", "2014-04-10 11:48:59.757003"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:48:59.757003"], ["description", "Velit et nam quos harum non facilis."], ["goal_id", 1], ["image", nil], ["name", "quidem"], ["updated_at", "2014-04-10 11:48:59.757003"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:48:59.757003"], ["goal_id", 1], ["updated_at", "2014-04-10 11:48:59.757003"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:48:59.757003"], ["goal_id", 2], ["updated_at", "2014-04-10 11:48:59.757003"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:48:59.757003"], ["updated_at", "2014-04-10 11:48:59.757003"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:48:59.757003"], ["updated_at", "2014-04-10 11:48:59.757003"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.3ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:49:10.572921"], ["points", 100], ["updated_at", "2014-04-10 11:49:10.572921"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:49:10.588592"], ["goal_id", 1], ["updated_at", "2014-04-10 11:49:10.588592"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:49:10.635624"], ["description", "Nulla eaque temporibus consequatur exercitationem ipsa deleniti."], ["goal_id", 1], ["image", nil], ["name", "velit"], ["updated_at", "2014-04-10 11:49:10.635624"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (6.7ms)  (2.0ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:49:10.655625"], ["points", 100], ["updated_at", "2014-04-10 11:49:10.655625"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:49:10.658225"], ["goal_id", 1], ["updated_at", "2014-04-10 11:49:10.658225"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:49:10.660215"], ["description", "Nulla eaque temporibus consequatur exercitationem ipsa deleniti."], ["goal_id", 1], ["image", nil], ["name", "velit"], ["updated_at", "2014-04-10 11:49:10.660215"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (1.7ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:49:10.669561"], ["points", 100], ["updated_at", "2014-04-10 11:49:10.669561"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:49:10.671894"], ["goal_id", 1], ["updated_at", "2014-04-10 11:49:10.671894"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:49:10.673831"], ["description", "Nulla eaque temporibus consequatur exercitationem ipsa deleniti."], ["goal_id", 1], ["image", nil], ["name", "velit"], ["updated_at", "2014-04-10 11:49:10.673831"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (1.6ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:49:10.682106"], ["points", 1], ["updated_at", "2014-04-10 11:49:10.682106"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:49:10.682106"], ["points", 1], ["updated_at", "2014-04-10 11:49:10.682106"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:49:10.682106"], ["description", "Nulla eaque temporibus consequatur exercitationem ipsa deleniti."], ["goal_id", 1], ["image", nil], ["name", "velit"], ["updated_at", "2014-04-10 11:49:10.682106"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:49:10.682106"], ["goal_id", 1], ["updated_at", "2014-04-10 11:49:10.682106"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:49:10.682106"], ["goal_id", 2], ["updated_at", "2014-04-10 11:49:10.682106"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:49:10.682106"], ["seen_at", "2014-04-08 11:49:10.682106"], ["updated_at", "2014-04-10 11:49:10.682106"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE ("gamification_rewards"."seen_at" IS NOT NULL)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:49:10.682106"], ["points", 1], ["updated_at", "2014-04-10 11:49:10.682106"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:49:10.682106"], ["points", 1], ["updated_at", "2014-04-10 11:49:10.682106"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:49:10.682106"], ["description", "Nulla eaque temporibus consequatur exercitationem ipsa deleniti."], ["goal_id", 1], ["image", nil], ["name", "velit"], ["updated_at", "2014-04-10 11:49:10.682106"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:49:10.682106"], ["goal_id", 1], ["updated_at", "2014-04-10 11:49:10.682106"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:49:10.682106"], ["goal_id", 2], ["updated_at", "2014-04-10 11:49:10.682106"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 2]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:49:10.682106"], ["updated_at", "2014-04-10 11:49:10.682106"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."seen_at" IS NULL  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:49:10.682106"], ["updated_at", "2014-04-10 11:49:10.682106"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:49:10.682106"], ["seen_at", "2014-04-08 11:49:10.682106"], ["updated_at", "2014-04-10 11:49:10.682106"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:49:10.682106"], ["updated_at", "2014-04-10 11:49:10.682106"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:49:10.682106"], ["description", "Nulla eaque temporibus consequatur exercitationem ipsa deleniti."], ["image", nil], ["name", "velit"], ["updated_at", "2014-04-10 11:49:10.682106"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:49:10.682106"], ["points", 1], ["updated_at", "2014-04-10 11:49:10.682106"]] SQL (0.0ms) UPDATE "gamification_medals" SET "goal_id" = ? WHERE "gamification_medals"."id" = 1 [["goal_id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:49:10.682106"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:49:10.682106"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:49:10.682106"], ["updated_at", "2014-04-10 11:49:10.682106"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:49:10.682106"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-04-10 11:49:10.682106"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:49:10.682106"], ["updated_at", "2014-04-10 11:49:10.682106"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:49:10.682106"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:49:10.682106"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:49:10.682106"], ["updated_at", "2014-04-10 11:49:10.682106"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:49:10.682106"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-04-10 11:49:10.682106"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:49:10.682106"], ["updated_at", "2014-04-10 11:49:10.682106"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:49:10.682106"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:49:10.682106"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:49:10.682106"], ["points", 1], ["updated_at", "2014-04-10 11:49:10.682106"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:49:10.682106"], ["updated_at", "2014-04-10 11:49:10.682106"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:49:10.682106"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:49:10.682106"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:49:10.682106"], ["points", 1], ["updated_at", "2014-04-10 11:49:10.682106"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:49:10.682106"], ["updated_at", "2014-04-10 11:49:10.682106"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:49:10.682106"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:49:10.682106"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:49:10.682106"], ["updated_at", "2014-04-10 11:49:10.682106"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-04-10 11:49:10.682106"], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:49:10.682106"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "gamification_rewards" SET "updated_at" = '2014-04-10 11:49:10.682106', "seen_at" = '2014-04-10 11:49:10.682106' WHERE "gamification_rewards"."id" = 1  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:49:10.682106"], ["updated_at", "2014-04-10 11:49:10.682106"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ArticlesController#show as HTML Parameters: {"id"=>"1"} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Completed 200 OK in 0ms (Views: 0.0ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:49:10.682106"], ["updated_at", "2014-04-10 11:49:10.682106"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:49:10.682106"], ["updated_at", "2014-04-10 11:49:10.682106"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:49:10.682106"], ["points", 1], ["updated_at", "2014-04-10 11:49:10.682106"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:49:10.682106"], ["points", 1], ["updated_at", "2014-04-10 11:49:10.682106"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:49:10.682106"], ["updated_at", "2014-04-10 11:49:10.682106"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:49:10.682106"], ["points", 1], ["updated_at", "2014-04-10 11:49:10.682106"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:49:10.682106"], ["updated_at", "2014-04-10 11:49:10.682106"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:49:10.682106"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:49:10.682106"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:49:10.682106"], ["points", 1], ["updated_at", "2014-04-10 11:49:10.682106"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:49:10.682106"], ["updated_at", "2014-04-10 11:49:10.682106"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:49:10.682106"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:49:10.682106"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:49:10.682106"], ["points", 1], ["updated_at", "2014-04-10 11:49:10.682106"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:49:10.682106"], ["points", 1], ["updated_at", "2014-04-10 11:49:10.682106"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:49:10.682106"], ["points", 1], ["updated_at", "2014-04-10 11:49:10.682106"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:49:10.682106"], ["updated_at", "2014-04-10 11:49:10.682106"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:49:10.682106"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:49:10.682106"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:49:10.682106"], ["goal_id", 2], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:49:10.682106"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 3) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:49:10.682106"], ["goal_id", 3], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:49:10.682106"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:49:10.682106"], ["points", 1], ["updated_at", "2014-04-10 11:49:10.682106"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:49:10.682106"], ["updated_at", "2014-04-10 11:49:10.682106"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:49:10.682106"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:49:10.682106"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:49:10.682106"], ["points", 1], ["updated_at", "2014-04-10 11:49:10.682106"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:49:10.682106"], ["updated_at", "2014-04-10 11:49:10.682106"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:49:10.682106"], ["points", 1], ["updated_at", "2014-04-10 11:49:10.682106"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:49:10.682106"], ["points", 1], ["updated_at", "2014-04-10 11:49:10.682106"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:49:10.682106"], ["updated_at", "2014-04-10 11:49:10.682106"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:49:10.682106"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:49:10.682106"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) rollback transaction  (0.3ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:50:10.331149"], ["points", 1], ["updated_at", "2014-04-10 11:50:10.331149"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:50:10.335303"], ["updated_at", "2014-04-10 11:50:10.335303"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.2ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:50:10.354570"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:50:10.354570"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.2ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (2.0ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:50:10.408876"], ["points", 1], ["updated_at", "2014-04-10 11:50:10.408876"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:50:10.410406"], ["updated_at", "2014-04-10 11:50:10.410406"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:50:10.414076"], ["points", 1], ["updated_at", "2014-04-10 11:50:10.414076"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:50:10.415405"], ["points", 1], ["updated_at", "2014-04-10 11:50:10.415405"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:50:10.416648"], ["updated_at", "2014-04-10 11:50:10.416648"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:50:10.421471"], ["points", 1], ["updated_at", "2014-04-10 11:50:10.421471"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:50:10.422837"], ["points", 1], ["updated_at", "2014-04-10 11:50:10.422837"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:50:10.423999"], ["points", 1], ["updated_at", "2014-04-10 11:50:10.423999"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:50:10.424985"], ["updated_at", "2014-04-10 11:50:10.424985"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:50:10.426976"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:50:10.426976"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:50:10.430558"], ["goal_id", 2], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:50:10.430558"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 3) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:50:10.432724"], ["goal_id", 3], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:50:10.432724"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:50:10.435594"], ["points", 1], ["updated_at", "2014-04-10 11:50:10.435594"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:50:10.436921"], ["points", 1], ["updated_at", "2014-04-10 11:50:10.436921"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:50:10.438073"], ["updated_at", "2014-04-10 11:50:10.438073"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:50:10.440318"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:50:10.440318"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:50:10.445748"], ["points", 1], ["updated_at", "2014-04-10 11:50:10.445748"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:50:10.447270"], ["updated_at", "2014-04-10 11:50:10.447270"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:50:10.449987"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:50:10.449987"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:50:10.453536"], ["points", 1], ["updated_at", "2014-04-10 11:50:10.453536"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:50:10.454932"], ["updated_at", "2014-04-10 11:50:10.454932"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:50:10.457182"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:50:10.457182"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:50:10.465257"], ["points", 100], ["updated_at", "2014-04-10 11:50:10.465257"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:50:10.467753"], ["goal_id", 1], ["updated_at", "2014-04-10 11:50:10.467753"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:50:10.478271"], ["description", "Incidunt velit voluptatem voluptatum."], ["goal_id", 1], ["image", nil], ["name", "commodi"], ["updated_at", "2014-04-10 11:50:10.478271"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.2ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (5.0ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:50:10.495836"], ["points", 100], ["updated_at", "2014-04-10 11:50:10.495836"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:50:10.498375"], ["goal_id", 1], ["updated_at", "2014-04-10 11:50:10.498375"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:50:10.501160"], ["description", "Incidunt velit voluptatem voluptatum."], ["goal_id", 1], ["image", nil], ["name", "commodi"], ["updated_at", "2014-04-10 11:50:10.501160"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (2.5ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:50:10.513646"], ["points", 100], ["updated_at", "2014-04-10 11:50:10.513646"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:50:10.516611"], ["goal_id", 1], ["updated_at", "2014-04-10 11:50:10.516611"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:50:10.518653"], ["description", "Incidunt velit voluptatem voluptatum."], ["goal_id", 1], ["image", nil], ["name", "commodi"], ["updated_at", "2014-04-10 11:50:10.518653"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (1.5ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:50:10.528592"], ["updated_at", "2014-04-10 11:50:10.528592"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ArticlesController#show as HTML Parameters: {"id"=>"1"} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Completed 200 OK in 4ms (Views: 3.0ms | ActiveRecord: 0.1ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:50:10.542274"], ["updated_at", "2014-04-10 11:50:10.542274"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.4ms) INSERT INTO "gamification_rewards" ("created_at", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-04-10 11:50:10.544820"], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:50:10.544820"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "gamification_rewards" SET "updated_at" = '2014-04-10 11:50:10.548929', "seen_at" = '2014-04-10 11:50:10.548929' WHERE "gamification_rewards"."id" = 1  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:50:10.552513"], ["updated_at", "2014-04-10 11:50:10.552513"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "gamification_medals" ("created_at", "description", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:50:10.554999"], ["description", "Incidunt velit voluptatem voluptatum."], ["image", nil], ["name", "commodi"], ["updated_at", "2014-04-10 11:50:10.554999"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:50:10.557939"], ["points", 1], ["updated_at", "2014-04-10 11:50:10.557939"]] SQL (0.3ms) UPDATE "gamification_medals" SET "goal_id" = ?, "updated_at" = ? WHERE "gamification_medals"."id" = 1 [["goal_id", 1], ["updated_at", "2014-04-10 11:50:10.559148"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:50:10.562906"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:50:10.562906"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]]  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:50:10.569134"], ["updated_at", "2014-04-10 11:50:10.569134"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:50:10.570877"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-04-10 11:50:10.570877"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:50:10.572391"], ["updated_at", "2014-04-10 11:50:10.572391"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:50:10.581246"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:50:10.581246"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 7ms (ActiveRecord: 0.7ms)  (0.1ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:50:10.585657"], ["updated_at", "2014-04-10 11:50:10.585657"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:50:10.587767"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-04-10 11:50:10.587767"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:50:10.589950"], ["updated_at", "2014-04-10 11:50:10.589950"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:50:10.599691"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:50:10.599691"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 8ms (ActiveRecord: 0.7ms)  (0.6ms) rollback transaction  (0.2ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:50:10.606265"], ["points", 1], ["updated_at", "2014-04-10 11:50:10.606265"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:50:10.608014"], ["updated_at", "2014-04-10 11:50:10.608014"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:50:10.614131"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:50:10.614131"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 5ms (ActiveRecord: 0.4ms)  (0.1ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:50:10.618566"], ["points", 1], ["updated_at", "2014-04-10 11:50:10.618566"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:50:10.620541"], ["updated_at", "2014-04-10 11:50:10.620541"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:50:10.627257"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:50:10.627257"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 5ms (ActiveRecord: 0.5ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:50:10.632161"], ["updated_at", "2014-04-10 11:50:10.632161"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:50:10.633618"], ["updated_at", "2014-04-10 11:50:10.633618"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:50:10.637967"], ["points", 1], ["updated_at", "2014-04-10 11:50:10.637967"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:50:10.637967"], ["points", 1], ["updated_at", "2014-04-10 11:50:10.637967"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:50:10.637967"], ["description", "Incidunt velit voluptatem voluptatum."], ["goal_id", 1], ["image", nil], ["name", "commodi"], ["updated_at", "2014-04-10 11:50:10.637967"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:50:10.637967"], ["goal_id", 1], ["updated_at", "2014-04-10 11:50:10.637967"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:50:10.637967"], ["goal_id", 2], ["updated_at", "2014-04-10 11:50:10.637967"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:50:10.637967"], ["updated_at", "2014-04-10 11:50:10.637967"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."seen_at" IS NULL  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:50:10.637967"], ["seen_at", "2014-04-08 11:50:10.637967"], ["updated_at", "2014-04-10 11:50:10.637967"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE ("gamification_rewards"."seen_at" IS NOT NULL)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:50:10.637967"], ["points", 1], ["updated_at", "2014-04-10 11:50:10.637967"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:50:10.637967"], ["points", 1], ["updated_at", "2014-04-10 11:50:10.637967"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:50:10.637967"], ["description", "Incidunt velit voluptatem voluptatum."], ["goal_id", 1], ["image", nil], ["name", "commodi"], ["updated_at", "2014-04-10 11:50:10.637967"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:50:10.637967"], ["goal_id", 1], ["updated_at", "2014-04-10 11:50:10.637967"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:50:10.637967"], ["goal_id", 2], ["updated_at", "2014-04-10 11:50:10.637967"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:50:10.637967"], ["updated_at", "2014-04-10 11:50:10.637967"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:50:10.637967"], ["seen_at", "2014-04-08 11:50:10.637967"], ["updated_at", "2014-04-10 11:50:10.637967"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.3ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:50:32.933565"], ["updated_at", "2014-04-10 11:50:32.933565"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:50:32.946272"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-04-10 11:50:32.946272"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:50:32.950286"], ["updated_at", "2014-04-10 11:50:32.950286"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:50:33.025814"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:50:33.025814"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 70ms (ActiveRecord: 1.2ms)  (0.1ms) SELECT COUNT(*) FROM "gamification_rewards"  (2.0ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:50:33.032872"], ["updated_at", "2014-04-10 11:50:33.032872"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:50:33.034848"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-04-10 11:50:33.034848"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:50:33.037675"], ["updated_at", "2014-04-10 11:50:33.037675"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:50:33.045375"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:50:33.045375"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 6ms (ActiveRecord: 0.5ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:50:33.049595"], ["points", 1], ["updated_at", "2014-04-10 11:50:33.049595"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:50:33.051030"], ["updated_at", "2014-04-10 11:50:33.051030"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:50:33.056742"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:50:33.056742"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 5ms (ActiveRecord: 0.5ms)  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:50:33.061036"], ["points", 1], ["updated_at", "2014-04-10 11:50:33.061036"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:50:33.062648"], ["updated_at", "2014-04-10 11:50:33.062648"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:50:33.070623"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:50:33.070623"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 6ms (ActiveRecord: 0.6ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:50:33.075791"], ["updated_at", "2014-04-10 11:50:33.075791"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:50:33.077705"], ["updated_at", "2014-04-10 11:50:33.077705"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:50:33.085887"], ["points", 100], ["updated_at", "2014-04-10 11:50:33.085887"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:50:33.088658"], ["goal_id", 1], ["updated_at", "2014-04-10 11:50:33.088658"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:50:33.098680"], ["description", "Voluptatem fuga voluptatibus impedit in quo voluptatem ab."], ["goal_id", 1], ["image", nil], ["name", "et"], ["updated_at", "2014-04-10 11:50:33.098680"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.2ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (4.4ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:50:33.115428"], ["points", 100], ["updated_at", "2014-04-10 11:50:33.115428"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:50:33.118092"], ["goal_id", 1], ["updated_at", "2014-04-10 11:50:33.118092"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:50:33.120256"], ["description", "Voluptatem fuga voluptatibus impedit in quo voluptatem ab."], ["goal_id", 1], ["image", nil], ["name", "et"], ["updated_at", "2014-04-10 11:50:33.120256"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (2.4ms)  (0.7ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:50:33.131444"], ["points", 100], ["updated_at", "2014-04-10 11:50:33.131444"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:50:33.134183"], ["goal_id", 1], ["updated_at", "2014-04-10 11:50:33.134183"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:50:33.136137"], ["description", "Voluptatem fuga voluptatibus impedit in quo voluptatem ab."], ["goal_id", 1], ["image", nil], ["name", "et"], ["updated_at", "2014-04-10 11:50:33.136137"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (1.6ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:50:33.146062"], ["updated_at", "2014-04-10 11:50:33.146062"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-04-10 11:50:33.148593"], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:50:33.148593"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "gamification_rewards" SET "updated_at" = '2014-04-10 11:50:33.152377', "seen_at" = '2014-04-10 11:50:33.152377' WHERE "gamification_rewards"."id" = 1  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:50:33.155966"], ["updated_at", "2014-04-10 11:50:33.155966"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_medals" ("created_at", "description", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:50:33.157954"], ["description", "Voluptatem fuga voluptatibus impedit in quo voluptatem ab."], ["image", nil], ["name", "et"], ["updated_at", "2014-04-10 11:50:33.157954"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:50:33.159910"], ["points", 1], ["updated_at", "2014-04-10 11:50:33.159910"]] SQL (0.1ms) UPDATE "gamification_medals" SET "goal_id" = ?, "updated_at" = ? WHERE "gamification_medals"."id" = 1 [["goal_id", 1], ["updated_at", "2014-04-10 11:50:33.160743"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:50:33.163598"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:50:33.163598"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.2ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]]  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:50:33.171383"], ["seen_at", "2014-04-08 11:50:33.169700"], ["updated_at", "2014-04-10 11:50:33.171383"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE ("gamification_rewards"."seen_at" IS NOT NULL)  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:50:33.175099"], ["points", 1], ["updated_at", "2014-04-10 11:50:33.175099"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:50:33.176977"], ["points", 1], ["updated_at", "2014-04-10 11:50:33.176977"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:50:33.179722"], ["description", "Voluptatem fuga voluptatibus impedit in quo voluptatem ab."], ["goal_id", 1], ["image", nil], ["name", "et"], ["updated_at", "2014-04-10 11:50:33.179722"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:50:33.182757"], ["goal_id", 1], ["updated_at", "2014-04-10 11:50:33.182757"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:50:33.184866"], ["goal_id", 2], ["updated_at", "2014-04-10 11:50:33.184866"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 2]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 2]]  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:50:33.190822"], ["updated_at", "2014-04-10 11:50:33.190822"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."seen_at" IS NULL  (0.3ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:50:33.194668"], ["updated_at", "2014-04-10 11:50:33.194668"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.2ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:50:33.198538"], ["seen_at", "2014-04-08 11:50:33.196772"], ["updated_at", "2014-04-10 11:50:33.198538"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:50:33.201802"], ["points", 1], ["updated_at", "2014-04-10 11:50:33.201802"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:50:33.201802"], ["points", 1], ["updated_at", "2014-04-10 11:50:33.201802"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:50:33.201802"], ["description", "Voluptatem fuga voluptatibus impedit in quo voluptatem ab."], ["goal_id", 1], ["image", nil], ["name", "et"], ["updated_at", "2014-04-10 11:50:33.201802"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:50:33.201802"], ["goal_id", 1], ["updated_at", "2014-04-10 11:50:33.201802"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:50:33.201802"], ["goal_id", 2], ["updated_at", "2014-04-10 11:50:33.201802"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:50:33.201802"], ["points", 1], ["updated_at", "2014-04-10 11:50:33.201802"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:50:33.201802"], ["points", 1], ["updated_at", "2014-04-10 11:50:33.201802"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:50:33.201802"], ["points", 1], ["updated_at", "2014-04-10 11:50:33.201802"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:50:33.201802"], ["updated_at", "2014-04-10 11:50:33.201802"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:50:33.201802"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:50:33.201802"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:50:33.201802"], ["goal_id", 2], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:50:33.201802"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 3) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:50:33.201802"], ["goal_id", 3], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:50:33.201802"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:50:33.201802"], ["points", 1], ["updated_at", "2014-04-10 11:50:33.201802"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:50:33.201802"], ["updated_at", "2014-04-10 11:50:33.201802"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:50:33.201802"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:50:33.201802"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:50:33.201802"], ["points", 1], ["updated_at", "2014-04-10 11:50:33.201802"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:50:33.201802"], ["updated_at", "2014-04-10 11:50:33.201802"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:50:33.201802"], ["points", 1], ["updated_at", "2014-04-10 11:50:33.201802"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:50:33.201802"], ["points", 1], ["updated_at", "2014-04-10 11:50:33.201802"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:50:33.201802"], ["updated_at", "2014-04-10 11:50:33.201802"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:50:33.201802"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:50:33.201802"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:50:33.201802"], ["points", 1], ["updated_at", "2014-04-10 11:50:33.201802"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:50:33.201802"], ["points", 1], ["updated_at", "2014-04-10 11:50:33.201802"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:50:33.201802"], ["updated_at", "2014-04-10 11:50:33.201802"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:50:33.201802"], ["points", 1], ["updated_at", "2014-04-10 11:50:33.201802"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:50:33.201802"], ["updated_at", "2014-04-10 11:50:33.201802"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:50:33.201802"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:50:33.201802"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:50:33.201802"], ["points", 1], ["updated_at", "2014-04-10 11:50:33.201802"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:50:33.201802"], ["updated_at", "2014-04-10 11:50:33.201802"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:50:33.201802"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:50:33.201802"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:50:33.201802"], ["updated_at", "2014-04-10 11:50:33.201802"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ArticlesController#show as HTML Parameters: {"id"=>"1"} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Completed 200 OK in 0ms (Views: 0.0ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.3ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:51:27.315578"], ["points", 100], ["updated_at", "2014-04-10 11:51:27.315578"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (1.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:51:27.331363"], ["goal_id", 1], ["updated_at", "2014-04-10 11:51:27.331363"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:51:27.380949"], ["description", "Dolorum eveniet quaerat odio rerum."], ["goal_id", 1], ["image", nil], ["name", "sed"], ["updated_at", "2014-04-10 11:51:27.380949"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (6.3ms)  (2.0ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:51:27.399836"], ["points", 100], ["updated_at", "2014-04-10 11:51:27.399836"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:51:27.402237"], ["goal_id", 1], ["updated_at", "2014-04-10 11:51:27.402237"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:51:27.404073"], ["description", "Dolorum eveniet quaerat odio rerum."], ["goal_id", 1], ["image", nil], ["name", "sed"], ["updated_at", "2014-04-10 11:51:27.404073"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (1.6ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:51:27.413224"], ["points", 100], ["updated_at", "2014-04-10 11:51:27.413224"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:51:27.415484"], ["goal_id", 1], ["updated_at", "2014-04-10 11:51:27.415484"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:51:27.417425"], ["description", "Dolorum eveniet quaerat odio rerum."], ["goal_id", 1], ["image", nil], ["name", "sed"], ["updated_at", "2014-04-10 11:51:27.417425"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (1.6ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:51:27.427245"], ["updated_at", "2014-04-10 11:51:27.427245"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_medals" ("created_at", "description", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:51:27.431191"], ["description", "Dolorum eveniet quaerat odio rerum."], ["image", nil], ["name", "sed"], ["updated_at", "2014-04-10 11:51:27.431191"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:51:27.433028"], ["points", 1], ["updated_at", "2014-04-10 11:51:27.433028"]] SQL (0.2ms) UPDATE "gamification_medals" SET "goal_id" = ?, "updated_at" = ? WHERE "gamification_medals"."id" = 1 [["goal_id", 1], ["updated_at", "2014-04-10 11:51:27.434363"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:51:27.437676"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:51:27.437676"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.2ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]]  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:51:27.448250"], ["points", 1], ["updated_at", "2014-04-10 11:51:27.448250"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:51:27.449707"], ["points", 1], ["updated_at", "2014-04-10 11:51:27.449707"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:51:27.451171"], ["updated_at", "2014-04-10 11:51:27.451171"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.2ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:51:27.458959"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:51:27.458959"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.8ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:51:27.465328"], ["points", 1], ["updated_at", "2014-04-10 11:51:27.465328"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:51:27.466746"], ["updated_at", "2014-04-10 11:51:27.466746"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:51:27.468943"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:51:27.468943"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:51:27.473596"], ["points", 1], ["updated_at", "2014-04-10 11:51:27.473596"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:51:27.474979"], ["updated_at", "2014-04-10 11:51:27.474979"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:51:27.477444"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:51:27.477444"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:51:27.480851"], ["points", 1], ["updated_at", "2014-04-10 11:51:27.480851"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:51:27.482338"], ["updated_at", "2014-04-10 11:51:27.482338"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:51:27.486998"], ["points", 1], ["updated_at", "2014-04-10 11:51:27.486998"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:51:27.488506"], ["updated_at", "2014-04-10 11:51:27.488506"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:51:27.490946"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:51:27.490946"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:51:27.494926"], ["points", 1], ["updated_at", "2014-04-10 11:51:27.494926"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:51:27.496229"], ["points", 1], ["updated_at", "2014-04-10 11:51:27.496229"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:51:27.497426"], ["updated_at", "2014-04-10 11:51:27.497426"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:51:27.502138"], ["points", 1], ["updated_at", "2014-04-10 11:51:27.502138"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:51:27.503842"], ["points", 1], ["updated_at", "2014-04-10 11:51:27.503842"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:51:27.505212"], ["points", 1], ["updated_at", "2014-04-10 11:51:27.505212"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:51:27.506437"], ["updated_at", "2014-04-10 11:51:27.506437"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:51:27.508985"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:51:27.508985"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:51:27.513160"], ["goal_id", 2], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:51:27.513160"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 3]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 3) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:51:27.515426"], ["goal_id", 3], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:51:27.515426"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:51:27.519600"], ["updated_at", "2014-04-10 11:51:27.519600"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-04-10 11:51:27.522071"], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:51:27.522071"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "gamification_rewards" SET "updated_at" = '2014-04-10 11:51:27.526204', "seen_at" = '2014-04-10 11:51:27.526204' WHERE "gamification_rewards"."id" = 1  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:51:27.530748"], ["points", 1], ["updated_at", "2014-04-10 11:51:27.530748"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:51:27.532346"], ["updated_at", "2014-04-10 11:51:27.532346"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.4ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:51:27.540027"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:51:27.540027"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 7ms (ActiveRecord: 0.8ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:51:27.546290"], ["points", 1], ["updated_at", "2014-04-10 11:51:27.546290"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:51:27.547758"], ["updated_at", "2014-04-10 11:51:27.547758"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:51:27.554569"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:51:27.554569"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 6ms (ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:51:27.560825"], ["updated_at", "2014-04-10 11:51:27.560825"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:51:27.565065"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-04-10 11:51:27.565065"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:51:27.566730"], ["updated_at", "2014-04-10 11:51:27.566730"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:51:27.575475"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:51:27.575475"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 7ms (ActiveRecord: 0.7ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:51:27.579486"], ["updated_at", "2014-04-10 11:51:27.579486"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:51:27.581158"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-04-10 11:51:27.581158"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:51:27.582574"], ["updated_at", "2014-04-10 11:51:27.582574"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:51:27.590119"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-10 11:51:27.590119"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 7ms (ActiveRecord: 0.7ms)  (0.1ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.7ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:51:27.597535"], ["updated_at", "2014-04-10 11:51:27.597535"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ArticlesController#show as HTML Parameters: {"id"=>"1"} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Completed 200 OK in 4ms (Views: 3.2ms | ActiveRecord: 0.1ms)  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:51:27.609238"], ["seen_at", "2014-04-08 11:51:27.607545"], ["updated_at", "2014-04-10 11:51:27.609238"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE ("gamification_rewards"."seen_at" IS NOT NULL)  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:51:27.612260"], ["seen_at", "2014-04-08 11:51:27.612260"], ["updated_at", "2014-04-10 11:51:27.612260"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:51:27.612260"], ["updated_at", "2014-04-10 11:51:27.612260"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:51:27.612260"], ["points", 1], ["updated_at", "2014-04-10 11:51:27.612260"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:51:27.612260"], ["points", 1], ["updated_at", "2014-04-10 11:51:27.612260"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:51:27.612260"], ["description", "Dolorum eveniet quaerat odio rerum."], ["goal_id", 1], ["image", nil], ["name", "sed"], ["updated_at", "2014-04-10 11:51:27.612260"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:51:27.612260"], ["goal_id", 1], ["updated_at", "2014-04-10 11:51:27.612260"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:51:27.612260"], ["goal_id", 2], ["updated_at", "2014-04-10 11:51:27.612260"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 2]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:51:27.612260"], ["points", 1], ["updated_at", "2014-04-10 11:51:27.612260"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:51:27.612260"], ["points", 1], ["updated_at", "2014-04-10 11:51:27.612260"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-10 11:51:27.612260"], ["description", "Dolorum eveniet quaerat odio rerum."], ["goal_id", 1], ["image", nil], ["name", "sed"], ["updated_at", "2014-04-10 11:51:27.612260"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:51:27.612260"], ["goal_id", 1], ["updated_at", "2014-04-10 11:51:27.612260"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-10 11:51:27.612260"], ["goal_id", 2], ["updated_at", "2014-04-10 11:51:27.612260"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 2]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:51:27.612260"], ["updated_at", "2014-04-10 11:51:27.612260"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."seen_at" IS NULL  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:51:27.612260"], ["updated_at", "2014-04-10 11:51:27.612260"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-10 11:51:27.612260"], ["updated_at", "2014-04-10 11:51:27.612260"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.4ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 10:46:16.496546"], ["points", 1], ["updated_at", "2014-04-11 10:46:16.496546"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 10:46:16.501006"], ["points", 1], ["updated_at", "2014-04-11 10:46:16.501006"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 10:46:16.504341"], ["updated_at", "2014-04-11 10:46:16.504341"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.7ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 10:46:16.560445"], ["points", 1], ["updated_at", "2014-04-11 10:46:16.560445"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 10:46:16.561910"], ["points", 1], ["updated_at", "2014-04-11 10:46:16.561910"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 10:46:16.563093"], ["updated_at", "2014-04-11 10:46:16.563093"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-11 10:46:16.577564"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-11 10:46:16.577564"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 10:46:16.582689"], ["points", 1], ["updated_at", "2014-04-11 10:46:16.582689"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 10:46:16.584161"], ["updated_at", "2014-04-11 10:46:16.584161"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-11 10:46:16.586777"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-11 10:46:16.586777"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 10:46:16.591212"], ["points", 1], ["updated_at", "2014-04-11 10:46:16.591212"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 10:46:16.593114"], ["updated_at", "2014-04-11 10:46:16.593114"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-11 10:46:16.595894"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-11 10:46:16.595894"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 10:46:16.601359"], ["points", 1], ["updated_at", "2014-04-11 10:46:16.601359"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 10:46:16.602817"], ["updated_at", "2014-04-11 10:46:16.602817"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-11 10:46:16.605225"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-11 10:46:16.605225"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 10:46:16.609219"], ["points", 1], ["updated_at", "2014-04-11 10:46:16.609219"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 10:46:16.610667"], ["updated_at", "2014-04-11 10:46:16.610667"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.3ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 10:46:16.618215"], ["updated_at", "2014-04-11 10:46:16.618215"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-11 10:46:16.623950"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-04-11 10:46:16.623950"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 10:46:16.625892"], ["updated_at", "2014-04-11 10:46:16.625892"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Completed 500 Internal Server Error in 4ms  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 10:46:16.637593"], ["updated_at", "2014-04-11 10:46:16.637593"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-11 10:46:16.639653"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-04-11 10:46:16.639653"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 10:46:16.641406"], ["updated_at", "2014-04-11 10:46:16.641406"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] Completed 500 Internal Server Error in 3ms  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 10:46:16.650210"], ["points", 1], ["updated_at", "2014-04-11 10:46:16.650210"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 10:46:16.651869"], ["updated_at", "2014-04-11 10:46:16.651869"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-11 10:46:16.658951"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-11 10:46:16.658951"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 6ms (ActiveRecord: 0.6ms)  (0.1ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 10:46:16.663863"], ["points", 1], ["updated_at", "2014-04-11 10:46:16.663863"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 10:46:16.665499"], ["updated_at", "2014-04-11 10:46:16.665499"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-11 10:46:16.671890"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-11 10:46:16.671890"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 5ms (ActiveRecord: 0.5ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 10:46:16.679323"], ["points", 100], ["updated_at", "2014-04-11 10:46:16.679323"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 10:46:16.681863"], ["goal_id", 1], ["updated_at", "2014-04-11 10:46:16.681863"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-11 10:46:16.691923"], ["description", "Accusamus officiis reiciendis commodi quam enim et inventore qui."], ["goal_id", 1], ["image", nil], ["name", "deleniti"], ["updated_at", "2014-04-11 10:46:16.691923"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (5.5ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 10:46:16.710842"], ["points", 100], ["updated_at", "2014-04-11 10:46:16.710842"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 10:46:16.713310"], ["goal_id", 1], ["updated_at", "2014-04-11 10:46:16.713310"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-11 10:46:16.715349"], ["description", "Accusamus officiis reiciendis commodi quam enim et inventore qui."], ["goal_id", 1], ["image", nil], ["name", "deleniti"], ["updated_at", "2014-04-11 10:46:16.715349"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (1.9ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 10:46:16.725726"], ["points", 100], ["updated_at", "2014-04-11 10:46:16.725726"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 10:46:16.728338"], ["goal_id", 1], ["updated_at", "2014-04-11 10:46:16.728338"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-11 10:46:16.730310"], ["description", "Accusamus officiis reiciendis commodi quam enim et inventore qui."], ["goal_id", 1], ["image", nil], ["name", "deleniti"], ["updated_at", "2014-04-11 10:46:16.730310"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (1.7ms)  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 10:46:16.739691"], ["updated_at", "2014-04-11 10:46:16.739691"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ArticlesController#show as HTML Parameters: {"id"=>"1"} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Completed 200 OK in 5ms (Views: 4.2ms | ActiveRecord: 0.1ms)  (0.3ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 10:46:16.751664"], ["seen_at", "2014-04-09 10:46:16.749499"], ["updated_at", "2014-04-11 10:46:16.751664"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE ("gamification_rewards"."seen_at" IS NOT NULL)  (0.3ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 10:46:16.754673"], ["updated_at", "2014-04-11 10:46:16.754673"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 10:46:16.754673"], ["seen_at", "2014-04-09 10:46:16.754673"], ["updated_at", "2014-04-11 10:46:16.754673"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 10:46:16.754673"], ["points", 1], ["updated_at", "2014-04-11 10:46:16.754673"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 10:46:16.754673"], ["points", 1], ["updated_at", "2014-04-11 10:46:16.754673"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-11 10:46:16.754673"], ["description", "Accusamus officiis reiciendis commodi quam enim et inventore qui."], ["goal_id", 1], ["image", nil], ["name", "deleniti"], ["updated_at", "2014-04-11 10:46:16.754673"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 10:46:16.754673"], ["goal_id", 1], ["updated_at", "2014-04-11 10:46:16.754673"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 10:46:16.754673"], ["goal_id", 2], ["updated_at", "2014-04-11 10:46:16.754673"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 2]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 10:46:16.754673"], ["updated_at", "2014-04-11 10:46:16.754673"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."seen_at" IS NULL  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 10:46:16.754673"], ["points", 1], ["updated_at", "2014-04-11 10:46:16.754673"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 10:46:16.754673"], ["points", 1], ["updated_at", "2014-04-11 10:46:16.754673"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-11 10:46:16.754673"], ["description", "Accusamus officiis reiciendis commodi quam enim et inventore qui."], ["goal_id", 1], ["image", nil], ["name", "deleniti"], ["updated_at", "2014-04-11 10:46:16.754673"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 10:46:16.754673"], ["goal_id", 1], ["updated_at", "2014-04-11 10:46:16.754673"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 10:46:16.754673"], ["goal_id", 2], ["updated_at", "2014-04-11 10:46:16.754673"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 2]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 10:46:16.754673"], ["updated_at", "2014-04-11 10:46:16.754673"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-04-11 10:46:16.754673"], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-11 10:46:16.754673"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "gamification_rewards" SET "updated_at" = '2014-04-11 10:46:16.754673', "seen_at" = '2014-04-11 10:46:16.754673' WHERE "gamification_rewards"."id" = 1  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 10:46:16.754673"], ["updated_at", "2014-04-11 10:46:16.754673"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 10:46:16.754673"], ["updated_at", "2014-04-11 10:46:16.754673"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 10:46:16.754673"], ["updated_at", "2014-04-11 10:46:16.754673"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-11 10:46:16.754673"], ["description", "Accusamus officiis reiciendis commodi quam enim et inventore qui."], ["image", nil], ["name", "deleniti"], ["updated_at", "2014-04-11 10:46:16.754673"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 10:46:16.754673"], ["points", 1], ["updated_at", "2014-04-11 10:46:16.754673"]] SQL (0.0ms) UPDATE "gamification_medals" SET "goal_id" = ? WHERE "gamification_medals"."id" = 1 [["goal_id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-11 10:46:16.754673"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-11 10:46:16.754673"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.3ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 10:47:22.857278"], ["points", 1], ["updated_at", "2014-04-11 10:47:22.857278"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 10:47:22.860945"], ["points", 1], ["updated_at", "2014-04-11 10:47:22.860945"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 10:47:22.863835"], ["updated_at", "2014-04-11 10:47:22.863835"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (1.9ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 10:47:22.915740"], ["points", 1], ["updated_at", "2014-04-11 10:47:22.915740"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 10:47:22.917288"], ["updated_at", "2014-04-11 10:47:22.917288"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-11 10:47:22.930208"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-11 10:47:22.930208"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 10:47:22.935263"], ["points", 1], ["updated_at", "2014-04-11 10:47:22.935263"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 10:47:22.936601"], ["updated_at", "2014-04-11 10:47:22.936601"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-11 10:47:22.939077"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-11 10:47:22.939077"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 10:47:22.942125"], ["points", 1], ["updated_at", "2014-04-11 10:47:22.942125"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 10:47:22.943406"], ["points", 1], ["updated_at", "2014-04-11 10:47:22.943406"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 10:47:22.944578"], ["updated_at", "2014-04-11 10:47:22.944578"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-11 10:47:22.946872"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-11 10:47:22.946872"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 10:47:22.951169"], ["points", 1], ["updated_at", "2014-04-11 10:47:22.951169"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 10:47:22.952573"], ["updated_at", "2014-04-11 10:47:22.952573"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.3ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 10:47:22.956696"], ["points", 1], ["updated_at", "2014-04-11 10:47:22.956696"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 10:47:22.958104"], ["updated_at", "2014-04-11 10:47:22.958104"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-11 10:47:22.961090"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-11 10:47:22.961090"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 10:47:22.964929"], ["updated_at", "2014-04-11 10:47:22.964929"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_medals" ("created_at", "description", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-11 10:47:22.973910"], ["description", "Quae quis qui hic nobis."], ["image", nil], ["name", "ea"], ["updated_at", "2014-04-11 10:47:22.973910"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 10:47:22.978386"], ["points", 1], ["updated_at", "2014-04-11 10:47:22.978386"]] SQL (0.1ms) UPDATE "gamification_medals" SET "goal_id" = ?, "updated_at" = ? WHERE "gamification_medals"."id" = 1 [["goal_id", 1], ["updated_at", "2014-04-11 10:47:22.979248"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-11 10:47:22.981929"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-11 10:47:22.981929"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]]  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 10:47:22.986344"], ["seen_at", "2014-04-09 10:47:22.986344"], ["updated_at", "2014-04-11 10:47:22.986344"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE ("gamification_rewards"."seen_at" IS NOT NULL)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 10:47:22.986344"], ["points", 1], ["updated_at", "2014-04-11 10:47:22.986344"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 10:47:22.986344"], ["points", 1], ["updated_at", "2014-04-11 10:47:22.986344"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-11 10:47:22.986344"], ["description", "Quae quis qui hic nobis."], ["goal_id", 1], ["image", nil], ["name", "ea"], ["updated_at", "2014-04-11 10:47:22.986344"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 10:47:22.986344"], ["goal_id", 1], ["updated_at", "2014-04-11 10:47:22.986344"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 10:47:22.986344"], ["goal_id", 2], ["updated_at", "2014-04-11 10:47:22.986344"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 2]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 10:47:22.986344"], ["updated_at", "2014-04-11 10:47:22.986344"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."seen_at" IS NULL  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 10:47:22.986344"], ["seen_at", "2014-04-09 10:47:22.986344"], ["updated_at", "2014-04-11 10:47:22.986344"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 10:47:22.986344"], ["updated_at", "2014-04-11 10:47:22.986344"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 10:47:22.986344"], ["points", 1], ["updated_at", "2014-04-11 10:47:22.986344"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 10:47:22.986344"], ["points", 1], ["updated_at", "2014-04-11 10:47:22.986344"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-11 10:47:22.986344"], ["description", "Quae quis qui hic nobis."], ["goal_id", 1], ["image", nil], ["name", "ea"], ["updated_at", "2014-04-11 10:47:22.986344"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 10:47:22.986344"], ["goal_id", 1], ["updated_at", "2014-04-11 10:47:22.986344"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 10:47:22.986344"], ["goal_id", 2], ["updated_at", "2014-04-11 10:47:22.986344"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 2]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 10:47:22.986344"], ["updated_at", "2014-04-11 10:47:22.986344"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ArticlesController#show as HTML Parameters: {"id"=>"1"} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Rendered articles/show.html.erb within layouts/application (0.0ms) Completed 200 OK in 0ms (Views: 0.0ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 10:47:22.986344"], ["points", 100], ["updated_at", "2014-04-11 10:47:22.986344"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 10:47:22.986344"], ["goal_id", 1], ["updated_at", "2014-04-11 10:47:22.986344"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-11 10:47:22.986344"], ["description", "Quae quis qui hic nobis."], ["goal_id", 1], ["image", nil], ["name", "ea"], ["updated_at", "2014-04-11 10:47:22.986344"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 10:47:22.986344"], ["points", 100], ["updated_at", "2014-04-11 10:47:22.986344"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 10:47:22.986344"], ["goal_id", 1], ["updated_at", "2014-04-11 10:47:22.986344"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-11 10:47:22.986344"], ["description", "Quae quis qui hic nobis."], ["goal_id", 1], ["image", nil], ["name", "ea"], ["updated_at", "2014-04-11 10:47:22.986344"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 10:47:22.986344"], ["points", 100], ["updated_at", "2014-04-11 10:47:22.986344"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 10:47:22.986344"], ["goal_id", 1], ["updated_at", "2014-04-11 10:47:22.986344"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-11 10:47:22.986344"], ["description", "Quae quis qui hic nobis."], ["goal_id", 1], ["image", nil], ["name", "ea"], ["updated_at", "2014-04-11 10:47:22.986344"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 10:47:22.986344"], ["updated_at", "2014-04-11 10:47:22.986344"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-04-11 10:47:22.986344"], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-11 10:47:22.986344"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "gamification_rewards" SET "updated_at" = '2014-04-11 10:47:22.986344', "seen_at" = '2014-04-11 10:47:22.986344' WHERE "gamification_rewards"."id" = 1  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 10:47:22.986344"], ["points", 1], ["updated_at", "2014-04-11 10:47:22.986344"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 10:47:22.986344"], ["updated_at", "2014-04-11 10:47:22.986344"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-11 10:47:22.986344"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-11 10:47:22.986344"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 10:47:22.986344"], ["points", 1], ["updated_at", "2014-04-11 10:47:22.986344"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 10:47:22.986344"], ["updated_at", "2014-04-11 10:47:22.986344"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-11 10:47:22.986344"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-11 10:47:22.986344"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 10:47:22.986344"], ["updated_at", "2014-04-11 10:47:22.986344"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-11 10:47:22.986344"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-04-11 10:47:22.986344"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 10:47:22.986344"], ["updated_at", "2014-04-11 10:47:22.986344"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-11 10:47:22.986344"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-11 10:47:22.986344"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 10:47:22.986344"], ["updated_at", "2014-04-11 10:47:22.986344"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-11 10:47:22.986344"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-04-11 10:47:22.986344"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 10:47:22.986344"], ["updated_at", "2014-04-11 10:47:22.986344"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-11 10:47:22.986344"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-11 10:47:22.986344"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 10:47:22.986344"], ["updated_at", "2014-04-11 10:47:22.986344"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 10:47:22.986344"], ["updated_at", "2014-04-11 10:47:22.986344"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.3ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 11:59:19.197173"], ["points", 1], ["updated_at", "2014-04-11 11:59:19.197173"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 11:59:19.197173"], ["points", 1], ["updated_at", "2014-04-11 11:59:19.197173"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-11 11:59:19.197173"], ["description", "Et debitis ut nihil ipsam eligendi quos expedita dolores."], ["goal_id", 1], ["image", nil], ["name", "at"], ["updated_at", "2014-04-11 11:59:19.197173"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 11:59:19.197173"], ["goal_id", 1], ["updated_at", "2014-04-11 11:59:19.197173"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 11:59:19.197173"], ["goal_id", 2], ["updated_at", "2014-04-11 11:59:19.197173"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 2]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 11:59:19.197173"], ["updated_at", "2014-04-11 11:59:19.197173"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."seen_at" IS NULL  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 11:59:19.197173"], ["updated_at", "2014-04-11 11:59:19.197173"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 11:59:19.197173"], ["seen_at", "2014-04-09 11:59:19.197173"], ["updated_at", "2014-04-11 11:59:19.197173"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 11:59:19.197173"], ["points", 1], ["updated_at", "2014-04-11 11:59:19.197173"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 11:59:19.197173"], ["points", 1], ["updated_at", "2014-04-11 11:59:19.197173"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-11 11:59:19.197173"], ["description", "Et debitis ut nihil ipsam eligendi quos expedita dolores."], ["goal_id", 1], ["image", nil], ["name", "at"], ["updated_at", "2014-04-11 11:59:19.197173"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 11:59:19.197173"], ["goal_id", 1], ["updated_at", "2014-04-11 11:59:19.197173"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 11:59:19.197173"], ["goal_id", 2], ["updated_at", "2014-04-11 11:59:19.197173"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 2]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 11:59:19.197173"], ["seen_at", "2014-04-09 11:59:19.197173"], ["updated_at", "2014-04-11 11:59:19.197173"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE ("gamification_rewards"."seen_at" IS NOT NULL)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 11:59:19.197173"], ["points", 100], ["updated_at", "2014-04-11 11:59:19.197173"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 11:59:19.197173"], ["goal_id", 1], ["updated_at", "2014-04-11 11:59:19.197173"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-11 11:59:19.197173"], ["description", "Et debitis ut nihil ipsam eligendi quos expedita dolores."], ["goal_id", 1], ["image", nil], ["name", "at"], ["updated_at", "2014-04-11 11:59:19.197173"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 11:59:19.197173"], ["points", 100], ["updated_at", "2014-04-11 11:59:19.197173"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 11:59:19.197173"], ["goal_id", 1], ["updated_at", "2014-04-11 11:59:19.197173"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-11 11:59:19.197173"], ["description", "Et debitis ut nihil ipsam eligendi quos expedita dolores."], ["goal_id", 1], ["image", nil], ["name", "at"], ["updated_at", "2014-04-11 11:59:19.197173"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 11:59:19.197173"], ["points", 100], ["updated_at", "2014-04-11 11:59:19.197173"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 11:59:19.197173"], ["goal_id", 1], ["updated_at", "2014-04-11 11:59:19.197173"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-11 11:59:19.197173"], ["description", "Et debitis ut nihil ipsam eligendi quos expedita dolores."], ["goal_id", 1], ["image", nil], ["name", "at"], ["updated_at", "2014-04-11 11:59:19.197173"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 11:59:19.197173"], ["updated_at", "2014-04-11 11:59:19.197173"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-11 11:59:19.197173"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-04-11 11:59:19.197173"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 11:59:19.197173"], ["updated_at", "2014-04-11 11:59:19.197173"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-11 11:59:19.197173"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-11 11:59:19.197173"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 11:59:19.197173"], ["updated_at", "2014-04-11 11:59:19.197173"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-11 11:59:19.197173"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-04-11 11:59:19.197173"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 11:59:19.197173"], ["updated_at", "2014-04-11 11:59:19.197173"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-11 11:59:19.197173"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-11 11:59:19.197173"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 11:59:19.197173"], ["points", 1], ["updated_at", "2014-04-11 11:59:19.197173"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 11:59:19.197173"], ["updated_at", "2014-04-11 11:59:19.197173"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-11 11:59:19.197173"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-11 11:59:19.197173"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 11:59:19.197173"], ["points", 1], ["updated_at", "2014-04-11 11:59:19.197173"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 11:59:19.197173"], ["updated_at", "2014-04-11 11:59:19.197173"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-11 11:59:19.197173"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-11 11:59:19.197173"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 11:59:19.197173"], ["updated_at", "2014-04-11 11:59:19.197173"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 11:59:19.197173"], ["updated_at", "2014-04-11 11:59:19.197173"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 11:59:19.197173"], ["updated_at", "2014-04-11 11:59:19.197173"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ArticlesController#show as HTML Parameters: {"id"=>"1"} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Completed 200 OK in 0ms (Views: 0.0ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 11:59:19.197173"], ["updated_at", "2014-04-11 11:59:19.197173"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-04-11 11:59:19.197173"], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-11 11:59:19.197173"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 11:59:19.197173"], ["updated_at", "2014-04-11 11:59:19.197173"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-11 11:59:19.197173"], ["description", "Et debitis ut nihil ipsam eligendi quos expedita dolores."], ["image", nil], ["name", "at"], ["updated_at", "2014-04-11 11:59:19.197173"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 11:59:19.197173"], ["points", 1], ["updated_at", "2014-04-11 11:59:19.197173"]] SQL (0.0ms) UPDATE "gamification_medals" SET "goal_id" = ? WHERE "gamification_medals"."id" = 1 [["goal_id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-11 11:59:19.197173"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-11 11:59:19.197173"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 11:59:19.197173"], ["points", 1], ["updated_at", "2014-04-11 11:59:19.197173"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 11:59:19.197173"], ["updated_at", "2014-04-11 11:59:19.197173"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-11 11:59:19.197173"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-11 11:59:19.197173"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 11:59:19.197173"], ["points", 1], ["updated_at", "2014-04-11 11:59:19.197173"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 11:59:19.197173"], ["updated_at", "2014-04-11 11:59:19.197173"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 11:59:19.197173"], ["points", 1], ["updated_at", "2014-04-11 11:59:19.197173"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 11:59:19.197173"], ["points", 1], ["updated_at", "2014-04-11 11:59:19.197173"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 11:59:19.197173"], ["updated_at", "2014-04-11 11:59:19.197173"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 11:59:19.197173"], ["points", 1], ["updated_at", "2014-04-11 11:59:19.197173"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 11:59:19.197173"], ["updated_at", "2014-04-11 11:59:19.197173"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-11 11:59:19.197173"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-11 11:59:19.197173"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 11:59:19.197173"], ["points", 1], ["updated_at", "2014-04-11 11:59:19.197173"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 11:59:19.197173"], ["updated_at", "2014-04-11 11:59:19.197173"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-11 11:59:19.197173"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-11 11:59:19.197173"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 11:59:19.197173"], ["points", 1], ["updated_at", "2014-04-11 11:59:19.197173"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 11:59:19.197173"], ["points", 1], ["updated_at", "2014-04-11 11:59:19.197173"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 11:59:19.197173"], ["updated_at", "2014-04-11 11:59:19.197173"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-11 11:59:19.197173"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-11 11:59:19.197173"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) rollback transaction  (0.4ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 11:59:42.738500"], ["updated_at", "2014-04-11 11:59:42.738500"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-11 11:59:42.751274"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-04-11 11:59:42.751274"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 11:59:42.754654"], ["updated_at", "2014-04-11 11:59:42.754654"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.2ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-11 11:59:42.818921"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-11 11:59:42.818921"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 60ms (ActiveRecord: 1.1ms)  (0.1ms) SELECT COUNT(*) FROM "gamification_rewards"  (1.9ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 11:59:42.825672"], ["updated_at", "2014-04-11 11:59:42.825672"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-11 11:59:42.827563"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-04-11 11:59:42.827563"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 11:59:42.828978"], ["updated_at", "2014-04-11 11:59:42.828978"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-11 11:59:42.836322"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-11 11:59:42.836322"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 6ms (ActiveRecord: 0.6ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 11:59:42.840533"], ["points", 1], ["updated_at", "2014-04-11 11:59:42.840533"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 11:59:42.842050"], ["updated_at", "2014-04-11 11:59:42.842050"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-11 11:59:42.848015"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-11 11:59:42.848015"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 5ms (ActiveRecord: 0.4ms)  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 11:59:42.852294"], ["points", 1], ["updated_at", "2014-04-11 11:59:42.852294"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 11:59:42.853679"], ["updated_at", "2014-04-11 11:59:42.853679"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-11 11:59:42.859366"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-11 11:59:42.859366"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 5ms (ActiveRecord: 0.4ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 11:59:42.865513"], ["points", 100], ["updated_at", "2014-04-11 11:59:42.865513"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 11:59:42.868222"], ["goal_id", 1], ["updated_at", "2014-04-11 11:59:42.868222"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-11 11:59:42.876856"], ["description", "Nostrum officiis perferendis rem."], ["goal_id", 1], ["image", nil], ["name", "provident"], ["updated_at", "2014-04-11 11:59:42.876856"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 11:59:42.880694"], ["points", 100], ["updated_at", "2014-04-11 11:59:42.880694"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 11:59:42.883019"], ["goal_id", 1], ["updated_at", "2014-04-11 11:59:42.883019"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-11 11:59:42.884974"], ["description", "Nostrum officiis perferendis rem."], ["goal_id", 1], ["image", nil], ["name", "provident"], ["updated_at", "2014-04-11 11:59:42.884974"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 11:59:42.888605"], ["points", 100], ["updated_at", "2014-04-11 11:59:42.888605"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 11:59:42.890988"], ["goal_id", 1], ["updated_at", "2014-04-11 11:59:42.890988"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-11 11:59:42.892889"], ["description", "Nostrum officiis perferendis rem."], ["goal_id", 1], ["image", nil], ["name", "provident"], ["updated_at", "2014-04-11 11:59:42.892889"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 11:59:42.896048"], ["points", 1], ["updated_at", "2014-04-11 11:59:42.896048"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 11:59:42.897541"], ["points", 1], ["updated_at", "2014-04-11 11:59:42.897541"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 11:59:42.898836"], ["updated_at", "2014-04-11 11:59:42.898836"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 11:59:42.903559"], ["points", 1], ["updated_at", "2014-04-11 11:59:42.903559"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 11:59:42.904924"], ["points", 1], ["updated_at", "2014-04-11 11:59:42.904924"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 11:59:42.906103"], ["updated_at", "2014-04-11 11:59:42.906103"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-11 11:59:42.908413"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-11 11:59:42.908413"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 11:59:42.912539"], ["points", 1], ["updated_at", "2014-04-11 11:59:42.912539"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 11:59:42.913943"], ["updated_at", "2014-04-11 11:59:42.913943"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-11 11:59:42.916170"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-11 11:59:42.916170"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 11:59:42.919883"], ["points", 1], ["updated_at", "2014-04-11 11:59:42.919883"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 11:59:42.921209"], ["updated_at", "2014-04-11 11:59:42.921209"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 11:59:42.924796"], ["points", 1], ["updated_at", "2014-04-11 11:59:42.924796"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 11:59:42.926160"], ["updated_at", "2014-04-11 11:59:42.926160"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-11 11:59:42.928761"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-11 11:59:42.928761"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 11:59:42.931941"], ["points", 1], ["updated_at", "2014-04-11 11:59:42.931941"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 11:59:42.933245"], ["updated_at", "2014-04-11 11:59:42.933245"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-11 11:59:42.936192"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-11 11:59:42.936192"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 11:59:42.941456"], ["points", 1], ["updated_at", "2014-04-11 11:59:42.941456"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 11:59:42.941456"], ["points", 1], ["updated_at", "2014-04-11 11:59:42.941456"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-11 11:59:42.941456"], ["description", "Nostrum officiis perferendis rem."], ["goal_id", 1], ["image", nil], ["name", "provident"], ["updated_at", "2014-04-11 11:59:42.941456"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 11:59:42.941456"], ["goal_id", 1], ["updated_at", "2014-04-11 11:59:42.941456"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 11:59:42.941456"], ["goal_id", 2], ["updated_at", "2014-04-11 11:59:42.941456"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 2]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 11:59:42.941456"], ["points", 1], ["updated_at", "2014-04-11 11:59:42.941456"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 11:59:42.941456"], ["points", 1], ["updated_at", "2014-04-11 11:59:42.941456"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-11 11:59:42.941456"], ["description", "Nostrum officiis perferendis rem."], ["goal_id", 1], ["image", nil], ["name", "provident"], ["updated_at", "2014-04-11 11:59:42.941456"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 11:59:42.941456"], ["goal_id", 1], ["updated_at", "2014-04-11 11:59:42.941456"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 11:59:42.941456"], ["goal_id", 2], ["updated_at", "2014-04-11 11:59:42.941456"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 2]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 11:59:42.941456"], ["updated_at", "2014-04-11 11:59:42.941456"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."seen_at" IS NULL  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 11:59:42.941456"], ["seen_at", "2014-04-09 11:59:42.941456"], ["updated_at", "2014-04-11 11:59:42.941456"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE ("gamification_rewards"."seen_at" IS NOT NULL)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 11:59:42.941456"], ["updated_at", "2014-04-11 11:59:42.941456"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 11:59:42.941456"], ["seen_at", "2014-04-09 11:59:42.941456"], ["updated_at", "2014-04-11 11:59:42.941456"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 11:59:42.941456"], ["updated_at", "2014-04-11 11:59:42.941456"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-04-11 11:59:42.941456"], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-11 11:59:42.941456"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 11:59:42.941456"], ["updated_at", "2014-04-11 11:59:42.941456"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ArticlesController#show as HTML Parameters: {"id"=>"1"} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Completed 200 OK in 0ms (Views: 0.0ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 11:59:42.941456"], ["updated_at", "2014-04-11 11:59:42.941456"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 11:59:42.941456"], ["updated_at", "2014-04-11 11:59:42.941456"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 11:59:42.941456"], ["updated_at", "2014-04-11 11:59:42.941456"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-11 11:59:42.941456"], ["description", "Nostrum officiis perferendis rem."], ["image", nil], ["name", "provident"], ["updated_at", "2014-04-11 11:59:42.941456"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 11:59:42.941456"], ["points", 1], ["updated_at", "2014-04-11 11:59:42.941456"]] SQL (0.0ms) UPDATE "gamification_medals" SET "goal_id" = ? WHERE "gamification_medals"."id" = 1 [["goal_id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-11 11:59:42.941456"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-11 11:59:42.941456"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.3ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.4ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 12:00:21.989384"], ["updated_at", "2014-04-11 12:00:21.989384"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 12:00:21.993692"], ["seen_at", "2014-04-09 12:00:21.992111"], ["updated_at", "2014-04-11 12:00:21.993692"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 12:00:22.001423"], ["points", 1], ["updated_at", "2014-04-11 12:00:22.001423"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 12:00:22.003018"], ["points", 1], ["updated_at", "2014-04-11 12:00:22.003018"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-11 12:00:22.045432"], ["description", "Voluptatem autem ex quos delectus omnis aut."], ["goal_id", 1], ["image", nil], ["name", "voluptatem"], ["updated_at", "2014-04-11 12:00:22.045432"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 12:00:22.048962"], ["goal_id", 1], ["updated_at", "2014-04-11 12:00:22.048962"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 12:00:22.051305"], ["goal_id", 2], ["updated_at", "2014-04-11 12:00:22.051305"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 2]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 2]]  (1.0ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 12:00:22.065583"], ["seen_at", "2014-04-09 12:00:22.063853"], ["updated_at", "2014-04-11 12:00:22.065583"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE ("gamification_rewards"."seen_at" IS NOT NULL)  (0.3ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 12:00:22.068282"], ["updated_at", "2014-04-11 12:00:22.068282"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."seen_at" IS NULL  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 12:00:22.068282"], ["points", 1], ["updated_at", "2014-04-11 12:00:22.068282"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 12:00:22.068282"], ["points", 1], ["updated_at", "2014-04-11 12:00:22.068282"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-11 12:00:22.068282"], ["description", "Voluptatem autem ex quos delectus omnis aut."], ["goal_id", 1], ["image", nil], ["name", "voluptatem"], ["updated_at", "2014-04-11 12:00:22.068282"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 12:00:22.068282"], ["goal_id", 1], ["updated_at", "2014-04-11 12:00:22.068282"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 12:00:22.068282"], ["goal_id", 2], ["updated_at", "2014-04-11 12:00:22.068282"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 2]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 12:00:22.068282"], ["updated_at", "2014-04-11 12:00:22.068282"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-11 12:00:22.068282"], ["description", "Voluptatem autem ex quos delectus omnis aut."], ["image", nil], ["name", "voluptatem"], ["updated_at", "2014-04-11 12:00:22.068282"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 12:00:22.068282"], ["points", 1], ["updated_at", "2014-04-11 12:00:22.068282"]] SQL (0.0ms) UPDATE "gamification_medals" SET "goal_id" = ? WHERE "gamification_medals"."id" = 1 [["goal_id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-11 12:00:22.068282"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-11 12:00:22.068282"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 12:00:22.068282"], ["updated_at", "2014-04-11 12:00:22.068282"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-11 12:00:22.068282"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-04-11 12:00:22.068282"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 12:00:22.068282"], ["updated_at", "2014-04-11 12:00:22.068282"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-11 12:00:22.068282"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-11 12:00:22.068282"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 12:00:22.068282"], ["updated_at", "2014-04-11 12:00:22.068282"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-11 12:00:22.068282"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-04-11 12:00:22.068282"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 12:00:22.068282"], ["updated_at", "2014-04-11 12:00:22.068282"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-11 12:00:22.068282"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-11 12:00:22.068282"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 12:00:22.068282"], ["points", 1], ["updated_at", "2014-04-11 12:00:22.068282"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 12:00:22.068282"], ["updated_at", "2014-04-11 12:00:22.068282"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-11 12:00:22.068282"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-11 12:00:22.068282"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 12:00:22.068282"], ["points", 1], ["updated_at", "2014-04-11 12:00:22.068282"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 12:00:22.068282"], ["updated_at", "2014-04-11 12:00:22.068282"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-11 12:00:22.068282"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-11 12:00:22.068282"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 12:00:22.068282"], ["updated_at", "2014-04-11 12:00:22.068282"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ArticlesController#show as HTML Parameters: {"id"=>"1"} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Completed 200 OK in 0ms (Views: 0.0ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 12:00:22.068282"], ["updated_at", "2014-04-11 12:00:22.068282"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 12:00:22.068282"], ["updated_at", "2014-04-11 12:00:22.068282"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 12:00:22.068282"], ["points", 1], ["updated_at", "2014-04-11 12:00:22.068282"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 12:00:22.068282"], ["updated_at", "2014-04-11 12:00:22.068282"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-11 12:00:22.068282"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-11 12:00:22.068282"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 12:00:22.068282"], ["points", 1], ["updated_at", "2014-04-11 12:00:22.068282"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 12:00:22.068282"], ["updated_at", "2014-04-11 12:00:22.068282"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-11 12:00:22.068282"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-11 12:00:22.068282"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 12:00:22.068282"], ["points", 1], ["updated_at", "2014-04-11 12:00:22.068282"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 12:00:22.068282"], ["updated_at", "2014-04-11 12:00:22.068282"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-11 12:00:22.068282"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-11 12:00:22.068282"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 12:00:22.068282"], ["points", 1], ["updated_at", "2014-04-11 12:00:22.068282"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 12:00:22.068282"], ["updated_at", "2014-04-11 12:00:22.068282"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 12:00:22.068282"], ["points", 1], ["updated_at", "2014-04-11 12:00:22.068282"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 12:00:22.068282"], ["points", 1], ["updated_at", "2014-04-11 12:00:22.068282"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 12:00:22.068282"], ["updated_at", "2014-04-11 12:00:22.068282"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-11 12:00:22.068282"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-11 12:00:22.068282"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 12:00:22.068282"], ["points", 1], ["updated_at", "2014-04-11 12:00:22.068282"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 12:00:22.068282"], ["points", 1], ["updated_at", "2014-04-11 12:00:22.068282"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 12:00:22.068282"], ["updated_at", "2014-04-11 12:00:22.068282"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 12:00:22.068282"], ["points", 100], ["updated_at", "2014-04-11 12:00:22.068282"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 12:00:22.068282"], ["goal_id", 1], ["updated_at", "2014-04-11 12:00:22.068282"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-11 12:00:22.068282"], ["description", "Voluptatem autem ex quos delectus omnis aut."], ["goal_id", 1], ["image", nil], ["name", "voluptatem"], ["updated_at", "2014-04-11 12:00:22.068282"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_reward.html.erb (0.0ms) Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 12:00:22.068282"], ["points", 100], ["updated_at", "2014-04-11 12:00:22.068282"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 12:00:22.068282"], ["goal_id", 1], ["updated_at", "2014-04-11 12:00:22.068282"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-11 12:00:22.068282"], ["description", "Voluptatem autem ex quos delectus omnis aut."], ["goal_id", 1], ["image", nil], ["name", "voluptatem"], ["updated_at", "2014-04-11 12:00:22.068282"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_reward.html.erb (0.0ms) Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 12:00:22.068282"], ["points", 100], ["updated_at", "2014-04-11 12:00:22.068282"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 12:00:22.068282"], ["goal_id", 1], ["updated_at", "2014-04-11 12:00:22.068282"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-11 12:00:22.068282"], ["description", "Voluptatem autem ex quos delectus omnis aut."], ["goal_id", 1], ["image", nil], ["name", "voluptatem"], ["updated_at", "2014-04-11 12:00:22.068282"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_reward.html.erb (0.0ms) Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 12:00:22.068282"], ["updated_at", "2014-04-11 12:00:22.068282"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-04-11 12:00:22.068282"], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-11 12:00:22.068282"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.3ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 12:01:22.539896"], ["updated_at", "2014-04-11 12:01:22.539896"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-11 12:01:22.557240"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-04-11 12:01:22.557240"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 12:01:22.560859"], ["updated_at", "2014-04-11 12:01:22.560859"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.2ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-11 12:01:22.636249"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-11 12:01:22.636249"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 71ms (ActiveRecord: 1.2ms)  (0.1ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.6ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 12:01:22.642196"], ["updated_at", "2014-04-11 12:01:22.642196"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-11 12:01:22.644067"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-04-11 12:01:22.644067"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 12:01:22.645448"], ["updated_at", "2014-04-11 12:01:22.645448"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-11 12:01:22.651881"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-11 12:01:22.651881"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 5ms (ActiveRecord: 0.5ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 12:01:22.656142"], ["points", 1], ["updated_at", "2014-04-11 12:01:22.656142"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 12:01:22.657621"], ["updated_at", "2014-04-11 12:01:22.657621"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-11 12:01:22.663944"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-11 12:01:22.663944"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 5ms (ActiveRecord: 0.5ms)  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 12:01:22.668326"], ["points", 1], ["updated_at", "2014-04-11 12:01:22.668326"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 12:01:22.669788"], ["updated_at", "2014-04-11 12:01:22.669788"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-11 12:01:22.675892"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-11 12:01:22.675892"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 5ms (ActiveRecord: 0.5ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 12:01:22.680091"], ["points", 1], ["updated_at", "2014-04-11 12:01:22.680091"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 12:01:22.681573"], ["updated_at", "2014-04-11 12:01:22.681573"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-11 12:01:22.684213"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-11 12:01:22.684213"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 12:01:22.688608"], ["points", 1], ["updated_at", "2014-04-11 12:01:22.688608"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 12:01:22.690190"], ["updated_at", "2014-04-11 12:01:22.690190"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 12:01:22.694074"], ["points", 1], ["updated_at", "2014-04-11 12:01:22.694074"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 12:01:22.695473"], ["points", 1], ["updated_at", "2014-04-11 12:01:22.695473"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 12:01:22.696672"], ["updated_at", "2014-04-11 12:01:22.696672"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.4ms) rollback transaction  (0.0ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 12:01:22.701110"], ["points", 1], ["updated_at", "2014-04-11 12:01:22.701110"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 12:01:22.702672"], ["updated_at", "2014-04-11 12:01:22.702672"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-11 12:01:22.705277"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-11 12:01:22.705277"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 12:01:22.709546"], ["points", 1], ["updated_at", "2014-04-11 12:01:22.709546"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 12:01:22.711042"], ["updated_at", "2014-04-11 12:01:22.711042"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-11 12:01:22.713793"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-11 12:01:22.713793"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 12:01:22.720055"], ["points", 1], ["updated_at", "2014-04-11 12:01:22.720055"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 12:01:22.721444"], ["points", 1], ["updated_at", "2014-04-11 12:01:22.721444"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 12:01:22.722685"], ["updated_at", "2014-04-11 12:01:22.722685"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-11 12:01:22.725071"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-11 12:01:22.725071"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 12:01:22.732990"], ["points", 100], ["updated_at", "2014-04-11 12:01:22.732990"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 12:01:22.735382"], ["goal_id", 1], ["updated_at", "2014-04-11 12:01:22.735382"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-11 12:01:22.743576"], ["description", "Reiciendis quis pariatur nesciunt voluptas ut."], ["goal_id", 1], ["image", nil], ["name", "error"], ["updated_at", "2014-04-11 12:01:22.743576"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.2ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_reward.html.erb (5.5ms) Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (12.0ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 12:01:22.768339"], ["points", 100], ["updated_at", "2014-04-11 12:01:22.768339"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 12:01:22.771128"], ["goal_id", 1], ["updated_at", "2014-04-11 12:01:22.771128"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-11 12:01:22.773291"], ["description", "Reiciendis quis pariatur nesciunt voluptas ut."], ["goal_id", 1], ["image", nil], ["name", "error"], ["updated_at", "2014-04-11 12:01:22.773291"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_reward.html.erb (2.1ms) Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (9.0ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 12:01:22.792461"], ["points", 100], ["updated_at", "2014-04-11 12:01:22.792461"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 12:01:22.795297"], ["goal_id", 1], ["updated_at", "2014-04-11 12:01:22.795297"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-11 12:01:22.797460"], ["description", "Reiciendis quis pariatur nesciunt voluptas ut."], ["goal_id", 1], ["image", nil], ["name", "error"], ["updated_at", "2014-04-11 12:01:22.797460"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_reward.html.erb (1.7ms) Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (6.0ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 12:01:22.812615"], ["updated_at", "2014-04-11 12:01:22.812615"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-04-11 12:01:22.815184"], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-11 12:01:22.815184"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "gamification_rewards" SET "updated_at" = '2014-04-11 12:01:22.819037', "seen_at" = '2014-04-11 12:01:22.819037' WHERE "gamification_rewards"."id" = 1  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 12:01:22.823056"], ["points", 1], ["updated_at", "2014-04-11 12:01:22.823056"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 12:01:22.825027"], ["points", 1], ["updated_at", "2014-04-11 12:01:22.825027"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-11 12:01:22.827566"], ["description", "Reiciendis quis pariatur nesciunt voluptas ut."], ["goal_id", 1], ["image", nil], ["name", "error"], ["updated_at", "2014-04-11 12:01:22.827566"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 12:01:22.830630"], ["goal_id", 1], ["updated_at", "2014-04-11 12:01:22.830630"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 12:01:22.832860"], ["goal_id", 2], ["updated_at", "2014-04-11 12:01:22.832860"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 2]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 2]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 12:01:22.837934"], ["points", 1], ["updated_at", "2014-04-11 12:01:22.837934"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 12:01:22.839322"], ["points", 1], ["updated_at", "2014-04-11 12:01:22.839322"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-11 12:01:22.841141"], ["description", "Reiciendis quis pariatur nesciunt voluptas ut."], ["goal_id", 1], ["image", nil], ["name", "error"], ["updated_at", "2014-04-11 12:01:22.841141"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 12:01:22.843526"], ["goal_id", 1], ["updated_at", "2014-04-11 12:01:22.843526"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 12:01:22.845702"], ["goal_id", 2], ["updated_at", "2014-04-11 12:01:22.845702"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 2]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 2]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 12:01:22.852286"], ["seen_at", "2014-04-09 12:01:22.850672"], ["updated_at", "2014-04-11 12:01:22.852286"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE ("gamification_rewards"."seen_at" IS NOT NULL)  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 12:01:22.855215"], ["updated_at", "2014-04-11 12:01:22.855215"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."seen_at" IS NULL  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 12:01:22.855215"], ["updated_at", "2014-04-11 12:01:22.855215"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 12:01:22.855215"], ["seen_at", "2014-04-09 12:01:22.855215"], ["updated_at", "2014-04-11 12:01:22.855215"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 12:01:22.855215"], ["updated_at", "2014-04-11 12:01:22.855215"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-11 12:01:22.855215"], ["description", "Reiciendis quis pariatur nesciunt voluptas ut."], ["image", nil], ["name", "error"], ["updated_at", "2014-04-11 12:01:22.855215"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-11 12:01:22.855215"], ["points", 1], ["updated_at", "2014-04-11 12:01:22.855215"]] SQL (0.0ms) UPDATE "gamification_medals" SET "goal_id" = ? WHERE "gamification_medals"."id" = 1 [["goal_id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-11 12:01:22.855215"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-11 12:01:22.855215"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 12:01:22.855215"], ["updated_at", "2014-04-11 12:01:22.855215"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ArticlesController#show as HTML Parameters: {"id"=>"1"} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Completed 200 OK in 0ms (Views: 0.0ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 12:01:22.855215"], ["updated_at", "2014-04-11 12:01:22.855215"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-11 12:01:22.855215"], ["updated_at", "2014-04-11 12:01:22.855215"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.3ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-12 11:26:09.291980"], ["points", 100], ["updated_at", "2014-04-12 11:26:09.291980"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.2ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.9ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-12 11:26:09.313035"], ["goal_id", 1], ["updated_at", "2014-04-12 11:26:09.313035"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-12 11:26:09.325699"], ["description", "Fugiat aliquid repudiandae praesentium maxime ut."], ["goal_id", 1], ["image", nil], ["name", "sint"], ["updated_at", "2014-04-12 11:26:09.325699"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.2ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_reward.html.erb (48.0ms) Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (54.2ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-12 11:26:09.394260"], ["points", 100], ["updated_at", "2014-04-12 11:26:09.394260"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-12 11:26:09.396842"], ["goal_id", 1], ["updated_at", "2014-04-12 11:26:09.396842"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-12 11:26:09.398832"], ["description", "Fugiat aliquid repudiandae praesentium maxime ut."], ["goal_id", 1], ["image", nil], ["name", "sint"], ["updated_at", "2014-04-12 11:26:09.398832"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_reward.html.erb (1.7ms) Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (6.0ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-12 11:26:09.412742"], ["points", 100], ["updated_at", "2014-04-12 11:26:09.412742"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-12 11:26:09.415212"], ["goal_id", 1], ["updated_at", "2014-04-12 11:26:09.415212"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-12 11:26:09.417157"], ["description", "Fugiat aliquid repudiandae praesentium maxime ut."], ["goal_id", 1], ["image", nil], ["name", "sint"], ["updated_at", "2014-04-12 11:26:09.417157"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_reward.html.erb (1.8ms) Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (6.1ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-12 11:26:09.433312"], ["updated_at", "2014-04-12 11:26:09.433312"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-12 11:26:09.438311"], ["updated_at", "2014-04-12 11:26:09.438311"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-12 11:26:09.450820"], ["updated_at", "2014-04-12 11:26:09.450820"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-12 11:26:09.450820"], ["seen_at", "2014-04-10 11:26:09.450820"], ["updated_at", "2014-04-12 11:26:09.450820"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-12 11:26:09.450820"], ["points", 1], ["updated_at", "2014-04-12 11:26:09.450820"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-12 11:26:09.450820"], ["points", 1], ["updated_at", "2014-04-12 11:26:09.450820"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-12 11:26:09.450820"], ["description", "Fugiat aliquid repudiandae praesentium maxime ut."], ["goal_id", 1], ["image", nil], ["name", "sint"], ["updated_at", "2014-04-12 11:26:09.450820"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-12 11:26:09.450820"], ["goal_id", 1], ["updated_at", "2014-04-12 11:26:09.450820"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-12 11:26:09.450820"], ["goal_id", 2], ["updated_at", "2014-04-12 11:26:09.450820"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 2]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-12 11:26:09.450820"], ["updated_at", "2014-04-12 11:26:09.450820"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."seen_at" IS NULL  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-12 11:26:09.450820"], ["seen_at", "2014-04-10 11:26:09.450820"], ["updated_at", "2014-04-12 11:26:09.450820"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE ("gamification_rewards"."seen_at" IS NOT NULL)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-12 11:26:09.450820"], ["points", 1], ["updated_at", "2014-04-12 11:26:09.450820"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-12 11:26:09.450820"], ["points", 1], ["updated_at", "2014-04-12 11:26:09.450820"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-12 11:26:09.450820"], ["description", "Fugiat aliquid repudiandae praesentium maxime ut."], ["goal_id", 1], ["image", nil], ["name", "sint"], ["updated_at", "2014-04-12 11:26:09.450820"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-12 11:26:09.450820"], ["goal_id", 1], ["updated_at", "2014-04-12 11:26:09.450820"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-12 11:26:09.450820"], ["goal_id", 2], ["updated_at", "2014-04-12 11:26:09.450820"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 2]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-12 11:26:09.450820"], ["updated_at", "2014-04-12 11:26:09.450820"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ArticlesController#show as HTML Parameters: {"id"=>"1"} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Completed 200 OK in 0ms (Views: 0.0ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-12 11:26:09.450820"], ["updated_at", "2014-04-12 11:26:09.450820"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-12 11:26:09.450820"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-04-12 11:26:09.450820"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-12 11:26:09.450820"], ["updated_at", "2014-04-12 11:26:09.450820"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-12 11:26:09.450820"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-12 11:26:09.450820"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-12 11:26:09.450820"], ["updated_at", "2014-04-12 11:26:09.450820"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-12 11:26:09.450820"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-04-12 11:26:09.450820"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-12 11:26:09.450820"], ["updated_at", "2014-04-12 11:26:09.450820"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-12 11:26:09.450820"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-12 11:26:09.450820"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-12 11:26:09.450820"], ["points", 1], ["updated_at", "2014-04-12 11:26:09.450820"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-12 11:26:09.450820"], ["updated_at", "2014-04-12 11:26:09.450820"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-12 11:26:09.450820"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-12 11:26:09.450820"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-12 11:26:09.450820"], ["points", 1], ["updated_at", "2014-04-12 11:26:09.450820"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-12 11:26:09.450820"], ["updated_at", "2014-04-12 11:26:09.450820"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-12 11:26:09.450820"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-12 11:26:09.450820"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-12 11:26:09.450820"], ["points", 1], ["updated_at", "2014-04-12 11:26:09.450820"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-12 11:26:09.450820"], ["updated_at", "2014-04-12 11:26:09.450820"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-12 11:26:09.450820"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-12 11:26:09.450820"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-12 11:26:09.450820"], ["points", 1], ["updated_at", "2014-04-12 11:26:09.450820"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-12 11:26:09.450820"], ["updated_at", "2014-04-12 11:26:09.450820"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-12 11:26:09.450820"], ["points", 1], ["updated_at", "2014-04-12 11:26:09.450820"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-12 11:26:09.450820"], ["updated_at", "2014-04-12 11:26:09.450820"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-12 11:26:09.450820"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-12 11:26:09.450820"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-12 11:26:09.450820"], ["points", 1], ["updated_at", "2014-04-12 11:26:09.450820"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-12 11:26:09.450820"], ["updated_at", "2014-04-12 11:26:09.450820"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-12 11:26:09.450820"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-12 11:26:09.450820"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-12 11:26:09.450820"], ["points", 1], ["updated_at", "2014-04-12 11:26:09.450820"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-12 11:26:09.450820"], ["points", 1], ["updated_at", "2014-04-12 11:26:09.450820"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-12 11:26:09.450820"], ["updated_at", "2014-04-12 11:26:09.450820"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-12 11:26:09.450820"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-12 11:26:09.450820"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-12 11:26:09.450820"], ["points", 1], ["updated_at", "2014-04-12 11:26:09.450820"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-12 11:26:09.450820"], ["points", 1], ["updated_at", "2014-04-12 11:26:09.450820"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-12 11:26:09.450820"], ["updated_at", "2014-04-12 11:26:09.450820"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-12 11:26:09.450820"], ["updated_at", "2014-04-12 11:26:09.450820"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-12 11:26:09.450820"], ["description", "Fugiat aliquid repudiandae praesentium maxime ut."], ["image", nil], ["name", "sint"], ["updated_at", "2014-04-12 11:26:09.450820"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-12 11:26:09.450820"], ["points", 1], ["updated_at", "2014-04-12 11:26:09.450820"]] SQL (0.0ms) UPDATE "gamification_medals" SET "goal_id" = ? WHERE "gamification_medals"."id" = 1 [["goal_id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-12 11:26:09.450820"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-12 11:26:09.450820"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-12 11:26:09.450820"], ["updated_at", "2014-04-12 11:26:09.450820"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-04-12 11:26:09.450820"], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-12 11:26:09.450820"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "gamification_rewards" SET "updated_at" = '2014-04-12 11:26:09.450820', "seen_at" = '2014-04-12 11:26:09.450820' WHERE "gamification_rewards"."id" = 1  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.3ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-12 11:27:14.014309"], ["updated_at", "2014-04-12 11:27:14.014309"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-12 11:27:14.027416"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-04-12 11:27:14.027416"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-12 11:27:14.033018"], ["updated_at", "2014-04-12 11:27:14.033018"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-12 11:27:14.105798"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-12 11:27:14.105798"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 67ms (ActiveRecord: 1.1ms)  (0.1ms) SELECT COUNT(*) FROM "gamification_rewards"  (1.8ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-12 11:27:14.112630"], ["updated_at", "2014-04-12 11:27:14.112630"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-12 11:27:14.114537"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-04-12 11:27:14.114537"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-12 11:27:14.115957"], ["updated_at", "2014-04-12 11:27:14.115957"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-12 11:27:14.122439"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-12 11:27:14.122439"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 6ms (ActiveRecord: 0.5ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-12 11:27:14.126647"], ["points", 1], ["updated_at", "2014-04-12 11:27:14.126647"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-12 11:27:14.128065"], ["updated_at", "2014-04-12 11:27:14.128065"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.3ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-12 11:27:14.136396"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-12 11:27:14.136396"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 8ms (ActiveRecord: 0.8ms)  (0.1ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-12 11:27:14.141359"], ["points", 1], ["updated_at", "2014-04-12 11:27:14.141359"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-12 11:27:14.143054"], ["updated_at", "2014-04-12 11:27:14.143054"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-12 11:27:14.149790"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-12 11:27:14.149790"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 6ms (ActiveRecord: 0.5ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-12 11:27:14.154657"], ["updated_at", "2014-04-12 11:27:14.154657"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ArticlesController#show as HTML Parameters: {"id"=>"1"} Article Load (0.1ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Completed 200 OK in 6ms (Views: 5.2ms | ActiveRecord: 0.1ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-12 11:27:14.167953"], ["updated_at", "2014-04-12 11:27:14.167953"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.5ms) INSERT INTO "gamification_rewards" ("created_at", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-04-12 11:27:14.171874"], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-12 11:27:14.171874"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "gamification_rewards" SET "updated_at" = '2014-04-12 11:27:14.177181', "seen_at" = '2014-04-12 11:27:14.177181' WHERE "gamification_rewards"."id" = 1  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-12 11:27:14.180602"], ["points", 1], ["updated_at", "2014-04-12 11:27:14.180602"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-12 11:27:14.181973"], ["points", 1], ["updated_at", "2014-04-12 11:27:14.181973"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-12 11:27:14.183108"], ["updated_at", "2014-04-12 11:27:14.183108"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-12 11:27:14.185481"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-12 11:27:14.185481"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-12 11:27:14.190091"], ["points", 1], ["updated_at", "2014-04-12 11:27:14.190091"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-12 11:27:14.191538"], ["updated_at", "2014-04-12 11:27:14.191538"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-12 11:27:14.193877"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-12 11:27:14.193877"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-12 11:27:14.197707"], ["points", 1], ["updated_at", "2014-04-12 11:27:14.197707"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-12 11:27:14.199296"], ["updated_at", "2014-04-12 11:27:14.199296"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-12 11:27:14.203706"], ["points", 1], ["updated_at", "2014-04-12 11:27:14.203706"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-12 11:27:14.205399"], ["updated_at", "2014-04-12 11:27:14.205399"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-12 11:27:14.208422"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-12 11:27:14.208422"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-12 11:27:14.211999"], ["points", 1], ["updated_at", "2014-04-12 11:27:14.211999"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-12 11:27:14.213445"], ["updated_at", "2014-04-12 11:27:14.213445"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-12 11:27:14.215678"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-12 11:27:14.215678"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-12 11:27:14.220491"], ["points", 1], ["updated_at", "2014-04-12 11:27:14.220491"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-12 11:27:14.221842"], ["points", 1], ["updated_at", "2014-04-12 11:27:14.221842"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-12 11:27:14.222973"], ["updated_at", "2014-04-12 11:27:14.222973"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-12 11:27:14.228711"], ["points", 100], ["updated_at", "2014-04-12 11:27:14.228711"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.7ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-12 11:27:14.231173"], ["goal_id", 1], ["updated_at", "2014-04-12 11:27:14.231173"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-12 11:27:14.243705"], ["description", "Quas rem qui magni."], ["goal_id", 1], ["image", nil], ["name", "ex"], ["updated_at", "2014-04-12 11:27:14.243705"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.2ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_reward.html.erb (4.8ms) Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (10.4ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-12 11:27:14.264824"], ["points", 100], ["updated_at", "2014-04-12 11:27:14.264824"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-12 11:27:14.267878"], ["goal_id", 1], ["updated_at", "2014-04-12 11:27:14.267878"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-12 11:27:14.271153"], ["description", "Quas rem qui magni."], ["goal_id", 1], ["image", nil], ["name", "ex"], ["updated_at", "2014-04-12 11:27:14.271153"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_reward.html.erb (1.5ms) Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (5.5ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-12 11:27:14.285262"], ["points", 100], ["updated_at", "2014-04-12 11:27:14.285262"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-12 11:27:14.287663"], ["goal_id", 1], ["updated_at", "2014-04-12 11:27:14.287663"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-12 11:27:14.289566"], ["description", "Quas rem qui magni."], ["goal_id", 1], ["image", nil], ["name", "ex"], ["updated_at", "2014-04-12 11:27:14.289566"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_reward.html.erb (1.7ms) Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (6.0ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-12 11:27:14.303038"], ["updated_at", "2014-04-12 11:27:14.303038"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_medals" ("created_at", "description", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-12 11:27:14.304930"], ["description", "Quas rem qui magni."], ["image", nil], ["name", "ex"], ["updated_at", "2014-04-12 11:27:14.304930"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-12 11:27:14.306755"], ["points", 1], ["updated_at", "2014-04-12 11:27:14.306755"]] SQL (0.1ms) UPDATE "gamification_medals" SET "goal_id" = ?, "updated_at" = ? WHERE "gamification_medals"."id" = 1 [["goal_id", 1], ["updated_at", "2014-04-12 11:27:14.307516"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-04-12 11:27:14.310330"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-04-12 11:27:14.310330"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]]  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-12 11:27:14.316508"], ["updated_at", "2014-04-12 11:27:14.316508"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-12 11:27:14.318565"], ["updated_at", "2014-04-12 11:27:14.318565"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-12 11:27:14.324782"], ["points", 1], ["updated_at", "2014-04-12 11:27:14.324782"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-12 11:27:14.326339"], ["points", 1], ["updated_at", "2014-04-12 11:27:14.326339"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-12 11:27:14.328252"], ["description", "Quas rem qui magni."], ["goal_id", 1], ["image", nil], ["name", "ex"], ["updated_at", "2014-04-12 11:27:14.328252"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-12 11:27:14.330531"], ["goal_id", 1], ["updated_at", "2014-04-12 11:27:14.330531"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-12 11:27:14.332595"], ["goal_id", 2], ["updated_at", "2014-04-12 11:27:14.332595"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 2]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 2]]  (0.5ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-12 11:27:14.338714"], ["seen_at", "2014-04-10 11:27:14.338714"], ["updated_at", "2014-04-12 11:27:14.338714"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE ("gamification_rewards"."seen_at" IS NOT NULL)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-12 11:27:14.338714"], ["updated_at", "2014-04-12 11:27:14.338714"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."seen_at" IS NULL  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-12 11:27:14.338714"], ["points", 1], ["updated_at", "2014-04-12 11:27:14.338714"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-12 11:27:14.338714"], ["points", 1], ["updated_at", "2014-04-12 11:27:14.338714"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-04-12 11:27:14.338714"], ["description", "Quas rem qui magni."], ["goal_id", 1], ["image", nil], ["name", "ex"], ["updated_at", "2014-04-12 11:27:14.338714"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-12 11:27:14.338714"], ["goal_id", 1], ["updated_at", "2014-04-12 11:27:14.338714"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-12 11:27:14.338714"], ["goal_id", 2], ["updated_at", "2014-04-12 11:27:14.338714"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 2]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-04-12 11:27:14.338714"], ["updated_at", "2014-04-12 11:27:14.338714"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-04-12 11:27:14.338714"], ["seen_at", "2014-04-10 11:27:14.338714"], ["updated_at", "2014-04-12 11:27:14.338714"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.4ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-05-16 07:12:06.375508"], ["updated_at", "2014-05-16 07:12:06.375508"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-05-16 07:12:06.383017"], ["updated_at", "2014-05-16 07:12:06.383017"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.9ms) rollback transaction  (0.0ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.4ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-05-16 07:12:06.423423"], ["seen_at", "2014-05-14 07:12:06.399824"], ["updated_at", "2014-05-16 07:12:06.423423"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE ("gamification_rewards"."seen_at" IS NOT NULL)  (0.5ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-05-16 07:12:06.432276"], ["updated_at", "2014-05-16 07:12:06.432276"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.2ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.3ms) INSERT INTO "gamification_rewards" ("created_at", "seen_at", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-05-16 07:12:06.436437"], ["seen_at", "2014-05-14 07:12:06.434602"], ["updated_at", "2014-05-16 07:12:06.436437"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-05-16 07:12:06.443679"], ["points", 1], ["updated_at", "2014-05-16 07:12:06.443679"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-05-16 07:12:06.445244"], ["points", 1], ["updated_at", "2014-05-16 07:12:06.445244"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-05-16 07:12:06.453444"], ["description", "Non et odit nemo."], ["goal_id", 1], ["image", nil], ["name", "qui"], ["updated_at", "2014-05-16 07:12:06.453444"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-05-16 07:12:06.455911"], ["goal_id", 1], ["updated_at", "2014-05-16 07:12:06.455911"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.1ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-05-16 07:12:06.457600"], ["goal_id", 2], ["updated_at", "2014-05-16 07:12:06.457600"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" Gamification::Goal Load (0.2ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.2ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Gamification::Goal Load (0.1ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 2]] Gamification::Medal Load (0.1ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 2]]  (0.6ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.1ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.2ms) INSERT INTO "gamification_rewards" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-05-16 07:12:06.471422"], ["updated_at", "2014-05-16 07:12:06.471422"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.1ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."seen_at" IS NULL  (0.4ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-05-16 07:12:06.473825"], ["points", 1], ["updated_at", "2014-05-16 07:12:06.473825"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-05-16 07:12:06.473825"], ["points", 1], ["updated_at", "2014-05-16 07:12:06.473825"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-05-16 07:12:06.473825"], ["description", "Non et odit nemo."], ["goal_id", 1], ["image", nil], ["name", "qui"], ["updated_at", "2014-05-16 07:12:06.473825"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-05-16 07:12:06.473825"], ["goal_id", 1], ["updated_at", "2014-05-16 07:12:06.473825"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 2) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-05-16 07:12:06.473825"], ["goal_id", 2], ["updated_at", "2014-05-16 07:12:06.473825"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 2]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-05-16 07:12:06.473825"], ["points", 1], ["updated_at", "2014-05-16 07:12:06.473825"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-05-16 07:12:06.473825"], ["points", 1], ["updated_at", "2014-05-16 07:12:06.473825"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-05-16 07:12:06.473825"], ["updated_at", "2014-05-16 07:12:06.473825"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-05-16 07:12:06.473825"], ["points", 1], ["updated_at", "2014-05-16 07:12:06.473825"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-05-16 07:12:06.473825"], ["points", 1], ["updated_at", "2014-05-16 07:12:06.473825"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-05-16 07:12:06.473825"], ["updated_at", "2014-05-16 07:12:06.473825"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-05-16 07:12:06.473825"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-05-16 07:12:06.473825"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 2]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-05-16 07:12:06.473825"], ["points", 1], ["updated_at", "2014-05-16 07:12:06.473825"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-05-16 07:12:06.473825"], ["updated_at", "2014-05-16 07:12:06.473825"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-05-16 07:12:06.473825"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-05-16 07:12:06.473825"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-05-16 07:12:06.473825"], ["points", 1], ["updated_at", "2014-05-16 07:12:06.473825"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-05-16 07:12:06.473825"], ["updated_at", "2014-05-16 07:12:06.473825"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-05-16 07:12:06.473825"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-05-16 07:12:06.473825"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-05-16 07:12:06.473825"], ["points", 1], ["updated_at", "2014-05-16 07:12:06.473825"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-05-16 07:12:06.473825"], ["updated_at", "2014-05-16 07:12:06.473825"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-05-16 07:12:06.473825"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-05-16 07:12:06.473825"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-05-16 07:12:06.473825"], ["points", 1], ["updated_at", "2014-05-16 07:12:06.473825"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-05-16 07:12:06.473825"], ["updated_at", "2014-05-16 07:12:06.473825"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-05-16 07:12:06.473825"], ["updated_at", "2014-05-16 07:12:06.473825"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" IS NULL) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-05-16 07:12:06.473825"], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-05-16 07:12:06.473825"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? AND "gamification_rewards"."seen_at" IS NULL [["rewardable_id", 1], ["rewardable_type", "User"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) UPDATE "gamification_rewards" SET "updated_at" = '2014-05-16 07:12:06.473825', "seen_at" = '2014-05-16 07:12:06.473825' WHERE "gamification_rewards"."id" = 1  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-05-16 07:12:06.473825"], ["updated_at", "2014-05-16 07:12:06.473825"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by ArticlesController#show as HTML Parameters: {"id"=>"1"} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Completed 200 OK in 0ms (Views: 0.0ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-05-16 07:12:06.473825"], ["updated_at", "2014-05-16 07:12:06.473825"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-05-16 07:12:06.473825"], ["description", "Non et odit nemo."], ["image", nil], ["name", "qui"], ["updated_at", "2014-05-16 07:12:06.473825"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-05-16 07:12:06.473825"], ["points", 1], ["updated_at", "2014-05-16 07:12:06.473825"]] SQL (0.0ms) UPDATE "gamification_medals" SET "goal_id" = ? WHERE "gamification_medals"."id" = 1 [["goal_id", 1]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-05-16 07:12:06.473825"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-05-16 07:12:06.473825"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."rewardable_id" = ? AND "gamification_rewards"."rewardable_type" = ? [["rewardable_id", 1], ["rewardable_type", "User"]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-05-16 07:12:06.473825"], ["points", 100], ["updated_at", "2014-05-16 07:12:06.473825"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-05-16 07:12:06.473825"], ["goal_id", 1], ["updated_at", "2014-05-16 07:12:06.473825"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-05-16 07:12:06.473825"], ["description", "Non et odit nemo."], ["goal_id", 1], ["image", nil], ["name", "qui"], ["updated_at", "2014-05-16 07:12:06.473825"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_reward.html.erb (0.0ms) Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-05-16 07:12:06.473825"], ["points", 100], ["updated_at", "2014-05-16 07:12:06.473825"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-05-16 07:12:06.473825"], ["goal_id", 1], ["updated_at", "2014-05-16 07:12:06.473825"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-05-16 07:12:06.473825"], ["description", "Non et odit nemo."], ["goal_id", 1], ["image", nil], ["name", "qui"], ["updated_at", "2014-05-16 07:12:06.473825"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_reward.html.erb (0.0ms) Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-05-16 07:12:06.473825"], ["points", 100], ["updated_at", "2014-05-16 07:12:06.473825"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" IS NULL AND "gamification_rewards"."rewardable_type" IS NULL AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-05-16 07:12:06.473825"], ["goal_id", 1], ["updated_at", "2014-05-16 07:12:06.473825"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_medals" ("created_at", "description", "goal_id", "image", "name", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", "2014-05-16 07:12:06.473825"], ["description", "Non et odit nemo."], ["goal_id", 1], ["image", nil], ["name", "qui"], ["updated_at", "2014-05-16 07:12:06.473825"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Gamification::Medal Load (0.0ms) SELECT "gamification_medals".* FROM "gamification_medals" WHERE "gamification_medals"."goal_id" = ? LIMIT 1 [["goal_id", 1]] Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_reward.html.erb (0.0ms) Rendered /Users/jgorset/code/ruby/gamification/app/views/gamification/rewards/_presentation.html.erb (0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-05-16 07:12:06.473825"], ["updated_at", "2014-05-16 07:12:06.473825"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-05-16 07:12:06.473825"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-05-16 07:12:06.473825"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-05-16 07:12:06.473825"], ["updated_at", "2014-05-16 07:12:06.473825"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-05-16 07:12:06.473825"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-05-16 07:12:06.473825"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "articles" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-05-16 07:12:06.473825"], ["updated_at", "2014-05-16 07:12:06.473825"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "rewarding_id", "rewarding_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-05-16 07:12:06.473825"], ["points", 1], ["rewarding_id", 1], ["rewarding_type", "Article"], ["updated_at", "2014-05-16 07:12:06.473825"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-05-16 07:12:06.473825"], ["updated_at", "2014-05-16 07:12:06.473825"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Article", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Article Load (0.0ms) SELECT "articles".* FROM "articles" WHERE "articles"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."rewarding_id" = ? AND "gamification_goals"."rewarding_type" = ? [["rewarding_id", 1], ["rewarding_type", "Article"]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-05-16 07:12:06.473825"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-05-16 07:12:06.473825"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-05-16 07:12:06.473825"], ["points", 1], ["updated_at", "2014-05-16 07:12:06.473825"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-05-16 07:12:06.473825"], ["updated_at", "2014-05-16 07:12:06.473825"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-05-16 07:12:06.473825"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-05-16 07:12:06.473825"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) SELECT COUNT(*) FROM "gamification_rewards"  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "gamification_goals" ("created_at", "points", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-05-16 07:12:06.473825"], ["points", 1], ["updated_at", "2014-05-16 07:12:06.473825"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.0ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", "2014-05-16 07:12:06.473825"], ["updated_at", "2014-05-16 07:12:06.473825"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Gamification::RewardsController#create as HTML Parameters: {"redirect_url"=>"http://example.org", "reward"=>{"rewarding_type"=>"Gamification::Goal", "rewarding_id"=>"1", "rewardable_type"=>"User", "rewardable_id"=>"1"}} Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] Gamification::Goal Load (0.0ms) SELECT "gamification_goals".* FROM "gamification_goals" WHERE "gamification_goals"."id" = ? LIMIT 1 [["id", 1]] User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] Gamification::Reward Load (0.0ms) SELECT "gamification_rewards".* FROM "gamification_rewards" WHERE "gamification_rewards"."goal_id" = ? AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."rewardable_id" = 1 LIMIT 1 [["goal_id", 1]]  (0.0ms) SAVEPOINT active_record_1 Gamification::Reward Exists (0.0ms) SELECT 1 AS one FROM "gamification_rewards" WHERE ("gamification_rewards"."rewardable_id" = 1 AND "gamification_rewards"."rewardable_type" = 'User' AND "gamification_rewards"."goal_id" = 1) LIMIT 1 SQL (0.0ms) INSERT INTO "gamification_rewards" ("created_at", "goal_id", "rewardable_id", "rewardable_type", "updated_at") VALUES (?, ?, ?, ?, ?) [["created_at", "2014-05-16 07:12:06.473825"], ["goal_id", 1], ["rewardable_id", 1], ["rewardable_type", "User"], ["updated_at", "2014-05-16 07:12:06.473825"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://example.org Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) rollback transaction