test/dummy/log/test.log in advert_selector-1.0.0 vs test/dummy/log/test.log in advert_selector-1.0.1

- old
+ new

@@ -66463,5 +66463,793 @@ [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.5ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction +Connecting to database specified by database.yml +  (0.1ms) begin transaction + Fixture Delete (1.6ms) DELETE FROM "advert_selector_banners" + Fixture Insert (0.7ms) INSERT INTO "advert_selector_banners" ("comment", "name", "placement_id", "created_at", "running_view_count", "end_time", "confirmed", "updated_at", "priority", "id", "target_view_count", "fast_mode", "frequency", "start_time") VALUES ('Coke banner', 'Coke', 405688915, '2012-10-21 14:14:30', 100, '2012-10-26 00:00:00', 't', '2012-10-21 14:14:30', 50, 814558298, 1000, 'f', 0, '2012-10-16 00:00:00') + Fixture Insert (0.1ms) INSERT INTO "advert_selector_banners" ("comment", "name", "placement_id", "created_at", "end_time", "confirmed", "updated_at", "priority", "id", "target_view_count", "fast_mode", "frequency", "start_time") VALUES ('Pepsi banner', 'Pepsi', 405688915, '2012-10-21 14:14:30', '2012-10-31 00:00:00', 't', '2012-10-21 14:14:30', 100, 394627963, 1000, 't', 0, '2012-10-21 00:00:00') + Fixture Insert (0.0ms) INSERT INTO "advert_selector_banners" ("name", "placement_id", "created_at", "end_time", "confirmed", "updated_at", "priority", "id", "target_view_count", "fast_mode", "frequency", "start_time") VALUES ('parade_banner', 718799085, '2012-10-21 14:14:30', '2012-10-31 00:00:00', 'f', '2012-10-21 14:14:30', 1000, 207249520, 1000, 't', 1, '2012-10-21 00:00:00') + Fixture Delete (0.2ms) DELETE FROM "advert_selector_helper_items" + Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "id", "content_for", "banner_id", "content") VALUES ('banner_leaderboard', 2, '2012-10-21 14:14:30', '2012-10-21 14:14:30', 960656439, 't', 394627963, '<img src=''pepsi_banner''/>') + Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "id", "content_for", "banner_id", "content") VALUES (1, 'banner_leaderboard', '2012-10-21 14:14:30', '2012-10-21 14:14:30', 929640376, 't', 814558298, '<img src=''coke_banner''/>') + Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "id", "content_for", "banner_id", "content") VALUES ('banner_parade', 1, '2012-10-21 14:14:30', '2012-10-21 14:14:30', 281932184, 't', 207249520, '<img src=''banner_parade''/>') + Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "id", "content_for", "banner_id", "content") VALUES ('request_params_include?', '2012-10-21 14:14:30', '2012-10-21 14:14:30', 435138789, 'f', 394627963, 'pepsi=true') + Fixture Delete (0.1ms) DELETE FROM "advert_selector_placements" + Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Parade', '2012-10-21 14:14:30', '2012-10-21 14:14:30', 'leaderboard,video', 718799085) + Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "only_once_per_session", "id") VALUES ('Video', '2012-10-21 14:14:30', '2012-10-21 14:14:30', 'parade', 't', 1019730477) + Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-10-21 14:14:30', '2012-10-21 14:14:30', 'parade', 405688915) +  (51.2ms) commit transaction +  (0.1ms) begin transaction + AdvertSelector::Banner Load (0.6ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]] + AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]] +  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" +  (0.1ms) SAVEPOINT active_record_1 + AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."banner_id" = 814558298) ORDER BY advert_selector_helper_items.position DESC LIMIT 1 + SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("banner_id", "content", "content_for", "created_at", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["banner_id", 814558298], ["content", nil], ["content_for", nil], ["created_at", Sun, 21 Oct 2012 09:00:00 UTC +00:00], ["name", nil], ["position", 2], ["updated_at", Sun, 21 Oct 2012 09:00:00 UTC +00:00]] + SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."banner_id" = 814558298 AND position >= 10) + SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("banner_id", "content", "content_for", "created_at", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["banner_id", 814558298], ["content", nil], ["content_for", true], ["created_at", Sun, 21 Oct 2012 09:00:00 UTC +00:00], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Sun, 21 Oct 2012 09:00:00 UTC +00:00]] + SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."banner_id" = 814558298 AND position >= 0) + SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("banner_id", "content", "content_for", "created_at", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["banner_id", 814558298], ["content", nil], ["content_for", nil], ["created_at", Sun, 21 Oct 2012 09:00:00 UTC +00:00], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Sun, 21 Oct 2012 09:00:00 UTC +00:00]] + AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 ORDER BY position + SQL (0.1ms) DELETE FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."id" = ? [["id", 960656440]] + SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position - 1) WHERE ("advert_selector_helper_items"."banner_id" = 814558298 AND position > 3) +  (0.0ms) RELEASE SAVEPOINT active_record_1 + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]] +  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items"  + AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 ORDER BY position LIMIT 1 + AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 ORDER BY position DESC LIMIT 1 +  (0.1ms) rollback transaction +  (0.0ms) begin transaction + AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]] +  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-10-21 09:00:00.000070' OR end_time IS NULL) +  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-10-21 09:00:00.000850' OR end_time IS NULL) AND (start_time < '2012-10-21 10:00:00.000964' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count) +  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-10-21 09:00:00.001830' OR end_time IS NULL) +  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-10-21 09:00:00.002483' OR end_time IS NULL) AND (start_time < '2011-10-21 10:00:00.002594' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count) +  (0.0ms) rollback transaction +  (0.0ms) begin transaction + AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]] +  (0.1ms) rollback transaction +  (0.0ms) begin transaction + AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]] +  (0.0ms) SAVEPOINT active_record_1 +  (0.3ms) UPDATE "advert_selector_banners" SET "running_view_count" = 0, "updated_at" = '2012-10-21 09:00:00.000867' WHERE "advert_selector_banners"."id" = 814558298 + AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 ORDER BY position +  (0.0ms) RELEASE SAVEPOINT active_record_1 + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]] +  (0.0ms) SAVEPOINT active_record_1 +  (0.1ms) UPDATE "advert_selector_banners" SET "running_view_count" = 551, "updated_at" = '2012-10-21 09:00:00.006737' WHERE "advert_selector_banners"."id" = 814558298 +  (0.0ms) RELEASE SAVEPOINT active_record_1 + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]] +  (0.1ms) rollback transaction +  (0.0ms) begin transaction + AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]] +  (0.0ms) SAVEPOINT active_record_1 +  (0.2ms) UPDATE "advert_selector_banners" SET "running_view_count" = 0, "target_view_count" = 10, "updated_at" = '2012-10-21 09:00:00.000830' WHERE "advert_selector_banners"."id" = 814558298 + AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 ORDER BY position +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.1ms) UPDATE "advert_selector_banners" SET "running_view_count" = 10, "updated_at" = '2012-10-21 09:00:00.003963' WHERE "advert_selector_banners"."id" = 814558298 +  (0.0ms) RELEASE SAVEPOINT active_record_1 + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]] +  (0.1ms) rollback transaction +  (0.0ms) begin transaction + AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]] +  (0.0ms) SAVEPOINT active_record_1 +  (0.2ms) UPDATE "advert_selector_banners" SET "confirmed" = 'f', "updated_at" = '2012-10-21 09:00:00.000393' WHERE "advert_selector_banners"."id" = 814558298 + AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 ORDER BY position +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.1ms) UPDATE "advert_selector_banners" SET "confirmed" = 't', "updated_at" = '2012-10-21 09:00:00.002458' WHERE "advert_selector_banners"."id" = 814558298 +  (0.0ms) RELEASE SAVEPOINT active_record_1 + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]] +  (0.1ms) rollback transaction +  (0.0ms) begin transaction + AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]] +  (0.0ms) SAVEPOINT active_record_1 +  (0.2ms) UPDATE "advert_selector_banners" SET "start_time" = '2012-10-21 10:00:00.000332', "updated_at" = '2012-10-21 09:00:00.000717' WHERE "advert_selector_banners"."id" = 814558298 + AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 ORDER BY position +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.2ms) UPDATE "advert_selector_banners" SET "start_time" = '2012-10-21 07:00:00.002229', "end_time" = '2012-10-21 08:00:00.002298', "updated_at" = '2012-10-21 09:00:00.002605' WHERE "advert_selector_banners"."id" = 814558298 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.1ms) UPDATE "advert_selector_banners" SET "start_time" = NULL, "end_time" = '2012-10-21 10:00:00.003606', "updated_at" = '2012-10-21 09:00:00.003943' WHERE "advert_selector_banners"."id" = 814558298 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) rollback transaction +  (0.0ms) begin transaction + AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]] +  (0.0ms) SAVEPOINT active_record_1 +  (0.3ms) UPDATE "advert_selector_banners" SET "start_time" = '2012-10-20 21:00:00.000000', "end_time" = '2012-10-31 00:00:00.000000', "target_view_count" = 100, "updated_at" = '2012-10-21 09:00:00.000818' WHERE "advert_selector_banners"."id" = 814558298 + AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 ORDER BY position +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.1ms) UPDATE "advert_selector_banners" SET "running_view_count" = 0, "updated_at" = '2012-10-21 09:00:00.002989' WHERE "advert_selector_banners"."id" = 814558298 +  (0.0ms) RELEASE SAVEPOINT active_record_1 + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]] +  (0.1ms) rollback transaction +  (0.0ms) begin transaction + AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]] +  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" +Processing by AdvertSelector::BannersController#create as HTML + Parameters: {"banner"=>{"comment"=>"Pepsi banner", "name"=>"Pepsi", "placement_id"=>"405688915", "end_time"=>"2012-10-31 00:00:00 UTC", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-10-21 00:00:00 UTC"}} +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.6ms) INSERT INTO "advert_selector_banners" ("comment", "confirmed", "created_at", "end_time", "fast_mode", "frequency", "name", "placement_id", "priority", "running_view_count", "start_time", "target_view_count", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["comment", "Pepsi banner"], ["confirmed", false], ["created_at", Sun, 21 Oct 2012 09:00:00 UTC +00:00], ["end_time", Wed, 31 Oct 2012 00:00:00 UTC +00:00], ["fast_mode", false], ["frequency", 0], ["name", "Pepsi"], ["placement_id", 405688915], ["priority", 0], ["running_view_count", 0], ["start_time", Sun, 21 Oct 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Sun, 21 Oct 2012 09:00:00 UTC +00:00]] + AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558299 ORDER BY position +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://test.host/advert_selector/banners/814558299 +Completed 302 Found in 5ms (ActiveRecord: 0.7ms) +  (0.0ms) SELECT COUNT(*) FROM "advert_selector_banners"  +  (0.1ms) rollback transaction +  (0.0ms) begin transaction + AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]] +  (0.0ms) SELECT COUNT(*) FROM "advert_selector_banners"  +Processing by AdvertSelector::BannersController#destroy as HTML + Parameters: {"id"=>"394627963"} + AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", "394627963"]] +  (0.0ms) SAVEPOINT active_record_1 + AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 394627963 ORDER BY position + SQL (0.3ms) DELETE FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."id" = ? [["id", 435138789]] + SQL (0.0ms) DELETE FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."id" = ? [["id", 960656439]] + SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position - 1) WHERE ("advert_selector_helper_items"."banner_id" = 394627963 AND position > 2) + SQL (0.2ms) DELETE FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? [["id", 394627963]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://test.host/advert_selector/banners +Completed 302 Found in 4ms (ActiveRecord: 0.8ms) +  (0.0ms) SELECT COUNT(*) FROM "advert_selector_banners" +  (0.1ms) rollback transaction +  (0.0ms) begin transaction + AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]] +Processing by AdvertSelector::BannersController#edit as HTML + Parameters: {"id"=>"394627963"} + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", "394627963"]] + AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  +  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 394627963 + AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 394627963 ORDER BY position + Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/banners/_form.html.erb (74.8ms) + AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-10-19 09:00:00.087526') ORDER BY priority desc LIMIT 10 + AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = 718799085 LIMIT 1 + AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = 405688915 LIMIT 1 + AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = 405688915 LIMIT 1 + AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" +Completed 200 OK in 92ms (Views: 90.5ms | ActiveRecord: 0.8ms) +  (0.1ms) rollback transaction +  (0.0ms) begin transaction + AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]] +Processing by AdvertSelector::BannersController#index as HTML + AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" + AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-10-19 09:00:00.006941') ORDER BY priority desc LIMIT 10 + AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = 718799085 LIMIT 1 + AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = 405688915 LIMIT 1 + AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = 405688915 LIMIT 1 + AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  +Completed 200 OK in 10ms (Views: 9.2ms | ActiveRecord: 0.5ms) +  (0.1ms) rollback transaction +  (0.0ms) begin transaction + AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]] +Processing by AdvertSelector::BannersController#new as HTML + AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  + Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/banners/_form.html.erb (18.2ms) + AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-10-19 09:00:00.023061') ORDER BY priority desc LIMIT 10 + AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = 718799085 LIMIT 1 + AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = 405688915 LIMIT 1 + AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = 405688915 LIMIT 1 + AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" +Completed 200 OK in 27ms (Views: 25.4ms | ActiveRecord: 0.5ms) +  (0.1ms) rollback transaction +  (0.0ms) begin transaction + AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]] +Processing by AdvertSelector::BannersController#show as HTML + Parameters: {"id"=>"394627963"} +Redirected to http://test.host/advert_selector/banners/394627963/edit +Completed 302 Found in 1ms (ActiveRecord: 0.0ms) +  (0.1ms) rollback transaction +  (0.0ms) begin transaction + AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]] +Processing by AdvertSelector::BannersController#update as HTML + Parameters: {"banner"=>{"comment"=>"Pepsi banner"}, "id"=>"394627963"} + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", "394627963"]] +  (0.0ms) SAVEPOINT active_record_1 + AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 394627963 ORDER BY position +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://test.host/advert_selector/banners/394627963 +Completed 302 Found in 3ms (ActiveRecord: 0.2ms) +  (0.1ms) rollback transaction +  (0.0ms) begin transaction + AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]] +  (0.0ms) SAVEPOINT active_record_1 +  (0.2ms) UPDATE "advert_selector_banners" SET "running_view_count" = 1, "updated_at" = '2012-10-21 09:00:00.001148' WHERE "advert_selector_banners"."id" = 394627963 + AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 394627963 ORDER BY position +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Processing by AdvertSelector::BannersController#update_running_view_count as HTML + Parameters: {"banner"=>{"running_view_count"=>"99"}, "id"=>"394627963"} + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", "394627963"]] + SQL (0.1ms) UPDATE "advert_selector_banners" SET "running_view_count" = 99 WHERE "advert_selector_banners"."id" = 394627963 + SQL (0.4ms) UPDATE "advert_selector_banners" SET "running_view_count" = 99 WHERE "advert_selector_banners"."id" = 394627963 +Redirected to http://test.host/advert_selector/banners/394627963 +Completed 302 Found in 1117ms (ActiveRecord: 0.5ms) + AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] +  (0.1ms) rollback transaction +  (0.0ms) begin transaction + AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]] +Processing by AdvertSelector::MainController#index as HTML +Filter chain halted as :admin_access_only rendered or redirected +Completed 403 Forbidden in 2ms (Views: 1.1ms | ActiveRecord: 0.0ms) +  (0.1ms) rollback transaction +  (0.0ms) begin transaction + AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]] +Processing by AdvertSelector::MainController#clear_errors_log as HTML +Redirected to http://test.host/advert_selector/ +Completed 302 Found in 1ms (ActiveRecord: 0.0ms) +  (0.1ms) rollback transaction +  (0.0ms) begin transaction + AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]] +Processing by AdvertSelector::MainController#index as HTML + AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-10-19 09:00:00.004281') ORDER BY priority desc LIMIT 10 + AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = 718799085 LIMIT 1 + AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = 405688915 LIMIT 1 + AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = 405688915 LIMIT 1 + AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  +Completed 200 OK in 8ms (Views: 7.2ms | ActiveRecord: 0.4ms) +  (0.1ms) rollback transaction +  (0.0ms) begin transaction + AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]] + AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 718799085]] + AdvertSelector::Placement Load (0.0ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]] +  (0.1ms) rollback transaction +  (0.0ms) begin transaction + AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]] + AdvertSelector::Placement Load (0.0ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 718799085]] + AdvertSelector::Placement Load (0.0ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]] +  (0.0ms) SAVEPOINT active_record_1 +  (0.2ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-10-21 09:00:00.000781', "conflicting_placements_array" = 'not_found,video' WHERE "advert_selector_placements"."id" = 718799085 + AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE (LOWER(name) = 'leaderboard') LIMIT 1 +  (0.1ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-10-21 09:00:00.002313', "conflicting_placements_array" = '' WHERE "advert_selector_placements"."id" = 405688915 + AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE (LOWER(name) = 'parade') LIMIT 1 + AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."name" = 'not_found' LIMIT 1 + AdvertSelector::Placement Load (0.0ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."name" = 'video' LIMIT 1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 + AdvertSelector::Placement Load (0.0ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 718799085]] + AdvertSelector::Placement Load (0.0ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]] +  (0.1ms) rollback transaction +  (0.0ms) begin transaction + AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]] + AdvertSelector::Placement Load (0.0ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 718799085]] + AdvertSelector::Placement Load (0.0ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]] +  (0.0ms) rollback transaction +  (0.0ms) begin transaction + AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]] + AdvertSelector::Placement Load (0.0ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 718799085]] + AdvertSelector::Placement Load (0.0ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]] +  (0.1ms) rollback transaction +  (0.0ms) begin transaction + AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]] + AdvertSelector::Placement Load (0.0ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 718799085]] + AdvertSelector::Placement Load (0.0ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]] +  (0.0ms) rollback transaction +  (0.0ms) begin transaction + AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]] + AdvertSelector::Placement Load (0.0ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]] +  (0.0ms) SELECT COUNT(*) FROM "advert_selector_placements"  +Processing by AdvertSelector::PlacementsController#create as HTML + Parameters: {"placement"=>{"name"=>"new placement"}} +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.4ms) INSERT INTO "advert_selector_placements" ("conflicting_placements_array", "created_at", "name", "only_once_per_session", "updated_at") VALUES (?, ?, ?, ?, ?) [["conflicting_placements_array", nil], ["created_at", Sun, 21 Oct 2012 09:00:00 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Sun, 21 Oct 2012 09:00:00 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://test.host/advert_selector/placements/1019730478 +Completed 302 Found in 3ms (ActiveRecord: 0.5ms) +  (0.0ms) SELECT COUNT(*) FROM "advert_selector_placements"  +  (0.1ms) rollback transaction +  (0.0ms) begin transaction + AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]] + AdvertSelector::Placement Load (0.0ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]] +  (0.0ms) SELECT COUNT(*) FROM "advert_selector_placements" +Processing by AdvertSelector::PlacementsController#destroy as HTML + Parameters: {"id"=>"405688915"} + AdvertSelector::Placement Load (0.0ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", "405688915"]] +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) DELETE FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? [["id", 405688915]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://test.host/advert_selector/placements +Completed 302 Found in 2ms (ActiveRecord: 0.3ms) +  (0.0ms) SELECT COUNT(*) FROM "advert_selector_placements"  +  (0.1ms) rollback transaction +  (0.0ms) begin transaction + AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]] + AdvertSelector::Placement Load (0.0ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]] +Processing by AdvertSelector::PlacementsController#edit as HTML + Parameters: {"id"=>"405688915"} + AdvertSelector::Placement Load (0.0ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", "405688915"]] + AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE (LOWER(name) = 'leaderboard') LIMIT 1 + AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE (LOWER(name) = 'parade') LIMIT 1 + Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/placements/_form.html.erb (5.9ms) + AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-10-19 09:00:00.011813') ORDER BY priority desc LIMIT 10 + AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = 718799085 LIMIT 1 + AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = 405688915 LIMIT 1 + AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = 405688915 LIMIT 1 + AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  +Completed 200 OK in 15ms (Views: 13.6ms | ActiveRecord: 0.6ms) +  (0.1ms) rollback transaction +  (0.0ms) begin transaction + AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]] + AdvertSelector::Placement Load (0.0ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]] +Processing by AdvertSelector::PlacementsController#index as HTML + AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" + AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-10-19 09:00:00.006444') ORDER BY priority desc LIMIT 10 + AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = 718799085 LIMIT 1 + AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = 405688915 LIMIT 1 + AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = 405688915 LIMIT 1 + AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  +Completed 200 OK in 10ms (Views: 9.1ms | ActiveRecord: 0.5ms) +  (0.1ms) rollback transaction +  (0.0ms) begin transaction + AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]] + AdvertSelector::Placement Load (0.0ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]] +Processing by AdvertSelector::PlacementsController#new as HTML + AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE (LOWER(name) = '') LIMIT 1 + Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/placements/_form.html.erb (4.2ms) + AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-10-19 09:00:00.008609') ORDER BY priority desc LIMIT 10 + AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = 718799085 LIMIT 1 + AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = 405688915 LIMIT 1 + AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = 405688915 LIMIT 1 + AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  +Completed 200 OK in 12ms (Views: 11.4ms | ActiveRecord: 0.5ms) +  (0.1ms) rollback transaction +  (0.0ms) begin transaction + AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]] + AdvertSelector::Placement Load (0.0ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]] +Processing by AdvertSelector::PlacementsController#show as HTML + Parameters: {"id"=>"405688915"} +Redirected to http://test.host/advert_selector/placements/405688915/edit +Completed 302 Found in 1ms (ActiveRecord: 0.0ms) +  (0.1ms) rollback transaction +  (0.0ms) begin transaction + AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]] + AdvertSelector::Placement Load (0.0ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]] +Processing by AdvertSelector::PlacementsController#update as HTML + Parameters: {"id"=>"405688915", "placement"=>{"name"=>"Leaderboard"}} + AdvertSelector::Placement Load (0.0ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", "405688915"]] +  (0.0ms) SAVEPOINT active_record_1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://test.host/advert_selector/placements/405688915 +Completed 302 Found in 2ms (ActiveRecord: 0.1ms) +  (0.1ms) rollback transaction +  (0.0ms) begin transaction + AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]] +  (0.0ms) rollback transaction +  (0.0ms) begin transaction + AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]] +  (0.0ms) SAVEPOINT active_record_1 +  (0.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-21 09:00:00.000369' WHERE "advert_selector_banners"."id" = 814558298 + AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 ORDER BY position +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.1ms) UPDATE "advert_selector_banners" SET "confirmed" = 'f', "updated_at" = '2012-10-21 09:00:00.002257' WHERE "advert_selector_banners"."id" = 394627963 + AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 394627963 ORDER BY position +  (0.0ms) RELEASE SAVEPOINT active_record_1 + + +Started GET "/" for 127.0.0.1 at Sun Oct 21 12:00:00 +0300 2012 +Processing by ExamplesController#index as HTML +[AdvertSelector] AdvertSelection initialized +[AdvertSelector] AdvertSelection fetching banners and placements +[AdvertSelector] AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time > '2012-10-21 09:00:00.006940' OR end_time IS NULL) AND (start_time < '2012-10-21 10:00:00.007131' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count) ORDER BY priority desc +[AdvertSelector] AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" IN (718799085, 405688915) +[AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" IN (207249520, 394627963, 814558298) ORDER BY position +[AdvertSelector] Showing banner Coke in placement Leaderboard +[AdvertSelector] AdvertSelection finished +Completed 200 OK in 10ms (Views: 9.1ms | ActiveRecord: 0.4ms) + AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."banner_id" = 814558298 AND position >= 0) + SQL (0.2ms) INSERT INTO "advert_selector_helper_items" ("banner_id", "content", "content_for", "created_at", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["banner_id", 814558298], ["content", nil], ["content_for", nil], ["created_at", Sun, 21 Oct 2012 09:00:00 UTC +00:00], ["name", "always_false"], ["position", 0], ["updated_at", Sun, 21 Oct 2012 09:00:00 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + + +Started GET "/" for 127.0.0.1 at Sun Oct 21 12:00:00 +0300 2012 +Processing by ExamplesController#index as HTML +[AdvertSelector] AdvertSelection initialized +[AdvertSelector] AdvertSelection fetching banners and placements +[AdvertSelector] AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time > '2012-10-21 09:00:00.020084' OR end_time IS NULL) AND (start_time < '2012-10-21 10:00:00.020252' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count) ORDER BY priority desc +[AdvertSelector] AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" IN (718799085, 405688915) +[AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" IN (207249520, 394627963, 814558298) ORDER BY position +[AdvertSelector] AdvertSelection finished +Completed 200 OK in 4ms (Views: 3.8ms | ActiveRecord: 0.3ms) + AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 +  (0.1ms) rollback transaction +  (0.0ms) begin transaction + AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]] +  (0.0ms) SAVEPOINT active_record_1 +  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-21 09:00:00.000383' WHERE "advert_selector_banners"."id" = 814558298 + AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 ORDER BY position +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.1ms) UPDATE "advert_selector_banners" SET "confirmed" = 'f', "updated_at" = '2012-10-21 09:00:00.002374' WHERE "advert_selector_banners"."id" = 394627963 + AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 394627963 ORDER BY position +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 + SQL (0.2ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."banner_id" = 814558298 AND position >= 0) + SQL (0.2ms) INSERT INTO "advert_selector_helper_items" ("banner_id", "content", "content_for", "created_at", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["banner_id", 814558298], ["content", nil], ["content_for", nil], ["created_at", Sun, 21 Oct 2012 09:00:00 UTC +00:00], ["name", "raise_error"], ["position", 0], ["updated_at", Sun, 21 Oct 2012 09:00:00 UTC +00:00]] +  (0.0ms) RELEASE SAVEPOINT active_record_1 + + +Started GET "/" for 127.0.0.1 at Sun Oct 21 12:00:00 +0300 2012 +Processing by ExamplesController#index as HTML +[AdvertSelector] AdvertSelection initialized +[AdvertSelector] AdvertSelection fetching banners and placements +[AdvertSelector] AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time > '2012-10-21 09:00:00.004457' OR end_time IS NULL) AND (start_time < '2012-10-21 10:00:00.004643' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count) ORDER BY priority desc +[AdvertSelector] AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" IN (718799085, 405688915) +[AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" IN (207249520, 394627963, 814558298) ORDER BY position +[AdvertSelector] Error with banner Coke in placement Leaderboard. +2012-10-21T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} +#<ZeroDivisionError: divided by 0> + +/home/ohu/koodi/gems/advert_selector/test/dummy/app/helpers/advert_selector_helper.rb:9:in `/' +/home/ohu/koodi/gems/advert_selector/test/dummy/app/helpers/advert_selector_helper.rb:9:in `advert_selector_raise_error' +/home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:53:in `send' +/home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:53:in `advert_selector_banner_try' +/home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/associations/collection_proxy.rb:89:in `each' +/home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/associations/collection_proxy.rb:89:in `send' +/home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/associations/collection_proxy.rb:89:in `method_missing' +/home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:49:in `advert_selector_banner_try' +/home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:20:in `advert_selector_initialize' +/home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `each' +[AdvertSelector] AdvertSelection finished +Completed 200 OK in 6ms (Views: 5.5ms | ActiveRecord: 0.4ms) + AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 + + +Started GET "/advert_selector/placements" for 127.0.0.1 at Sun Oct 21 12:00:00 +0300 2012 +Processing by AdvertSelector::PlacementsController#index as HTML + AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" + AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-10-19 09:00:00.021162') ORDER BY priority desc LIMIT 10 + AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = 718799085 LIMIT 1 + AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = 405688915 LIMIT 1 + CACHE (0.0ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = 405688915 LIMIT 1 + CACHE (0.0ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  +Completed 200 OK in 15ms (Views: 13.8ms | ActiveRecord: 0.4ms) +  (0.1ms) rollback transaction +  (0.0ms) begin transaction + AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]] +  (0.0ms) SAVEPOINT active_record_1 +  (0.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-21 09:00:00.000459' WHERE "advert_selector_banners"."id" = 814558298 + AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 ORDER BY position +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.1ms) UPDATE "advert_selector_banners" SET "confirmed" = 'f', "updated_at" = '2012-10-21 09:00:00.002322' WHERE "advert_selector_banners"."id" = 394627963 + AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 394627963 ORDER BY position +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.1ms) UPDATE "advert_selector_banners" SET "frequency" = 2, "updated_at" = '2012-10-21 09:00:00.000268' WHERE "advert_selector_banners"."id" = 814558298 +  (0.0ms) RELEASE SAVEPOINT active_record_1 + + +Started GET "/" for 127.0.0.1 at Sun Oct 21 12:00:00 +0300 2012 +Processing by ExamplesController#index as HTML +[AdvertSelector] AdvertSelection initialized +[AdvertSelector] AdvertSelection fetching banners and placements +[AdvertSelector] AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time > '2012-10-21 09:00:00.003128' OR end_time IS NULL) AND (start_time < '2012-10-21 10:00:00.003303' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count) ORDER BY priority desc +[AdvertSelector] AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" IN (718799085, 405688915) +[AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" IN (207249520, 394627963, 814558298) ORDER BY position +[AdvertSelector] Showing banner Coke in placement Leaderboard +[AdvertSelector] AdvertSelection finished +Completed 200 OK in 6ms (Views: 5.4ms | ActiveRecord: 0.4ms) + AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 + + +Started GET "/" for 127.0.0.1 at Wed Oct 24 12:00:00 +0300 2012 +Processing by ExamplesController#index as HTML +[AdvertSelector] AdvertSelection initialized +[AdvertSelector] AdvertSelection fetching banners and placements +[AdvertSelector] AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time > '2012-10-24 09:00:00.016667' OR end_time IS NULL) AND (start_time < '2012-10-24 10:00:00.016836' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count) ORDER BY priority desc +[AdvertSelector] AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" IN (718799085, 405688915) +[AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" IN (207249520, 394627963, 814558298) ORDER BY position +[AdvertSelector] Showing banner Coke in placement Leaderboard +[AdvertSelector] AdvertSelection finished +Completed 200 OK in 6ms (Views: 5.4ms | ActiveRecord: 0.4ms) + AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 + + +Started GET "/" for 127.0.0.1 at Wed Oct 24 12:00:00 +0300 2012 +Processing by ExamplesController#index as HTML +[AdvertSelector] AdvertSelection initialized +[AdvertSelector] AdvertSelection finished +Completed 200 OK in 2ms (Views: 1.4ms | ActiveRecord: 0.0ms) + AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 +  (0.1ms) rollback transaction +  (0.0ms) begin transaction + AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]] +  (0.0ms) SAVEPOINT active_record_1 +  (0.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-24 09:00:00.000381' WHERE "advert_selector_banners"."id" = 814558298 + AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 ORDER BY position +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.1ms) UPDATE "advert_selector_banners" SET "confirmed" = 'f', "updated_at" = '2012-10-24 09:00:00.002270' WHERE "advert_selector_banners"."id" = 394627963 + AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 394627963 ORDER BY position +  (0.0ms) RELEASE SAVEPOINT active_record_1 + + +Started GET "/" for 127.0.0.1 at Wed Oct 24 12:00:00 +0300 2012 +Processing by ExamplesController#index as HTML +[AdvertSelector] AdvertSelection initialized +[AdvertSelector] AdvertSelection fetching banners and placements +[AdvertSelector] AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time > '2012-10-24 09:00:00.002229' OR end_time IS NULL) AND (start_time < '2012-10-24 10:00:00.002408' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count) ORDER BY priority desc +[AdvertSelector] AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" IN (718799085, 405688915) +[AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" IN (207249520, 394627963, 814558298) ORDER BY position +[AdvertSelector] Showing banner Coke in placement Leaderboard +[AdvertSelector] AdvertSelection finished +Completed 200 OK in 6ms (Views: 5.2ms | ActiveRecord: 0.4ms) + AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 207249520 AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 + + +Started GET "/?advert_selector_force=207249520" for 127.0.0.1 at Wed Oct 24 12:00:00 +0300 2012 +Processing by ExamplesController#index as HTML + Parameters: {"advert_selector_force"=>"207249520"} +[AdvertSelector] AdvertSelection initialized +[AdvertSelector] AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = 207249520 LIMIT 1 +[AdvertSelector] AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = 718799085 LIMIT 1 +[AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 207249520 ORDER BY position +[AdvertSelector] ForceShowing banner parade_banner in placement Parade +[AdvertSelector] AdvertSelection fetching banners and placements +[AdvertSelector] AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time > '2012-10-24 09:00:00.015789' OR end_time IS NULL) AND (start_time < '2012-10-24 10:00:00.015965' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count) ORDER BY priority desc +[AdvertSelector] AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" IN (718799085, 405688915) +[AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" IN (207249520, 394627963, 814558298) ORDER BY position +[AdvertSelector] AdvertSelection finished +Completed 200 OK in 8ms (Views: 7.6ms | ActiveRecord: 0.6ms) + AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 207249520 AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 +  (0.1ms) rollback transaction +  (0.0ms) begin transaction + AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]] +  (0.0ms) SAVEPOINT active_record_1 +  (0.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-24 09:00:00.000411' WHERE "advert_selector_banners"."id" = 814558298 + AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 ORDER BY position +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.1ms) UPDATE "advert_selector_banners" SET "confirmed" = 'f', "updated_at" = '2012-10-24 09:00:00.002326' WHERE "advert_selector_banners"."id" = 394627963 + AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 394627963 ORDER BY position +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.1ms) UPDATE "advert_selector_banners" SET "confirmed" = 't', "updated_at" = '2012-10-24 09:00:00.000621' WHERE "advert_selector_banners"."id" = 207249520 + AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 207249520 ORDER BY position +  (0.1ms) RELEASE SAVEPOINT active_record_1 + + +Started GET "/" for 127.0.0.1 at Wed Oct 24 12:00:00 +0300 2012 +Processing by ExamplesController#index as HTML +[AdvertSelector] AdvertSelection initialized +[AdvertSelector] AdvertSelection fetching banners and placements +[AdvertSelector] AdvertSelector::Banner Load (0.3ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time > '2012-10-24 09:00:00.005454' OR end_time IS NULL) AND (start_time < '2012-10-24 10:00:00.005815' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count) ORDER BY priority desc +[AdvertSelector] AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" IN (718799085, 405688915) +[AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" IN (207249520, 394627963, 814558298) ORDER BY position +[AdvertSelector] Showing banner parade_banner in placement Parade +[AdvertSelector] AdvertSelection finished +Completed 200 OK in 11ms (Views: 9.9ms | ActiveRecord: 0.7ms) + AdvertSelector::HelperItem Load (0.3ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 207249520 AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 + AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 + + +Started GET "/" for 127.0.0.1 at Wed Oct 24 12:00:00 +0300 2012 +Processing by ExamplesController#index as HTML +[AdvertSelector] AdvertSelection initialized +[AdvertSelector] Showing banner Coke in placement Leaderboard +[AdvertSelector] AdvertSelection finished +Completed 200 OK in 4ms (Views: 3.7ms | ActiveRecord: 0.0ms) + AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 207249520 AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 + AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 +  (0.1ms) rollback transaction +  (0.0ms) begin transaction + AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]] +  (0.0ms) SAVEPOINT active_record_1 +  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-24 09:00:00.000547' WHERE "advert_selector_banners"."id" = 814558298 + AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 ORDER BY position +  (0.3ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.1ms) UPDATE "advert_selector_banners" SET "confirmed" = 'f', "updated_at" = '2012-10-24 09:00:00.003291' WHERE "advert_selector_banners"."id" = 394627963 + AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 394627963 ORDER BY position +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.1ms) UPDATE "advert_selector_banners" SET "confirmed" = 't', "updated_at" = '2012-10-24 09:00:00.000538' WHERE "advert_selector_banners"."id" = 207249520 + AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 207249520 ORDER BY position +  (0.0ms) RELEASE SAVEPOINT active_record_1 + AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = 718799085 LIMIT 1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.2ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-10-24 09:00:00.003273', "conflicting_placements_array" = '' WHERE "advert_selector_placements"."id" = 718799085 + AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE (LOWER(name) = 'leaderboard') LIMIT 1 +  (0.1ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-10-24 09:00:00.004897', "conflicting_placements_array" = '' WHERE "advert_selector_placements"."id" = 405688915 + AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE (LOWER(name) = 'parade') LIMIT 1 + AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE (LOWER(name) = 'video') LIMIT 1 +  (0.1ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-10-24 09:00:00.006819', "conflicting_placements_array" = '' WHERE "advert_selector_placements"."id" = 1019730477 + AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE (LOWER(name) = 'parade') LIMIT 1 +  (0.0ms) RELEASE SAVEPOINT active_record_1 + + +Started GET "/" for 127.0.0.1 at Wed Oct 24 12:00:00 +0300 2012 +Processing by ExamplesController#index as HTML +[AdvertSelector] AdvertSelection initialized +[AdvertSelector] AdvertSelection fetching banners and placements +[AdvertSelector] AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time > '2012-10-24 09:00:00.010940' OR end_time IS NULL) AND (start_time < '2012-10-24 10:00:00.011139' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count) ORDER BY priority desc +[AdvertSelector] AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" IN (718799085, 405688915) +[AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" IN (207249520, 394627963, 814558298) ORDER BY position +[AdvertSelector] Showing banner parade_banner in placement Parade +[AdvertSelector] Showing banner Coke in placement Leaderboard +[AdvertSelector] AdvertSelection finished +Completed 200 OK in 8ms (Views: 7.4ms | ActiveRecord: 0.5ms) + AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 207249520 AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 + AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 +  (0.1ms) rollback transaction +  (0.1ms) begin transaction + AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]] + AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]] +  (0.1ms) SAVEPOINT active_record_1 +  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-24 09:00:00.000631' WHERE "advert_selector_banners"."id" = 814558298 + AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 ORDER BY position +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.2ms) UPDATE "advert_selector_banners" SET "confirmed" = 'f', "updated_at" = '2012-10-24 09:00:00.003620' WHERE "advert_selector_banners"."id" = 394627963 + AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 394627963 ORDER BY position +  (0.0ms) RELEASE SAVEPOINT active_record_1 + + +Started GET "/" for 127.0.0.1 at Wed Oct 24 12:00:00 +0300 2012 +Processing by ExamplesController#index as HTML +[AdvertSelector] AdvertSelection initialized +[AdvertSelector] AdvertSelection fetching banners and placements +[AdvertSelector] AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time > '2012-10-24 09:00:00.000248' OR end_time IS NULL) ORDER BY priority desc +[AdvertSelector] AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" IN (718799085, 405688915) +[AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" IN (207249520, 394627963, 814558298) ORDER BY position +[AdvertSelector] Showing banner Coke in placement Leaderboard +[AdvertSelector] AdvertSelection finished +Completed 200 OK in 5ms (Views: 4.7ms | ActiveRecord: 0.3ms) + AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 + + +Started GET "/" for 127.0.0.1 at Wed Oct 24 12:00:00 +0300 2012 +Processing by ExamplesController#index as HTML +[AdvertSelector] AdvertSelection initialized +[AdvertSelector] Showing banner Coke in placement Leaderboard +[AdvertSelector] AdvertSelection finished +Completed 200 OK in 3ms (Views: 2.5ms | ActiveRecord: 0.0ms) + + +Started GET "/" for 127.0.0.1 at Wed Oct 24 12:15:00 +0300 2012 +Processing by ExamplesController#index as HTML +[AdvertSelector] AdvertSelection initialized +[AdvertSelector] AdvertSelection fetching banners and placements +[AdvertSelector] Showing banner Coke in placement Leaderboard +[AdvertSelector] AdvertSelection finished +Completed 200 OK in 3ms (Views: 2.6ms | ActiveRecord: 0.0ms) +  (0.1ms) rollback transaction +  (0.0ms) begin transaction + AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]] +  (0.1ms) SAVEPOINT active_record_1 +  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-24 09:00:00.000562' WHERE "advert_selector_banners"."id" = 814558298 + AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 ORDER BY position +  (0.0ms) RELEASE SAVEPOINT active_record_1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.1ms) UPDATE "advert_selector_banners" SET "confirmed" = 'f', "updated_at" = '2012-10-24 09:00:00.002717' WHERE "advert_selector_banners"."id" = 394627963 + AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 394627963 ORDER BY position +  (0.0ms) RELEASE SAVEPOINT active_record_1 + AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = 405688915 LIMIT 1 +  (0.0ms) SAVEPOINT active_record_1 +  (0.1ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-10-24 09:00:00.001141', "only_once_per_session" = 't' WHERE "advert_selector_placements"."id" = 405688915 +  (0.0ms) RELEASE SAVEPOINT active_record_1 + + +Started GET "/" for 127.0.0.1 at Wed Oct 24 12:00:00 +0300 2012 +Processing by ExamplesController#index as HTML +[AdvertSelector] AdvertSelection initialized +[AdvertSelector] AdvertSelection fetching banners and placements +[AdvertSelector] AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time > '2012-10-24 09:00:00.004146' OR end_time IS NULL) AND (start_time < '2012-10-24 10:00:00.004321' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count) ORDER BY priority desc +[AdvertSelector] AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" IN (718799085, 405688915) +[AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" IN (207249520, 394627963, 814558298) ORDER BY position +[AdvertSelector] Showing banner Coke in placement Leaderboard +[AdvertSelector] AdvertSelection finished +Completed 200 OK in 6ms (Views: 5.2ms | ActiveRecord: 0.4ms) + AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 + + +Started GET "/" for 127.0.0.1 at Wed Oct 24 12:00:00 +0300 2012 +Processing by ExamplesController#index as HTML +[AdvertSelector] AdvertSelection initialized +[AdvertSelector] AdvertSelection finished +Completed 200 OK in 2ms (Views: 1.6ms | ActiveRecord: 0.0ms) + AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 +  (0.1ms) rollback transaction +  (0.0ms) begin transaction + AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] + AdvertSelector::Banner Load (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]] +Processing by ExamplesController#index as HTML +[AdvertSelector] AdvertSelection initialized +[AdvertSelector] AdvertSelection fetching banners and placements +[AdvertSelector] AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time > '2012-10-24 09:00:00.002462' OR end_time IS NULL) AND (start_time < '2012-10-24 10:00:00.002655' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count) ORDER BY priority desc +[AdvertSelector] AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" IN (718799085, 405688915) +[AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" IN (207249520, 394627963, 814558298) ORDER BY position +[AdvertSelector] Showing banner Coke in placement Leaderboard +[AdvertSelector] AdvertSelection finished +Completed 200 OK in 6ms (Views: 5.8ms | ActiveRecord: 0.4ms) +  (0.1ms) rollback transaction