Connecting to database specified by database.yml  (0.2ms) begin transaction  (0.1ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements Completed 500 Internal Server Error in 23ms  (0.0ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements Completed 500 Internal Server Error in 16ms  (0.0ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction  (0.0ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction  (0.0ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements Completed 500 Internal Server Error in 15ms  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 07:41:35', 100, '2012-10-07 00:00:00', 't', '2012-09-27 07:41:35', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 07:41:35', '2012-10-07 00:00:00', 't', '2012-09-27 07:41:35', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 07:41:35', '2012-09-27 07:41:35', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 07:41:35', '2012-09-27 07:41:35', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 07:41:35', '2012-09-27 07:41:35', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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 ('Video', '2012-09-27 07:41:35', '2012-09-27 07:41:35', 'parade', 113629430) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('LeaderBoard', '2012-09-27 07:41:35', '2012-09-27 07:41:35', 'parade', 298486374) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Parade', '2012-09-27 07:41:35', '2012-09-27 07:41:35', 'leaderboard, video', 980190962)  (41.5ms) commit transaction  (0.1ms) begin transaction  (0.1ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 07:42:03', 100, '2012-10-07 00:00:00', 't', '2012-09-27 07:42:03', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 07:42:03', '2012-10-07 00:00:00', 't', '2012-09-27 07:42:03', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 07:42:03', '2012-09-27 07:42:03', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 07:42:03', '2012-09-27 07:42:03', 814558298, 929640376, '', 'Banner') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 07:42:03', '2012-09-27 07:42:03', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') Fixture Delete (0.2ms) DELETE FROM "advert_selector_placements" Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 07:42:03', '2012-09-27 07:42:03', 'parade', 113629430) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('LeaderBoard', '2012-09-27 07:42:03', '2012-09-27 07:42:03', 'parade', 298486374) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Parade', '2012-09-27 07:42:03', '2012-09-27 07:42:03', 'leaderboard, video', 980190962)  (35.8ms) commit transaction  (0.1ms) begin transaction  (0.1ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 07:45:40', 100, '2012-10-07 00:00:00', 't', '2012-09-27 07:45:40', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 07:45:40', '2012-10-07 00:00:00', 't', '2012-09-27 07:45:40', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 07:45:40', '2012-09-27 07:45:40', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 07:45:40', '2012-09-27 07:45:40', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 07:45:40', '2012-09-27 07:45:40', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') Fixture Delete (0.2ms) DELETE FROM "advert_selector_placements" Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 07:45:40', '2012-09-27 07:45:40', 'parade', 113629430) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('LeaderBoard', '2012-09-27 07:45:40', '2012-09-27 07:45:40', 'parade', 298486374) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Parade', '2012-09-27 07:45:40', '2012-09-27 07:45:40', 'leaderboard, video', 980190962)  (41.3ms) commit transaction  (0.1ms) begin transaction  (0.1ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 07:45:54', 100, '2012-10-07 00:00:00', 't', '2012-09-27 07:45:54', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 07:45:54', '2012-10-07 00:00:00', 't', '2012-09-27 07:45:54', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 07:45:54', '2012-09-27 07:45:54', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 07:45:54', '2012-09-27 07:45:54', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 07:45:54', '2012-09-27 07:45:54', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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 ('Video', '2012-09-27 07:45:54', '2012-09-27 07:45:54', 'parade', 113629430) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('LeaderBoard', '2012-09-27 07:45:54', '2012-09-27 07:45:54', 'parade', 298486374) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Parade', '2012-09-27 07:45:54', '2012-09-27 07:45:54', 'leaderboard, video', 980190962)  (40.6ms) commit transaction  (0.1ms) begin transaction  (0.2ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 07:47:08', 100, '2012-10-07 00:00:00', 't', '2012-09-27 07:47:08', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 07:47:08', '2012-10-07 00:00:00', 't', '2012-09-27 07:47:08', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 07:47:08', '2012-09-27 07:47:08', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 07:47:08', '2012-09-27 07:47:08', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 07:47:08', '2012-09-27 07:47:08', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 07:47:08', '2012-09-27 07:47:08', 'leaderboard, video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 07:47:08', '2012-09-27 07:47:08', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 07:47:08', '2012-09-27 07:47:08', 'parade', 405688915)  (568.0ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.5ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_placements"  (0.0ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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"  (0.0ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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::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::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::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::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 Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 07:48:39', 100, '2012-10-07 00:00:00', 't', '2012-09-27 07:48:39', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 07:48:39', '2012-10-07 00:00:00', 't', '2012-09-27 07:48:39', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.2ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 07:48:39', '2012-09-27 07:48:39', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 07:48:39', '2012-09-27 07:48:39', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 07:48:39', '2012-09-27 07:48:39', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') Fixture Delete (0.2ms) 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-09-27 07:48:39', '2012-09-27 07:48:39', 'leaderboard, video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 07:48:39', '2012-09-27 07:48:39', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 07:48:39', '2012-09-27 07:48:39', 'parade', 405688915)  (37.5ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.5ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_placements"  (0.0ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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"  (0.0ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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::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::Placement Load (0.1ms) 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::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::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 Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 07:49:02', 100, '2012-10-07 00:00:00', 't', '2012-09-27 07:49:02', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 07:49:02', '2012-10-07 00:00:00', 't', '2012-09-27 07:49:02', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 07:49:02', '2012-09-27 07:49:02', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 07:49:02', '2012-09-27 07:49:02', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 07:49:02', '2012-09-27 07:49:02', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') Fixture Delete (0.2ms) 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-09-27 07:49:02', '2012-09-27 07:49:02', 'leaderboard, video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 07:49:02', '2012-09-27 07:49:02', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 07:49:02', '2012-09-27 07:49:02', 'parade', 405688915)  (142.4ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.5ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_placements"  (0.1ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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"  (0.0ms) rollback transaction  (0.0ms) begin transaction 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::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::Placement Load (0.1ms) 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::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::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 Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 07:49:21', 100, '2012-10-07 00:00:00', 't', '2012-09-27 07:49:21', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 07:49:21', '2012-10-07 00:00:00', 't', '2012-09-27 07:49:21', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 07:49:21', '2012-09-27 07:49:21', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 07:49:21', '2012-09-27 07:49:21', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 07:49:21', '2012-09-27 07:49:21', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') Fixture Delete (0.2ms) 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-09-27 07:49:21', '2012-09-27 07:49:21', 'leaderboard, video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 07:49:21', '2012-09-27 07:49:21', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 07:49:21', '2012-09-27 07:49:21', 'parade', 405688915)  (43.3ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.5ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_placements"  (0.0ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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"  (0.0ms) rollback transaction  (0.0ms) begin transaction 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::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::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::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::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 Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 07:49:48', 100, '2012-10-07 00:00:00', 't', '2012-09-27 07:49:48', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 07:49:48', '2012-10-07 00:00:00', 't', '2012-09-27 07:49:48', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 07:49:48', '2012-09-27 07:49:48', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 07:49:48', '2012-09-27 07:49:48', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 07:49:48', '2012-09-27 07:49:48', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 07:49:48', '2012-09-27 07:49:48', 'leaderboard, video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 07:49:48', '2012-09-27 07:49:48', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 07:49:48', '2012-09-27 07:49:48', 'parade', 405688915)  (42.3ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.5ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 07:51:11', 100, '2012-10-07 00:00:00', 't', '2012-09-27 07:51:11', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 07:51:11', '2012-10-07 00:00:00', 't', '2012-09-27 07:51:11', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 07:51:11', '2012-09-27 07:51:11', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 07:51:11', '2012-09-27 07:51:11', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 07:51:11', '2012-09-27 07:51:11', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 07:51:11', '2012-09-27 07:51:11', 'leaderboard, video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 07:51:11', '2012-09-27 07:51:11', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 07:51:11', '2012-09-27 07:51:11', 'parade', 405688915)  (41.8ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.4ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.2ms) SELECT COUNT(*) FROM "advert_selector_placements"  (0.0ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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"  (0.0ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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::Placement Load (0.1ms) 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::Placement Load (0.1ms) 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::Placement Load (0.1ms) 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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.0ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 07:51:33', 100, '2012-10-07 00:00:00', 't', '2012-09-27 07:51:33', 50, 814558298, 1000, 'f', 0, '2012-09-27 00:00:00') Fixture Insert (0.0ms) 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-09-27 07:51:33', '2012-10-07 00:00:00', 't', '2012-09-27 07:51:33', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 07:51:33', '2012-09-27 07:51:33', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 07:51:33', '2012-09-27 07:51:33', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 07:51:33', '2012-09-27 07:51:33', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 07:51:33', '2012-09-27 07:51:33', 'leaderboard, video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 07:51:33', '2012-09-27 07:51:33', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 07:51:33', '2012-09-27 07:51:33', 'parade', 405688915)  (39.0ms) commit transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.4ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 07:51:41', 100, '2012-10-07 00:00:00', 't', '2012-09-27 07:51:41', 50, 814558298, 1000, 'f', 0, '2012-09-27 00:00:00') Fixture Insert (0.0ms) 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-09-27 07:51:41', '2012-10-07 00:00:00', 't', '2012-09-27 07:51:41', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 07:51:41', '2012-09-27 07:51:41', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 07:51:41', '2012-09-27 07:51:41', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 07:51:41', '2012-09-27 07:51:41', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 07:51:41', '2012-09-27 07:51:41', 'leaderboard, video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 07:51:41', '2012-09-27 07:51:41', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 07:51:41', '2012-09-27 07:51:41', 'parade', 405688915)  (48.3ms) commit transaction  (0.2ms) begin transaction AdvertSelector::Placement Load (0.5ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.3ms) 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-09-27 07:52:00', 100, '2012-10-07 00:00:00', 't', '2012-09-27 07:52:00', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 07:52:00', '2012-10-07 00:00:00', 't', '2012-09-27 07:52:00', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 07:52:00', '2012-09-27 07:52:00', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 07:52:00', '2012-09-27 07:52:00', 814558298, 929640376, '', 'Banner') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 07:52:00', '2012-09-27 07:52:00', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') Fixture Delete (0.2ms) DELETE FROM "advert_selector_placements" Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Parade', '2012-09-27 07:52:00', '2012-09-27 07:52:00', 'leaderboard, video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 07:52:00', '2012-09-27 07:52:00', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 07:52:00', '2012-09-27 07:52:00', 'parade', 405688915)  (78.4ms) commit transaction  (0.1ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_placements"  (0.1ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_placements"  (0.0ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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::Placement Load (0.1ms) 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::Placement Load (0.1ms) 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::Placement Load (0.1ms) 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::Placement Load (0.1ms) 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  (0.0ms) rollback transaction  (0.0ms) begin transaction 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" ORDER BY priority desc [AdvertSelector] AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" IN (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position [AdvertSelector] Showing banner Pepsi in placement Leaderboard Completed 200 OK in 31ms (Views: 30.2ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 07:52:36', 100, '2012-10-07 00:00:00', 't', '2012-09-27 07:52:36', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 07:52:36', '2012-10-07 00:00:00', 't', '2012-09-27 07:52:36', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 07:52:36', '2012-09-27 07:52:36', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 07:52:36', '2012-09-27 07:52:36', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 07:52:36', '2012-09-27 07:52:36', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') Fixture Delete (0.2ms) 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-09-27 07:52:36', '2012-09-27 07:52:36', 'leaderboard, video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 07:52:36', '2012-09-27 07:52:36', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 07:52:36', '2012-09-27 07:52:36', 'parade', 405688915)  (39.1ms) commit transaction  (0.1ms) begin transaction  (0.1ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_placements"  (0.0ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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"  (0.0ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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::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::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::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::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  (0.0ms) rollback transaction  (0.0ms) begin transaction 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" ORDER BY priority desc [AdvertSelector] AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" IN (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position [AdvertSelector] Showing banner Pepsi in placement Leaderboard Completed 200 OK in 28ms (Views: 27.0ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 08:00:41', 100, '2012-10-07 00:00:00', 't', '2012-09-27 08:00:41', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 08:00:41', '2012-10-07 00:00:00', 't', '2012-09-27 08:00:41', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 08:00:41', '2012-09-27 08:00:41', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 08:00:41', '2012-09-27 08:00:41', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 08:00:41', '2012-09-27 08:00:41', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 08:00:41', '2012-09-27 08:00:41', 'leaderboard, video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 08:00:41', '2012-09-27 08:00:41', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 08:00:41', '2012-09-27 08:00:41', 'parade', 405688915)  (41.1ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.5ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 08:01:26', 100, '2012-10-07 00:00:00', 't', '2012-09-27 08:01:26', 50, 814558298, 1000, 'f', 0, '2012-09-27 00:00:00') Fixture Insert (0.0ms) 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-09-27 08:01:26', '2012-10-07 00:00:00', 't', '2012-09-27 08:01:26', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 08:01:26', '2012-09-27 08:01:26', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 08:01:26', '2012-09-27 08:01:26', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 08:01:26', '2012-09-27 08:01:26', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 08:01:26', '2012-09-27 08:01:26', 'leaderboard, video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 08:01:26', '2012-09-27 08:01:26', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 08:01:26', '2012-09-27 08:01:26', 'parade', 405688915)  (36.6ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.5ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 08:01:34', 100, '2012-10-07 00:00:00', 't', '2012-09-27 08:01:34', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 08:01:34', '2012-10-07 00:00:00', 't', '2012-09-27 08:01:34', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.2ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.3ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 08:01:34', '2012-09-27 08:01:34', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.2ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 08:01:34', '2012-09-27 08:01:34', 814558298, 929640376, '', 'Banner') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 08:01:34', '2012-09-27 08:01:34', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') Fixture Delete (0.5ms) DELETE FROM "advert_selector_placements" Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Parade', '2012-09-27 08:01:34', '2012-09-27 08:01:34', 'leaderboard, video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 08:01:34', '2012-09-27 08:01:34', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 08:01:34', '2012-09-27 08:01:34', 'parade', 405688915)  (997.4ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 08:01:37', 100, '2012-10-07 00:00:00', 't', '2012-09-27 08:01:37', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 08:01:37', '2012-10-07 00:00:00', 't', '2012-09-27 08:01:37', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 08:01:37', '2012-09-27 08:01:37', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 08:01:37', '2012-09-27 08:01:37', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 08:01:37', '2012-09-27 08:01:37', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') Fixture Delete (0.2ms) 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-09-27 08:01:37', '2012-09-27 08:01:37', 'leaderboard, video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 08:01:37', '2012-09-27 08:01:37', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 08:01:37', '2012-09-27 08:01:37', 'parade', 405688915)  (194.1ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.3ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 08:01:48', 100, '2012-10-07 00:00:00', 't', '2012-09-27 08:01:48', 50, 814558298, 1000, 'f', 0, '2012-09-27 00:00:00') Fixture Insert (0.0ms) 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-09-27 08:01:48', '2012-10-07 00:00:00', 't', '2012-09-27 08:01:48', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 08:01:48', '2012-09-27 08:01:48', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 08:01:48', '2012-09-27 08:01:48', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 08:01:48', '2012-09-27 08:01:48', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') Fixture Delete (0.2ms) 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-09-27 08:01:48', '2012-09-27 08:01:48', 'leaderboard, video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 08:01:48', '2012-09-27 08:01:48', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 08:01:48', '2012-09-27 08:01:48', 'parade', 405688915)  (318.6ms) commit transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.2ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 08:04:14', 100, '2012-10-07 00:00:00', 't', '2012-09-27 08:04:14', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 08:04:14', '2012-10-07 00:00:00', 't', '2012-09-27 08:04:14', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 08:04:14', '2012-09-27 08:04:14', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 08:04:14', '2012-09-27 08:04:14', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 08:04:14', '2012-09-27 08:04:14', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') Fixture Delete (0.2ms) 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-09-27 08:04:14', '2012-09-27 08:04:14', 'leaderboard, video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 08:04:14', '2012-09-27 08:04:14', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 08:04:14', '2012-09-27 08:04:14', 'parade', 405688915)  (38.2ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.5ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.2ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 08:06:31', 100, '2012-10-07 00:00:00', 't', '2012-09-27 08:06:31', 50, 814558298, 1000, 'f', 0, '2012-09-27 00:00:00') Fixture Insert (0.0ms) 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-09-27 08:06:31', '2012-10-07 00:00:00', 't', '2012-09-27 08:06:31', 100, 394627963, 1000, 't', 0, '2012-09-27 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", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 08:06:31', '2012-09-27 08:06:31', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 08:06:31', '2012-09-27 08:06:31', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 08:06:31', '2012-09-27 08:06:31', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') Fixture Delete (0.2ms) 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-09-27 08:06:31', '2012-09-27 08:06:31', 'leaderboard, video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 08:06:31', '2012-09-27 08:06:31', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 08:06:31', '2012-09-27 08:06:31', 'parade', 405688915)  (34.3ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.5ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.1ms) rollback transaction Connecting to database specified by database.yml Connecting to database specified by database.yml Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 08:07:40', 100, '2012-10-07 00:00:00', 't', '2012-09-27 08:07:40', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 08:07:40', '2012-10-07 00:00:00', 't', '2012-09-27 08:07:40', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 08:07:40', '2012-09-27 08:07:40', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 08:07:40', '2012-09-27 08:07:40', 814558298, 929640376, '', 'Banner') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 08:07:40', '2012-09-27 08:07:40', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 08:07:40', '2012-09-27 08:07:40', 'leaderboard, video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 08:07:40', '2012-09-27 08:07:40', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 08:07:40', '2012-09-27 08:07:40', 'parade', 405688915)  (53.9ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.5ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.2ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 08:08:22', 100, '2012-10-07 00:00:00', 't', '2012-09-27 08:08:22', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 08:08:22', '2012-10-07 00:00:00', 't', '2012-09-27 08:08:22', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 08:08:22', '2012-09-27 08:08:22', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 08:08:22', '2012-09-27 08:08:22', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 08:08:22', '2012-09-27 08:08:22', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 08:08:22', '2012-09-27 08:08:22', 'leaderboard, video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 08:08:22', '2012-09-27 08:08:22', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 08:08:22', '2012-09-27 08:08:22', 'parade', 405688915)  (39.4ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.5ms) 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.4ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/placements/index.html.erb within layouts/advert_selector/application (4.4ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 42ms (Views: 38.4ms | ActiveRecord: 0.8ms) Processing by AdvertSelector::PlacementsController#index as HTML AdvertSelector::Placement Load (0.4ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/placements/index.html.erb within layouts/advert_selector/application (7.8ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 17ms (Views: 13.9ms | ActiveRecord: 0.8ms) Processing by AdvertSelector::PlacementsController#index as HTML AdvertSelector::Placement Load (0.3ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/placements/index.html.erb within layouts/advert_selector/application (7.2ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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.0ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = 405688915 LIMIT 1 Completed 200 OK in 16ms (Views: 12.8ms | ActiveRecord: 0.6ms)  (0.0ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 08:18:34', 100, '2012-10-07 00:00:00', 't', '2012-09-27 08:18:34', 50, 814558298, 1000, 'f', 0, '2012-09-27 00:00:00') Fixture Insert (0.0ms) 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-09-27 08:18:34', '2012-10-07 00:00:00', 't', '2012-09-27 08:18:34', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 08:18:34', '2012-09-27 08:18:34', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 08:18:34', '2012-09-27 08:18:34', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 08:18:34', '2012-09-27 08:18:34', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') Fixture Delete (0.2ms) 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-09-27 08:18:34', '2012-09-27 08:18:34', 'leaderboard, video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 08:18:34', '2012-09-27 08:18:34', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 08:18:34', '2012-09-27 08:18:34', 'parade', 405688915)  (501.7ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.5ms) 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.3ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/placements/index.html.erb within layouts/advert_selector/application (3.8ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 36ms (Views: 33.0ms | ActiveRecord: 0.7ms)  (0.0ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 08:18:40', 100, '2012-10-07 00:00:00', 't', '2012-09-27 08:18:40', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 08:18:40', '2012-10-07 00:00:00', 't', '2012-09-27 08:18:40', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 08:18:40', '2012-09-27 08:18:40', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 08:18:40', '2012-09-27 08:18:40', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 08:18:40', '2012-09-27 08:18:40', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 08:18:40', '2012-09-27 08:18:40', 'leaderboard, video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 08:18:40', '2012-09-27 08:18:40', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 08:18:40', '2012-09-27 08:18:40', 'parade', 405688915)  (58.2ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_placements" Processing by AdvertSelector::PlacementsController#create as HTML Parameters: {"placement"=>{"name"=>"Leaderboard", "conflicting_placements_array"=>"parade"}} Completed 500 Internal Server Error in 0ms  (0.1ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", "405688915"]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) 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 4ms (ActiveRecord: 0.7ms)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_placements"   (0.1ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", "405688915"]] Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/placements/_form.html.erb (32.6ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 59ms (Views: 57.8ms | ActiveRecord: 0.5ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 8ms (Views: 7.4ms | ActiveRecord: 0.4ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]] Processing by AdvertSelector::PlacementsController#new as HTML Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/placements/_form.html.erb (3.7ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 11ms (Views: 10.1ms | ActiveRecord: 0.4ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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 0ms (ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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", "conflicting_placements_array"=>"parade"}} 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) ROLLBACK TO SAVEPOINT active_record_1 Completed 500 Internal Server Error in 1ms  (0.0ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 08:19:02', 100, '2012-10-07 00:00:00', 't', '2012-09-27 08:19:02', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 08:19:02', '2012-10-07 00:00:00', 't', '2012-09-27 08:19:02', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 08:19:02', '2012-09-27 08:19:02', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 08:19:02', '2012-09-27 08:19:02', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 08:19:02', '2012-09-27 08:19:02', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 08:19:02', '2012-09-27 08:19:02', 'leaderboard, video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 08:19:02', '2012-09-27 08:19:02', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 08:19:02', '2012-09-27 08:19:02', 'parade', 405688915)  (41.5ms) commit transaction  (0.2ms) begin transaction AdvertSelector::Placement Load (0.5ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.2ms) SELECT COUNT(*) FROM "advert_selector_placements" Processing by AdvertSelector::PlacementsController#create as HTML Parameters: {"placement"=>{"name"=>"Leaderboard"}}  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "advert_selector_placements" ("conflicting_placements_array", "created_at", "name", "request_delay", "updated_at") VALUES (?, ?, ?, ?, ?) [["conflicting_placements_array", nil], ["created_at", Thu, 27 Sep 2012 08:19:02 UTC +00:00], ["name", "Leaderboard"], ["request_delay", nil], ["updated_at", Thu, 27 Sep 2012 08:19:02 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.6ms)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_placements"  (0.1ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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.3ms) 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::Placement Load (0.1ms) 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"]] Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/placements/_form.html.erb (18.1ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 43ms (Views: 42.1ms | ActiveRecord: 0.4ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 9ms (Views: 7.7ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]] Processing by AdvertSelector::PlacementsController#new as HTML Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/placements/_form.html.erb (3.7ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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.0ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = 405688915 LIMIT 1 Completed 200 OK in 10ms (Views: 9.5ms | ActiveRecord: 0.3ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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::Placement Load (0.1ms) 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", "conflicting_placements_array"=>"parade"}} AdvertSelector::Placement Load (0.1ms) 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) ROLLBACK TO SAVEPOINT active_record_1 Completed 500 Internal Server Error in 1ms  (0.0ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 08:19:09', 100, '2012-10-07 00:00:00', 't', '2012-09-27 08:19:09', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 08:19:09', '2012-10-07 00:00:00', 't', '2012-09-27 08:19:09', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 08:19:09', '2012-09-27 08:19:09', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 08:19:09', '2012-09-27 08:19:09', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 08:19:09', '2012-09-27 08:19:09', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 08:19:09', '2012-09-27 08:19:09', 'leaderboard, video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 08:19:09', '2012-09-27 08:19:09', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 08:19:09', '2012-09-27 08:19:09', 'parade', 405688915)  (38.3ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.6ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_placements" Processing by AdvertSelector::PlacementsController#create as HTML Parameters: {"placement"=>{"name"=>"new placement"}}  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "advert_selector_placements" ("conflicting_placements_array", "created_at", "name", "request_delay", "updated_at") VALUES (?, ?, ?, ?, ?) [["conflicting_placements_array", nil], ["created_at", Thu, 27 Sep 2012 08:19:09 UTC +00:00], ["name", "new placement"], ["request_delay", nil], ["updated_at", Thu, 27 Sep 2012 08:19:09 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.6ms)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_placements"  (0.1ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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.3ms) 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::Placement Load (0.1ms) 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"]] Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/placements/_form.html.erb (18.3ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 43ms (Views: 42.2ms | ActiveRecord: 0.4ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 9ms (Views: 7.8ms | ActiveRecord: 0.4ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]] Processing by AdvertSelector::PlacementsController#new as HTML Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/placements/_form.html.erb (3.6ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 10ms (Views: 9.2ms | ActiveRecord: 0.3ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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 0ms (ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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", "conflicting_placements_array"=>"parade"}} 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) ROLLBACK TO SAVEPOINT active_record_1 Completed 500 Internal Server Error in 1ms  (0.0ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 08:19:21', 100, '2012-10-07 00:00:00', 't', '2012-09-27 08:19:21', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 08:19:21', '2012-10-07 00:00:00', 't', '2012-09-27 08:19:21', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 08:19:21', '2012-09-27 08:19:21', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 08:19:21', '2012-09-27 08:19:21', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 08:19:21', '2012-09-27 08:19:21', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 08:19:21', '2012-09-27 08:19:21', 'leaderboard, video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 08:19:21', '2012-09-27 08:19:21', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 08:19:21', '2012-09-27 08:19:21', 'parade', 405688915)  (51.2ms) commit transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.2ms) SELECT COUNT(*) FROM "advert_selector_placements" Processing by AdvertSelector::PlacementsController#create as HTML Parameters: {"placement"=>{"name"=>"new placement"}}  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "advert_selector_placements" ("conflicting_placements_array", "created_at", "name", "request_delay", "updated_at") VALUES (?, ?, ?, ?, ?) [["conflicting_placements_array", nil], ["created_at", Thu, 27 Sep 2012 08:19:21 UTC +00:00], ["name", "new placement"], ["request_delay", nil], ["updated_at", Thu, 27 Sep 2012 08:19:21 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.6ms)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_placements"  (0.1ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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.3ms) 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::Placement Load (0.1ms) 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"]] Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/placements/_form.html.erb (18.2ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 43ms (Views: 42.1ms | ActiveRecord: 0.4ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 9ms (Views: 7.7ms | ActiveRecord: 0.4ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]] Processing by AdvertSelector::PlacementsController#new as HTML Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/placements/_form.html.erb (3.6ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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.0ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = 405688915 LIMIT 1 Completed 200 OK in 10ms (Views: 9.1ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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 0ms (ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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.0ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 08:19:36', 100, '2012-10-07 00:00:00', 't', '2012-09-27 08:19:36', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 08:19:36', '2012-10-07 00:00:00', 't', '2012-09-27 08:19:36', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 08:19:36', '2012-09-27 08:19:36', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 08:19:36', '2012-09-27 08:19:36', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 08:19:36', '2012-09-27 08:19:36', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') Fixture Delete (0.2ms) 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-09-27 08:19:36', '2012-09-27 08:19:36', 'leaderboard, video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 08:19:36', '2012-09-27 08:19:36', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 08:19:36', '2012-09-27 08:19:36', 'parade', 405688915)  (352.7ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.5ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.1ms) 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.5ms) INSERT INTO "advert_selector_placements" ("conflicting_placements_array", "created_at", "name", "request_delay", "updated_at") VALUES (?, ?, ?, ?, ?) [["conflicting_placements_array", nil], ["created_at", Thu, 27 Sep 2012 08:19:36 UTC +00:00], ["name", "new placement"], ["request_delay", nil], ["updated_at", Thu, 27 Sep 2012 08:19:36 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.1ms) SELECT COUNT(*) FROM "advert_selector_placements"  (0.1ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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.3ms) 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.4ms)  (0.0ms) SELECT COUNT(*) FROM "advert_selector_placements"   (0.1ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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"]] Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/placements/_form.html.erb (18.7ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 43ms (Views: 42.0ms | ActiveRecord: 0.4ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 9ms (Views: 7.7ms | ActiveRecord: 0.4ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]] Processing by AdvertSelector::PlacementsController#new as HTML Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/placements/_form.html.erb (3.6ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 10ms (Views: 9.2ms | ActiveRecord: 0.3ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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 0ms (ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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.0ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 08:19:55', 100, '2012-10-07 00:00:00', 't', '2012-09-27 08:19:55', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 08:19:55', '2012-10-07 00:00:00', 't', '2012-09-27 08:19:55', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 08:19:55', '2012-09-27 08:19:55', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 08:19:55', '2012-09-27 08:19:55', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 08:19:55', '2012-09-27 08:19:55', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') Fixture Delete (0.2ms) 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-09-27 08:19:55', '2012-09-27 08:19:55', 'leaderboard, video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 08:19:55', '2012-09-27 08:19:55', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 08:19:55', '2012-09-27 08:19:55', 'parade', 405688915)  (386.8ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.5ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.1ms) 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.5ms) INSERT INTO "advert_selector_placements" ("conflicting_placements_array", "created_at", "name", "request_delay", "updated_at") VALUES (?, ?, ?, ?, ?) [["conflicting_placements_array", nil], ["created_at", Thu, 27 Sep 2012 08:19:55 UTC +00:00], ["name", "new placement"], ["request_delay", nil], ["updated_at", Thu, 27 Sep 2012 08:19:55 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.6ms)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_placements"  (0.1ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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.3ms) 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.4ms)  (0.0ms) SELECT COUNT(*) FROM "advert_selector_placements"   (0.1ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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"]] Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/placements/_form.html.erb (18.2ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 43ms (Views: 41.6ms | ActiveRecord: 0.4ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 9ms (Views: 7.7ms | ActiveRecord: 0.4ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]] Processing by AdvertSelector::PlacementsController#new as HTML Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/placements/_form.html.erb (3.5ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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.0ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = 405688915 LIMIT 1 Completed 200 OK in 10ms (Views: 9.1ms | ActiveRecord: 0.3ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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 0ms (ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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.0ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 08:20:09', 100, '2012-10-07 00:00:00', 't', '2012-09-27 08:20:09', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 08:20:09', '2012-10-07 00:00:00', 't', '2012-09-27 08:20:09', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 08:20:09', '2012-09-27 08:20:09', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 08:20:09', '2012-09-27 08:20:09', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 08:20:09', '2012-09-27 08:20:09', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') Fixture Delete (0.2ms) 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-09-27 08:20:09', '2012-09-27 08:20:09', 'leaderboard, video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 08:20:09', '2012-09-27 08:20:09', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 08:20:09', '2012-09-27 08:20:09', 'parade', 405688915)  (508.7ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.5ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.1ms) 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.5ms) INSERT INTO "advert_selector_placements" ("conflicting_placements_array", "created_at", "name", "request_delay", "updated_at") VALUES (?, ?, ?, ?, ?) [["conflicting_placements_array", nil], ["created_at", Thu, 27 Sep 2012 08:20:09 UTC +00:00], ["name", "new placement"], ["request_delay", nil], ["updated_at", Thu, 27 Sep 2012 08:20:09 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.1ms) SELECT COUNT(*) FROM "advert_selector_placements"  (0.1ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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.3ms) 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.4ms)  (0.0ms) SELECT COUNT(*) FROM "advert_selector_placements"   (0.1ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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"]] Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/placements/_form.html.erb (18.3ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 43ms (Views: 41.9ms | ActiveRecord: 0.4ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 9ms (Views: 7.6ms | ActiveRecord: 0.4ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]] Processing by AdvertSelector::PlacementsController#new as HTML Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/placements/_form.html.erb (3.6ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 10ms (Views: 9.2ms | ActiveRecord: 0.3ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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 0ms (ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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.0ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 08:20:21', 100, '2012-10-07 00:00:00', 't', '2012-09-27 08:20:21', 50, 814558298, 1000, 'f', 0, '2012-09-27 00:00:00') Fixture Insert (0.0ms) 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-09-27 08:20:21', '2012-10-07 00:00:00', 't', '2012-09-27 08:20:21', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 08:20:21', '2012-09-27 08:20:21', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 08:20:21', '2012-09-27 08:20:21', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 08:20:21', '2012-09-27 08:20:21', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 08:20:21', '2012-09-27 08:20:21', 'leaderboard, video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 08:20:21', '2012-09-27 08:20:21', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 08:20:21', '2012-09-27 08:20:21', 'parade', 405688915)  (42.2ms) commit transaction  (0.1ms) begin transaction  (0.1ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) rollback transaction  (0.1ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_placements" Processing by AdvertSelector::PlacementsController#create as HTML Parameters: {"placement"=>{"name"=>"new placement"}}  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "advert_selector_placements" ("conflicting_placements_array", "created_at", "name", "request_delay", "updated_at") VALUES (?, ?, ?, ?, ?) [["conflicting_placements_array", nil], ["created_at", Thu, 27 Sep 2012 08:20:21 UTC +00:00], ["name", "new placement"], ["request_delay", nil], ["updated_at", Thu, 27 Sep 2012 08:20:21 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/1019730478 Completed 302 Found in 4ms (ActiveRecord: 0.6ms)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_placements"  (0.1ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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.3ms) 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.4ms)  (0.0ms) SELECT COUNT(*) FROM "advert_selector_placements"   (0.1ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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"]] Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/placements/_form.html.erb (18.9ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 44ms (Views: 42.8ms | ActiveRecord: 0.4ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 8ms (Views: 7.5ms | ActiveRecord: 0.4ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]] Processing by AdvertSelector::PlacementsController#new as HTML Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/placements/_form.html.erb (3.5ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 10ms (Views: 9.3ms | ActiveRecord: 0.3ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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 0ms (ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction 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" ORDER BY priority desc [AdvertSelector] AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" IN (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position [AdvertSelector] Showing banner Pepsi in placement Leaderboard Completed 200 OK in 12ms (Views: 11.3ms | ActiveRecord: 0.4ms)  (0.0ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.3ms) 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-09-27 08:21:15', 100, '2012-10-07 00:00:00', 't', '2012-09-27 08:21:15', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 08:21:15', '2012-10-07 00:00:00', 't', '2012-09-27 08:21:15', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 08:21:15', '2012-09-27 08:21:15', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 08:21:15', '2012-09-27 08:21:15', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 08:21:15', '2012-09-27 08:21:15', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') Fixture Delete (0.3ms) DELETE FROM "advert_selector_placements" Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Parade', '2012-09-27 08:21:15', '2012-09-27 08:21:15', 'leaderboard, video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 08:21:15', '2012-09-27 08:21:15', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 08:21:15', '2012-09-27 08:21:15', 'parade', 405688915)  (97.4ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.5ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_placements" Processing by AdvertSelector::PlacementsController#create as HTML Parameters: {"placement"=>{"name"=>"new placement"}}  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "advert_selector_placements" ("conflicting_placements_array", "created_at", "name", "request_delay", "updated_at") VALUES (?, ?, ?, ?, ?) [["conflicting_placements_array", nil], ["created_at", Thu, 27 Sep 2012 08:21:15 UTC +00:00], ["name", "new placement"], ["request_delay", nil], ["updated_at", Thu, 27 Sep 2012 08:21:15 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.1ms) SELECT COUNT(*) FROM "advert_selector_placements"  (0.1ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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.3ms) 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::Placement Load (0.1ms) 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"]] Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/placements/_form.html.erb (18.0ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 42ms (Views: 41.4ms | ActiveRecord: 0.4ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 8ms (Views: 7.5ms | ActiveRecord: 0.4ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]] Processing by AdvertSelector::PlacementsController#new as HTML Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/placements/_form.html.erb (3.6ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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.0ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = 405688915 LIMIT 1 Completed 200 OK in 10ms (Views: 9.2ms | ActiveRecord: 0.3ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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 0ms (ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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.0ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 08:21:26', 100, '2012-10-07 00:00:00', 't', '2012-09-27 08:21:26', 50, 814558298, 1000, 'f', 0, '2012-09-27 00:00:00') Fixture Insert (0.0ms) 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-09-27 08:21:26', '2012-10-07 00:00:00', 't', '2012-09-27 08:21:26', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 08:21:26', '2012-09-27 08:21:26', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 08:21:26', '2012-09-27 08:21:26', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 08:21:26', '2012-09-27 08:21:26', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') Fixture Delete (0.2ms) 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-09-27 08:21:26', '2012-09-27 08:21:26', 'leaderboard, video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 08:21:26', '2012-09-27 08:21:26', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 08:21:26', '2012-09-27 08:21:26', 'parade', 405688915)  (40.9ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.4ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]]  (0.1ms) 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", 394627963]]  (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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position SQL (0.3ms) 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 10ms (ActiveRecord: 0.5ms)  (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", 394627963]] 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/banners/_form.html.erb (46.1ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 61ms (Views: 59.4ms | 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", 394627963]] Processing by AdvertSelector::BannersController#index as HTML AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" Completed 500 Internal Server Error in 10ms  (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", 394627963]] 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 (26.8ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 35ms (Views: 33.7ms | ActiveRecord: 0.4ms)  (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", 394627963]] Processing by AdvertSelector::BannersController#show as HTML Parameters: {"id"=>"394627963"} Redirected to http://test.host/advert_selector/banners/394627963/edit Completed 302 Found in 0ms (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", 394627963]]  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.3ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_placements" Processing by AdvertSelector::PlacementsController#create as HTML Parameters: {"placement"=>{"name"=>"new placement"}}  (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "advert_selector_placements" ("conflicting_placements_array", "created_at", "name", "request_delay", "updated_at") VALUES (?, ?, ?, ?, ?) [["conflicting_placements_array", nil], ["created_at", Thu, 27 Sep 2012 08:21:27 UTC +00:00], ["name", "new placement"], ["request_delay", nil], ["updated_at", Thu, 27 Sep 2012 08:21:27 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/1019730478 Completed 302 Found in 6ms (ActiveRecord: 0.9ms)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_placements"  (0.1ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_placements" Processing by AdvertSelector::PlacementsController#destroy as HTML Parameters: {"id"=>"405688915"} AdvertSelector::Placement Load (0.1ms) 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.3ms) 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.4ms)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_placements"   (0.1ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", "405688915"]] Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/placements/_form.html.erb (12.6ms) AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 25ms (Views: 23.3ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 16ms (Views: 14.3ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]] Processing by AdvertSelector::PlacementsController#new as HTML Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/placements/_form.html.erb (8.0ms) 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" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 20ms (Views: 18.9ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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::Placement Load (0.1ms) 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.1ms) 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.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction 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" ORDER BY priority desc [AdvertSelector] AdvertSelector::Placement Load (0.4ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" IN (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position [AdvertSelector] Showing banner Pepsi in placement Leaderboard Completed 200 OK in 103ms (Views: 101.6ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 08:21:52', 100, '2012-10-07 00:00:00', 't', '2012-09-27 08:21:52', 50, 814558298, 1000, 'f', 0, '2012-09-27 00:00:00') Fixture Insert (0.0ms) 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-09-27 08:21:52', '2012-10-07 00:00:00', 't', '2012-09-27 08:21:52', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 08:21:52', '2012-09-27 08:21:52', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 08:21:52', '2012-09-27 08:21:52', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 08:21:52', '2012-09-27 08:21:52', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 08:21:52', '2012-09-27 08:21:52', 'leaderboard, video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 08:21:52', '2012-09-27 08:21:52', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 08:21:52', '2012-09-27 08:21:52', 'parade', 405688915)  (482.8ms) 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", 394627963]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners"  (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", 394627963]]  (0.1ms) 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position SQL (0.3ms) 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 10ms (ActiveRecord: 0.5ms)  (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", 394627963]] 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/banners/_form.html.erb (45.0ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 60ms (Views: 58.5ms | ActiveRecord: 0.6ms)  (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", 394627963]] Processing by AdvertSelector::BannersController#index as HTML AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" Completed 500 Internal Server Error in 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", 394627963]] 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.8ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 25ms (Views: 24.6ms | ActiveRecord: 0.5ms)  (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", 394627963]] Processing by AdvertSelector::BannersController#show as HTML Parameters: {"id"=>"394627963"} Redirected to http://test.host/advert_selector/banners/394627963/edit Completed 302 Found in 0ms (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", 394627963]]  (0.0ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 08:22:21', 100, '2012-10-07 00:00:00', 't', '2012-09-27 08:22:21', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 08:22:21', '2012-10-07 00:00:00', 't', '2012-09-27 08:22:21', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 08:22:21', '2012-09-27 08:22:21', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 08:22:21', '2012-09-27 08:22:21', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 08:22:21', '2012-09-27 08:22:21', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 08:22:21', '2012-09-27 08:22:21', 'leaderboard, video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 08:22:21', '2012-09-27 08:22:21', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 08:22:21', '2012-09-27 08:22:21', 'parade', 405688915)  (38.0ms) 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", 394627963]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" Processing by AdvertSelector::BannersController#create as HTML Parameters: {"banner"=>{"comment"=>"Pepsi banner", "name"=>"Pepsi", "end_time"=>"2012-10-07 00:00:00 UTC", "placement_id"=>"405688915", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-09-27 00:00:00 UTC"}}  (0.0ms) 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", Thu, 27 Sep 2012 08:22:21 UTC +00:00], ["end_time", Sun, 07 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", Thu, 27 Sep 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Thu, 27 Sep 2012 08:22:21 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558299 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/banners/814558299 Completed 302 Found in 12ms (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", 394627963]]  (0.0ms) SELECT COUNT(*) FROM "advert_selector_banners"  Processing by AdvertSelector::BannersController#destroy 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"]]  (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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position SQL (0.3ms) 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 3ms (ActiveRecord: 0.5ms)  (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", 394627963]] Processing by AdvertSelector::BannersController#edit 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"]] 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/banners/_form.html.erb (45.3ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 61ms (Views: 59.5ms | ActiveRecord: 0.6ms)  (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", 394627963]] Processing by AdvertSelector::BannersController#index as HTML AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners"  Completed 500 Internal Server Error in 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", 394627963]] 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.4ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 25ms (Views: 24.1ms | ActiveRecord: 0.4ms)  (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", 394627963]] 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", 394627963]]  (0.0ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 08:22:37', 100, '2012-10-07 00:00:00', 't', '2012-09-27 08:22:37', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 08:22:37', '2012-10-07 00:00:00', 't', '2012-09-27 08:22:37', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.3ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 08:22:37', '2012-09-27 08:22:37', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 08:22:37', '2012-09-27 08:22:37', 814558298, 929640376, '', 'Banner') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 08:22:37', '2012-09-27 08:22:37', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') Fixture Delete (0.2ms) DELETE FROM "advert_selector_placements" Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Parade', '2012-09-27 08:22:37', '2012-09-27 08:22:37', 'leaderboard, video', 718799085) Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 08:22:37', '2012-09-27 08:22:37', 'parade', 1019730477) Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 08:22:37', '2012-09-27 08:22:37', 'parade', 405688915)  (38.9ms) commit transaction  (0.2ms) begin transaction AdvertSelector::Banner Load (0.7ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]]  (0.2ms) SELECT COUNT(*) FROM "advert_selector_banners" Processing by AdvertSelector::BannersController#create as HTML Parameters: {"banner"=>{"comment"=>"Pepsi banner", "name"=>"Pepsi", "end_time"=>"2012-10-07 00:00:00 UTC", "placement_id"=>"405688915", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-09-27 00:00:00 UTC"}}  (0.0ms) 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", Thu, 27 Sep 2012 08:22:37 UTC +00:00], ["end_time", Sun, 07 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", Thu, 27 Sep 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Thu, 27 Sep 2012 08:22:37 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558299 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/banners/814558299 Completed 302 Found in 12ms (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", 394627963]]  (0.0ms) SELECT COUNT(*) FROM "advert_selector_banners"  Processing by AdvertSelector::BannersController#destroy 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"]]  (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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position 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 3ms (ActiveRecord: 0.4ms)  (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", 394627963]] 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/banners/_form.html.erb (44.8ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 59ms (Views: 57.8ms | ActiveRecord: 0.6ms)  (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", 394627963]] Processing by AdvertSelector::BannersController#index as HTML AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners"  Completed 500 Internal Server Error in 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", 394627963]] 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.4ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 25ms (Views: 24.1ms | ActiveRecord: 0.4ms)  (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", 394627963]] Processing by AdvertSelector::BannersController#show as HTML Parameters: {"id"=>"394627963"} Redirected to http://test.host/advert_selector/banners/394627963/edit Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (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", 394627963]] 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.0ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 08:22:49', 100, '2012-10-07 00:00:00', 't', '2012-09-27 08:22:49', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 08:22:49', '2012-10-07 00:00:00', 't', '2012-09-27 08:22:49', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 08:22:49', '2012-09-27 08:22:49', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 08:22:49', '2012-09-27 08:22:49', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 08:22:49', '2012-09-27 08:22:49', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') Fixture Delete (0.2ms) 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-09-27 08:22:49', '2012-09-27 08:22:49', 'leaderboard, video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 08:22:49', '2012-09-27 08:22:49', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 08:22:49', '2012-09-27 08:22:49', 'parade', 405688915)  (116.5ms) 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", 394627963]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" Processing by AdvertSelector::BannersController#create as HTML Parameters: {"banner"=>{"comment"=>"Pepsi banner", "name"=>"Pepsi", "end_time"=>"2012-10-07 00:00:00 UTC", "placement_id"=>"405688915", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-09-27 00:00:00 UTC"}}  (0.0ms) 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", Thu, 27 Sep 2012 08:22:49 UTC +00:00], ["end_time", Sun, 07 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", Thu, 27 Sep 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Thu, 27 Sep 2012 08:22:49 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558299 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/banners/814558299 Completed 302 Found in 12ms (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", 394627963]]  (0.0ms) SELECT COUNT(*) FROM "advert_selector_banners"  Processing by AdvertSelector::BannersController#destroy 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"]]  (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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position SQL (0.3ms) 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 3ms (ActiveRecord: 0.5ms)  (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", 394627963]] 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/banners/_form.html.erb (44.4ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 59ms (Views: 57.4ms | ActiveRecord: 0.6ms)  (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", 394627963]] Processing by AdvertSelector::BannersController#index as HTML AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners"  Completed 500 Internal Server Error in 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", 394627963]] 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.3ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 25ms (Views: 24.1ms | ActiveRecord: 0.4ms)  (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", 394627963]] Processing by AdvertSelector::BannersController#show as HTML Parameters: {"id"=>"394627963"} Redirected to http://test.host/advert_selector/banners/394627963/edit Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (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", 394627963]] 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.0ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.3ms) 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-09-27 08:23:20', 100, '2012-10-07 00:00:00', 't', '2012-09-27 08:23:20', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 08:23:20', '2012-10-07 00:00:00', 't', '2012-09-27 08:23:20', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 08:23:20', '2012-09-27 08:23:20', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 08:23:20', '2012-09-27 08:23:20', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 08:23:20', '2012-09-27 08:23:20', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') Fixture Delete (0.2ms) DELETE FROM "advert_selector_placements" Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Parade', '2012-09-27 08:23:20', '2012-09-27 08:23:20', 'leaderboard, video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 08:23:20', '2012-09-27 08:23:20', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 08:23:20', '2012-09-27 08:23:20', 'parade', 405688915)  (57.1ms) 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", 394627963]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" Processing by AdvertSelector::BannersController#create as HTML Parameters: {"banner"=>{"comment"=>"Pepsi banner", "name"=>"Pepsi", "end_time"=>"2012-10-07 00:00:00 UTC", "placement_id"=>"405688915", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-09-27 00:00:00 UTC"}}  (0.0ms) 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", Thu, 27 Sep 2012 08:23:20 UTC +00:00], ["end_time", Sun, 07 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", Thu, 27 Sep 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Thu, 27 Sep 2012 08:23:20 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558299 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/banners/814558299 Completed 302 Found in 12ms (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", 394627963]]  (0.0ms) SELECT COUNT(*) FROM "advert_selector_banners"  Processing by AdvertSelector::BannersController#destroy 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"]]  (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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position SQL (0.3ms) 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 3ms (ActiveRecord: 0.5ms)  (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", 394627963]] 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/banners/_form.html.erb (45.0ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 59ms (Views: 58.3ms | ActiveRecord: 0.6ms)  (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", 394627963]] Processing by AdvertSelector::BannersController#index as HTML AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners"  Completed 500 Internal Server Error in 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", 394627963]] 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.7ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 25ms (Views: 24.4ms | ActiveRecord: 0.4ms)  (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", 394627963]] Processing by AdvertSelector::BannersController#show as HTML Parameters: {"id"=>"394627963"} Redirected to http://test.host/advert_selector/banners/394627963/edit Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (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", 394627963]] 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.0ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 08:23:39', 100, '2012-10-07 00:00:00', 't', '2012-09-27 08:23:39', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 08:23:39', '2012-10-07 00:00:00', 't', '2012-09-27 08:23:39', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 08:23:39', '2012-09-27 08:23:39', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 08:23:39', '2012-09-27 08:23:39', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 08:23:39', '2012-09-27 08:23:39', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 08:23:39', '2012-09-27 08:23:39', 'leaderboard, video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 08:23:39', '2012-09-27 08:23:39', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 08:23:39', '2012-09-27 08:23:39', 'parade', 405688915)  (174.6ms) 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", 394627963]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" Processing by AdvertSelector::BannersController#create as HTML Parameters: {"banner"=>{"comment"=>"Pepsi banner", "name"=>"Pepsi", "end_time"=>"2012-10-07 00:00:00 UTC", "placement_id"=>"405688915", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-09-27 00:00:00 UTC"}}  (0.0ms) 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", Thu, 27 Sep 2012 08:23:39 UTC +00:00], ["end_time", Sun, 07 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", Thu, 27 Sep 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Thu, 27 Sep 2012 08:23:39 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558299 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/banners/814558299 Completed 302 Found in 12ms (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", 394627963]]  (0.0ms) SELECT COUNT(*) FROM "advert_selector_banners"  Processing by AdvertSelector::BannersController#destroy 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"]]  (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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position SQL (0.3ms) 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 3ms (ActiveRecord: 0.4ms)  (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", 394627963]] 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/banners/_form.html.erb (45.0ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 59ms (Views: 58.2ms | ActiveRecord: 0.6ms)  (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", 394627963]] Processing by AdvertSelector::BannersController#index as HTML AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners"  AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 8ms (Views: 7.2ms | ActiveRecord: 0.4ms)  (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", 394627963]] 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.4ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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.0ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = 405688915 LIMIT 1 Completed 200 OK in 25ms (Views: 23.9ms | ActiveRecord: 0.4ms)  (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", 394627963]] Processing by AdvertSelector::BannersController#show as HTML Parameters: {"id"=>"394627963"} Redirected to http://test.host/advert_selector/banners/394627963/edit Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (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", 394627963]] 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.0ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 08:23:44', 100, '2012-10-07 00:00:00', 't', '2012-09-27 08:23:44', 50, 814558298, 1000, 'f', 0, '2012-09-27 00:00:00') Fixture Insert (0.0ms) 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-09-27 08:23:44', '2012-10-07 00:00:00', 't', '2012-09-27 08:23:44', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 08:23:44', '2012-09-27 08:23:44', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 08:23:44', '2012-09-27 08:23:44', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 08:23:44', '2012-09-27 08:23:44', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 08:23:44', '2012-09-27 08:23:44', 'leaderboard, video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 08:23:44', '2012-09-27 08:23:44', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 08:23:44', '2012-09-27 08:23:44', 'parade', 405688915)  (121.7ms) 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", 394627963]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" Processing by AdvertSelector::BannersController#create as HTML Parameters: {"banner"=>{"comment"=>"Pepsi banner", "name"=>"Pepsi", "end_time"=>"2012-10-07 00:00:00 UTC", "placement_id"=>"405688915", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-09-27 00:00:00 UTC"}}  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) 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", Thu, 27 Sep 2012 08:23:44 UTC +00:00], ["end_time", Sun, 07 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", Thu, 27 Sep 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Thu, 27 Sep 2012 08:23:44 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558299 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/banners/814558299 Completed 302 Found in 12ms (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", 394627963]]  (0.0ms) SELECT COUNT(*) FROM "advert_selector_banners"  Processing by AdvertSelector::BannersController#destroy 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"]]  (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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position SQL (0.3ms) 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 3ms (ActiveRecord: 0.4ms)  (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", 394627963]] 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/banners/_form.html.erb (45.0ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 59ms (Views: 58.3ms | ActiveRecord: 0.6ms)  (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", 394627963]] Processing by AdvertSelector::BannersController#index as HTML AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners"  AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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.0ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = 405688915 LIMIT 1 Completed 200 OK in 8ms (Views: 7.1ms | ActiveRecord: 0.4ms)  (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", 394627963]] 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 (19.0ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 25ms (Views: 24.7ms | ActiveRecord: 0.4ms)  (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", 394627963]] 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", 394627963]] Processing by AdvertSelector::BannersController#update as HTML Parameters: {"banner"=>{"comment"=>"Pepsi banner"}, "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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.3ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.2ms) 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.5ms) INSERT INTO "advert_selector_placements" ("conflicting_placements_array", "created_at", "name", "request_delay", "updated_at") VALUES (?, ?, ?, ?, ?) [["conflicting_placements_array", nil], ["created_at", Thu, 27 Sep 2012 08:23:44 UTC +00:00], ["name", "new placement"], ["request_delay", nil], ["updated_at", Thu, 27 Sep 2012 08:23:44 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/1019730478 Completed 302 Found in 4ms (ActiveRecord: 0.6ms)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_placements"   (0.2ms) rollback transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_placements"  Processing by AdvertSelector::PlacementsController#destroy as HTML Parameters: {"id"=>"405688915"} AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", "405688915"]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) 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 3ms (ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_placements"  (0.1ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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"]] Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/placements/_form.html.erb (4.2ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 12ms (Views: 11.1ms | ActiveRecord: 0.4ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 10ms (Views: 8.6ms | ActiveRecord: 0.4ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]] Processing by AdvertSelector::PlacementsController#new as HTML Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/placements/_form.html.erb (3.5ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 10ms (Views: 9.3ms | ActiveRecord: 0.3ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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::Placement Load (0.1ms) 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.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction 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" ORDER BY priority desc [AdvertSelector] AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" IN (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position [AdvertSelector] Showing banner Pepsi in placement Leaderboard Completed 200 OK in 8ms (Views: 7.2ms | ActiveRecord: 0.3ms)  (0.0ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 08:24:09', 100, '2012-10-07 00:00:00', 't', '2012-09-27 08:24:09', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 08:24:09', '2012-10-07 00:00:00', 't', '2012-09-27 08:24:09', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 08:24:09', '2012-09-27 08:24:09', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 08:24:09', '2012-09-27 08:24:09', 814558298, 929640376, '', 'Banner') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 08:24:09', '2012-09-27 08:24:09', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 08:24:09', '2012-09-27 08:24:09', 'leaderboard, video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 08:24:09', '2012-09-27 08:24:09', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 08:24:09', '2012-09-27 08:24:09', 'parade', 405688915)  (150.2ms) commit transaction  (0.1ms) begin transaction  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 08:29:31', 100, '2012-10-07 00:00:00', 't', '2012-09-27 08:29:31', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 08:29:31', '2012-10-07 00:00:00', 't', '2012-09-27 08:29:31', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 08:29:31', '2012-09-27 08:29:31', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 08:29:31', '2012-09-27 08:29:31', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 08:29:31', '2012-09-27 08:29:31', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') Fixture Delete (0.2ms) DELETE FROM "advert_selector_placements" Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Parade', '2012-09-27 08:29:31', '2012-09-27 08:29:31', 'leaderboard, video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 08:29:31', '2012-09-27 08:29:31', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 08:29:31', '2012-09-27 08:29:31', 'parade', 405688915)  (43.3ms) commit transaction  (0.1ms) begin transaction  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 08:29:34', 100, '2012-10-07 00:00:00', 't', '2012-09-27 08:29:34', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 08:29:34', '2012-10-07 00:00:00', 't', '2012-09-27 08:29:34', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 08:29:34', '2012-09-27 08:29:34', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 08:29:34', '2012-09-27 08:29:34', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 08:29:34', '2012-09-27 08:29:34', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 08:29:34', '2012-09-27 08:29:34', 'leaderboard, video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 08:29:34', '2012-09-27 08:29:34', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 08:29:34', '2012-09-27 08:29:34', 'parade', 405688915)  (357.6ms) commit transaction  (0.1ms) begin transaction  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 08:29:55', 100, '2012-10-07 00:00:00', 't', '2012-09-27 08:29:55', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 08:29:55', '2012-10-07 00:00:00', 't', '2012-09-27 08:29:55', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 08:29:55', '2012-09-27 08:29:55', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 08:29:55', '2012-09-27 08:29:55', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 08:29:55', '2012-09-27 08:29:55', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') Fixture Delete (0.2ms) 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-09-27 08:29:55', '2012-09-27 08:29:55', 'leaderboard, video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 08:29:55', '2012-09-27 08:29:55', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 08:29:55', '2012-09-27 08:29:55', 'parade', 405688915)  (46.0ms) commit transaction  (0.1ms) begin transaction  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 08:30:11', 100, '2012-10-07 00:00:00', 't', '2012-09-27 08:30:11', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 08:30:11', '2012-10-07 00:00:00', 't', '2012-09-27 08:30:11', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 08:30:11', '2012-09-27 08:30:11', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 08:30:11', '2012-09-27 08:30:11', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 08:30:11', '2012-09-27 08:30:11', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') Fixture Delete (0.2ms) 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-09-27 08:30:11', '2012-09-27 08:30:11', 'leaderboard, video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 08:30:11', '2012-09-27 08:30:11', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 08:30:11', '2012-09-27 08:30:11', 'parade', 405688915)  (39.1ms) commit transaction  (0.2ms) begin transaction AdvertSelector::Placement Load (0.6ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 718799085]] AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.0ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 08:31:17', 100, '2012-10-07 00:00:00', 't', '2012-09-27 08:31:17', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 08:31:17', '2012-10-07 00:00:00', 't', '2012-09-27 08:31:17', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 08:31:17', '2012-09-27 08:31:17', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 08:31:17', '2012-09-27 08:31:17', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 08:31:17', '2012-09-27 08:31:17', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') Fixture Delete (0.2ms) 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-09-27 08:31:17', '2012-09-27 08:31:17', 'leaderboard, video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 08:31:17', '2012-09-27 08:31:17', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 08:31:17', '2012-09-27 08:31:17', 'parade', 405688915)  (43.1ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.5ms) 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::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 Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 08:31:26', 100, '2012-10-07 00:00:00', 't', '2012-09-27 08:31:26', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 08:31:26', '2012-10-07 00:00:00', 't', '2012-09-27 08:31:26', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 08:31:26', '2012-09-27 08:31:26', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 08:31:26', '2012-09-27 08:31:26', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 08:31:26', '2012-09-27 08:31:26', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') Fixture Delete (0.2ms) 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-09-27 08:31:26', '2012-09-27 08:31:26', 'leaderboard, video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 08:31:26', '2012-09-27 08:31:26', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 08:31:26', '2012-09-27 08:31:26', 'parade', 405688915)  (61.7ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.5ms) 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::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.0ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 08:31:41', 100, '2012-10-07 00:00:00', 't', '2012-09-27 08:31:41', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 08:31:41', '2012-10-07 00:00:00', 't', '2012-09-27 08:31:41', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 08:31:41', '2012-09-27 08:31:41', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 08:31:41', '2012-09-27 08:31:41', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 08:31:41', '2012-09-27 08:31:41', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 08:31:41', '2012-09-27 08:31:41', 'leaderboard, video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 08:31:41', '2012-09-27 08:31:41', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 08:31:41', '2012-09-27 08:31:41', 'parade', 405688915)  (44.4ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.5ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 718799085]] AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.2ms) rollback transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 718799085]] AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.2ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 08:32:00', 100, '2012-10-07 00:00:00', 't', '2012-09-27 08:32:00', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 08:32:00', '2012-10-07 00:00:00', 't', '2012-09-27 08:32:00', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 08:32:00', '2012-09-27 08:32:00', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 08:32:00', '2012-09-27 08:32:00', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 08:32:00', '2012-09-27 08:32:00', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 08:32:00', '2012-09-27 08:32:00', 'leaderboard, video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 08:32:00', '2012-09-27 08:32:00', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 08:32:00', '2012-09-27 08:32:00', 'parade', 405688915)  (45.3ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.3ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 718799085]] AdvertSelector::Placement Load (0.1ms) 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::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.0ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 08:32:48', 100, '2012-10-07 00:00:00', 't', '2012-09-27 08:32:48', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 08:32:48', '2012-10-07 00:00:00', 't', '2012-09-27 08:32:48', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 08:32:48', '2012-09-27 08:32:48', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 08:32:48', '2012-09-27 08:32:48', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 08:32:48', '2012-09-27 08:32:48', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 08:32:48', '2012-09-27 08:32:48', 'leaderboard, video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 08:32:48', '2012-09-27 08:32:48', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 08:32:48', '2012-09-27 08:32:48', 'parade', 405688915)  (38.9ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.5ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 718799085]] AdvertSelector::Placement Load (0.1ms) 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::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.0ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.3ms) 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-09-27 08:39:24', 100, '2012-10-07 00:00:00', 't', '2012-09-27 08:39:24', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 08:39:24', '2012-10-07 00:00:00', 't', '2012-09-27 08:39:24', 100, 394627963, 1000, 't', 0, '2012-09-27 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", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 08:39:24', '2012-09-27 08:39:24', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 08:39:24', '2012-09-27 08:39:24', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 08:39:24', '2012-09-27 08:39:24', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') Fixture Delete (0.2ms) DELETE FROM "advert_selector_placements" Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Parade', '2012-09-27 08:39:24', '2012-09-27 08:39:24', 'leaderboard,video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 08:39:24', '2012-09-27 08:39:24', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 08:39:24', '2012-09-27 08:39:24', 'parade', 405688915)  (125.5ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.2ms) 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::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.0ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 08:39:50', 100, '2012-10-07 00:00:00', 't', '2012-09-27 08:39:50', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 08:39:50', '2012-10-07 00:00:00', 't', '2012-09-27 08:39:50', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 08:39:50', '2012-09-27 08:39:50', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 08:39:50', '2012-09-27 08:39:50', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 08:39:50', '2012-09-27 08:39:50', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') Fixture Delete (0.2ms) 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-09-27 08:39:50', '2012-09-27 08:39:50', 'leaderboard,video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 08:39:50', '2012-09-27 08:39:50', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 08:39:50', '2012-09-27 08:39:50', 'parade', 405688915)  (29.1ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.7ms) 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::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 Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 08:40:04', 100, '2012-10-07 00:00:00', 't', '2012-09-27 08:40:04', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 08:40:04', '2012-10-07 00:00:00', 't', '2012-09-27 08:40:04', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 08:40:04', '2012-09-27 08:40:04', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 08:40:04', '2012-09-27 08:40:04', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 08:40:04', '2012-09-27 08:40:04', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') Fixture Delete (0.2ms) 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-09-27 08:40:04', '2012-09-27 08:40:04', 'leaderboard,video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 08:40:04', '2012-09-27 08:40:04', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 08:40:04', '2012-09-27 08:40:04', 'parade', 405688915)  (43.7ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.5ms) 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::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.0ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 08:40:16', 100, '2012-10-07 00:00:00', 't', '2012-09-27 08:40:16', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 08:40:16', '2012-10-07 00:00:00', 't', '2012-09-27 08:40:16', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 08:40:16', '2012-09-27 08:40:16', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 08:40:16', '2012-09-27 08:40:16', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 08:40:16', '2012-09-27 08:40:16', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 08:40:16', '2012-09-27 08:40:16', 'leaderboard,video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 08:40:16', '2012-09-27 08:40:16', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 08:40:16', '2012-09-27 08:40:16', 'parade', 405688915)  (33.3ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.5ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 718799085]] AdvertSelector::Placement Load (0.2ms) 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::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.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 08:40:42', 100, '2012-10-07 00:00:00', 't', '2012-09-27 08:40:42', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 08:40:42', '2012-10-07 00:00:00', 't', '2012-09-27 08:40:42', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 08:40:42', '2012-09-27 08:40:42', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 08:40:42', '2012-09-27 08:40:42', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 08:40:42', '2012-09-27 08:40:42', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 08:40:42', '2012-09-27 08:40:42', 'leaderboard,video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 08:40:42', '2012-09-27 08:40:42', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 08:40:42', '2012-09-27 08:40:42', 'parade', 405688915)  (48.8ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.4ms) 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::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.0ms) rollback transaction Connecting to database specified by database.yml  (0.2ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 08:42:31', 100, '2012-10-07 00:00:00', 't', '2012-09-27 08:42:31', 50, 814558298, 1000, 'f', 0, '2012-09-27 00:00:00') Fixture Insert (0.0ms) 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-09-27 08:42:31', '2012-10-07 00:00:00', 't', '2012-09-27 08:42:31', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 08:42:31', '2012-09-27 08:42:31', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 08:42:31', '2012-09-27 08:42:31', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 08:42:31', '2012-09-27 08:42:31', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') Fixture Delete (0.2ms) 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-09-27 08:42:31', '2012-09-27 08:42:31', 'leaderboard,video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 08:42:31', '2012-09-27 08:42:31', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 08:42:31', '2012-09-27 08:42:31', 'parade', 405688915)  (35.7ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.5ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 718799085]] AdvertSelector::Placement Load (0.1ms) 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::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.0ms) rollback transaction  (0.0ms) begin transaction 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::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 Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 08:42:40', 100, '2012-10-07 00:00:00', 't', '2012-09-27 08:42:40', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 08:42:40', '2012-10-07 00:00:00', 't', '2012-09-27 08:42:40', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 08:42:40', '2012-09-27 08:42:40', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 08:42:40', '2012-09-27 08:42:40', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 08:42:40', '2012-09-27 08:42:40', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 08:42:40', '2012-09-27 08:42:40', 'leaderboard,video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 08:42:40', '2012-09-27 08:42:40', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 08:42:40', '2012-09-27 08:42:40', 'parade', 405688915)  (36.7ms) commit transaction  (0.2ms) begin transaction AdvertSelector::Placement Load (0.6ms) 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::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.0ms) rollback transaction  (0.0ms) begin transaction 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::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 Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 08:44:09', 100, '2012-10-07 00:00:00', 't', '2012-09-27 08:44:09', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 08:44:09', '2012-10-07 00:00:00', 't', '2012-09-27 08:44:09', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 08:44:09', '2012-09-27 08:44:09', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 08:44:09', '2012-09-27 08:44:09', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 08:44:09', '2012-09-27 08:44:09', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 08:44:09', '2012-09-27 08:44:09', 'leaderboard,video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 08:44:09', '2012-09-27 08:44:09', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 08:44:09', '2012-09-27 08:44:09', 'parade', 405688915)  (38.9ms) commit transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.2ms) 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::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.0ms) rollback transaction  (0.0ms) begin transaction 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::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 Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 08:44:19', 100, '2012-10-07 00:00:00', 't', '2012-09-27 08:44:19', 50, 814558298, 1000, 'f', 0, '2012-09-27 00:00:00') Fixture Insert (0.0ms) 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-09-27 08:44:19', '2012-10-07 00:00:00', 't', '2012-09-27 08:44:19', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 08:44:19', '2012-09-27 08:44:19', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 08:44:19', '2012-09-27 08:44:19', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 08:44:19', '2012-09-27 08:44:19', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 08:44:19', '2012-09-27 08:44:19', 'leaderboard,video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 08:44:19', '2012-09-27 08:44:19', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 08:44:19', '2012-09-27 08:44:19', 'parade', 405688915)  (49.0ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.5ms) 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::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::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::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 Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 08:44:38', 100, '2012-10-07 00:00:00', 't', '2012-09-27 08:44:38', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 08:44:38', '2012-10-07 00:00:00', 't', '2012-09-27 08:44:38', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 08:44:38', '2012-09-27 08:44:38', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 08:44:38', '2012-09-27 08:44:38', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 08:44:38', '2012-09-27 08:44:38', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 08:44:38', '2012-09-27 08:44:38', 'leaderboard,video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 08:44:38', '2012-09-27 08:44:38', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 08:44:38', '2012-09-27 08:44:38', 'parade', 405688915)  (32.8ms) commit transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 718799085]] AdvertSelector::Placement Load (0.1ms) 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::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::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::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 Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 08:45:46', 100, '2012-10-07 00:00:00', 't', '2012-09-27 08:45:46', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 08:45:46', '2012-10-07 00:00:00', 't', '2012-09-27 08:45:46', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 08:45:46', '2012-09-27 08:45:46', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 08:45:46', '2012-09-27 08:45:46', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 08:45:46', '2012-09-27 08:45:46', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') Fixture Delete (0.2ms) 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-09-27 08:45:46', '2012-09-27 08:45:46', 'leaderboard,video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 08:45:46', '2012-09-27 08:45:46', 'parade', 1019730477) Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 08:45:46', '2012-09-27 08:45:46', 'parade', 405688915)  (41.4ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.5ms) 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::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::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::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 Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 08:46:07', 100, '2012-10-07 00:00:00', 't', '2012-09-27 08:46:07', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 08:46:07', '2012-10-07 00:00:00', 't', '2012-09-27 08:46:07', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 08:46:07', '2012-09-27 08:46:07', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 08:46:07', '2012-09-27 08:46:07', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 08:46:07', '2012-09-27 08:46:07', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 08:46:07', '2012-09-27 08:46:07', 'leaderboard,video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 08:46:07', '2012-09-27 08:46:07', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 08:46:07', '2012-09-27 08:46:07', 'parade', 405688915)  (41.6ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.5ms) 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::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.0ms) SAVEPOINT active_record_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]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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::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 Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 08:46:25', 100, '2012-10-07 00:00:00', 't', '2012-09-27 08:46:25', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 08:46:25', '2012-10-07 00:00:00', 't', '2012-09-27 08:46:25', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 08:46:25', '2012-09-27 08:46:25', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 08:46:25', '2012-09-27 08:46:25', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 08:46:25', '2012-09-27 08:46:25', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 08:46:25', '2012-09-27 08:46:25', 'leaderboard,video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 08:46:25', '2012-09-27 08:46:25', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 08:46:25', '2012-09-27 08:46:25', 'parade', 405688915)  (89.1ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.5ms) 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::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.3ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-09-27 08:46:25.240820', "conflicting_placements_array" = 'video,not_found' WHERE "advert_selector_placements"."id" = 718799085  (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::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.0ms) rollback transaction  (0.0ms) begin transaction 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 Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 08:47:40', 100, '2012-10-07 00:00:00', 't', '2012-09-27 08:47:40', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 08:47:40', '2012-10-07 00:00:00', 't', '2012-09-27 08:47:40', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 08:47:40', '2012-09-27 08:47:40', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 08:47:40', '2012-09-27 08:47:40', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 08:47:40', '2012-09-27 08:47:40', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 08:47:40', '2012-09-27 08:47:40', 'leaderboard,video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 08:47:40', '2012-09-27 08:47:40', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 08:47:40', '2012-09-27 08:47:40', 'parade', 405688915)  (63.1ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.5ms) 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::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.3ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = 'video,not_found', "updated_at" = '2012-09-27 08:47:40.769435' WHERE "advert_selector_placements"."id" = 718799085  (0.1ms) RELEASE SAVEPOINT active_record_1 AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 718799085]] AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.3ms) rollback transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.3ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 718799085]] AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.1ms) rollback transaction  (0.1ms) begin transaction 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 Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 08:49:45', 100, '2012-10-07 00:00:00', 't', '2012-09-27 08:49:45', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 08:49:45', '2012-10-07 00:00:00', 't', '2012-09-27 08:49:45', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 08:49:45', '2012-09-27 08:49:45', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 08:49:45', '2012-09-27 08:49:45', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 08:49:45', '2012-09-27 08:49:45', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') Fixture Delete (0.2ms) 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-09-27 08:49:45', '2012-09-27 08:49:45', 'leaderboard,video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 08:49:45', '2012-09-27 08:49:45', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 08:49:45', '2012-09-27 08:49:45', 'parade', 405688915)  (42.8ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.7ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 718799085]] AdvertSelector::Placement Load (0.1ms) 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::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.0ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = 'video,not_found', "updated_at" = '2012-09-27 08:49:45.633260' WHERE "advert_selector_placements"."id" = 718799085  (0.2ms) RELEASE SAVEPOINT active_record_1 AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 718799085]] AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.3ms) rollback transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.4ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 718799085]] AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.1ms) rollback transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 718799085]] AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 08:49:52', 100, '2012-10-07 00:00:00', 't', '2012-09-27 08:49:52', 50, 814558298, 1000, 'f', 0, '2012-09-27 00:00:00') Fixture Insert (0.0ms) 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-09-27 08:49:52', '2012-10-07 00:00:00', 't', '2012-09-27 08:49:52', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 08:49:52', '2012-09-27 08:49:52', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 08:49:52', '2012-09-27 08:49:52', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 08:49:52', '2012-09-27 08:49:52', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 08:49:52', '2012-09-27 08:49:52', 'leaderboard,video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 08:49:52', '2012-09-27 08:49:52', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 08:49:52', '2012-09-27 08:49:52', 'parade', 405688915)  (34.5ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.6ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 718799085]] AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.1ms) rollback transaction  (0.1ms) begin transaction 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.3ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = 'video,not_found', "updated_at" = '2012-09-27 08:49:52.695486' WHERE "advert_selector_placements"."id" = 718799085  (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::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.0ms) rollback transaction  (0.0ms) begin transaction 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 Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 09:52:55', 100, '2012-10-07 00:00:00', 't', '2012-09-27 09:52:55', 50, 814558298, 1000, 'f', 0, '2012-09-27 00:00:00') Fixture Insert (0.0ms) 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-09-27 09:52:55', '2012-10-07 00:00:00', 't', '2012-09-27 09:52:55', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 09:52:55', '2012-09-27 09:52:55', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 09:52:55', '2012-09-27 09:52:55', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 09:52:55', '2012-09-27 09:52:55', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') Fixture Delete (0.2ms) 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-09-27 09:52:55', '2012-09-27 09:52:55', 'leaderboard,video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 09:52:55', '2012-09-27 09:52:55', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 09:52:55', '2012-09-27 09:52:55', 'parade', 405688915)  (236.4ms) commit transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 718799085]] AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.1ms) rollback transaction  (0.1ms) begin transaction 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.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.1ms) SAVEPOINT active_record_1  (0.6ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = 'video,not_found', "updated_at" = '2012-09-27 09:52:56.135760' WHERE "advert_selector_placements"."id" = 718799085  (0.2ms) RELEASE SAVEPOINT active_record_1 AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 718799085]] AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.3ms) rollback transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 718799085]] AdvertSelector::Placement Load (0.1ms) 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::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 Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 09:53:30', 100, '2012-10-07 00:00:00', 't', '2012-09-27 09:53:30', 50, 814558298, 1000, 'f', 0, '2012-09-27 00:00:00') Fixture Insert (0.0ms) 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-09-27 09:53:30', '2012-10-07 00:00:00', 't', '2012-09-27 09:53:30', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 09:53:30', '2012-09-27 09:53:30', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 09:53:30', '2012-09-27 09:53:30', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 09:53:30', '2012-09-27 09:53:30', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 09:53:30', '2012-09-27 09:53:30', 'leaderboard,video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 09:53:30', '2012-09-27 09:53:30', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 09:53:30', '2012-09-27 09:53:30', 'parade', 405688915)  (431.4ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.6ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 718799085]] AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.1ms) rollback transaction  (0.1ms) begin transaction 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.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-09-27 09:53:30.615366', "conflicting_placements_array" = 'video,not_found' WHERE "advert_selector_placements"."id" = 718799085  (0.1ms) RELEASE SAVEPOINT active_record_1 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.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.4ms) rollback transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 718799085]] AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.1ms) rollback transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.2ms) 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 Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (1.0ms) DELETE FROM "advert_selector_banners" Fixture Insert (1.6ms) 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-09-27 10:02:49', 100, '2012-10-07 00:00:00', 't', '2012-09-27 10:02:49', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 10:02:49', '2012-10-07 00:00:00', 't', '2012-09-27 10:02:49', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 10:02:49', '2012-09-27 10:02:49', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 10:02:49', '2012-09-27 10:02:49', 814558298, 929640376, '', 'Banner') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 10:02:49', '2012-09-27 10:02:49', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') Fixture Delete (0.2ms) DELETE FROM "advert_selector_placements" Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Parade', '2012-09-27 10:02:49', '2012-09-27 10:02:49', 'leaderboard,video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 10:02:49', '2012-09-27 10:02:49', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 10:02:49', '2012-09-27 10:02:49', 'parade', 405688915)  (31.8ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 718799085]] AdvertSelector::Placement Load (0.1ms) 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::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.0ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-09-27 10:02:49.213976', "conflicting_placements_array" = 'video,not_found' WHERE "advert_selector_placements"."id" = 718799085 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.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."name" = 'video' LIMIT 1 AdvertSelector::Placement Load (0.0ms) 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]]  (0.1ms) rollback transaction  (0.0ms) begin transaction 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.0ms) rollback transaction  (0.0ms) begin transaction 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.2ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 10:03:09', 100, '2012-10-07 00:00:00', 't', '2012-09-27 10:03:09', 50, 814558298, 1000, 'f', 0, '2012-09-27 00:00:00') Fixture Insert (0.0ms) 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-09-27 10:03:09', '2012-10-07 00:00:00', 't', '2012-09-27 10:03:09', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 10:03:09', '2012-09-27 10:03:09', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 10:03:09', '2012-09-27 10:03:09', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 10:03:09', '2012-09-27 10:03:09', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 10:03:09', '2012-09-27 10:03:09', 'leaderboard,video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 10:03:09', '2012-09-27 10:03:09', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 10:03:09', '2012-09-27 10:03:09', 'parade', 405688915)  (274.2ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.5ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 718799085]] AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.1ms) rollback transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 718799085]] AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.1ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-09-27 10:03:10.121263', "conflicting_placements_array" = 'video,not_found' WHERE "advert_selector_placements"."id" = 718799085 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.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."name" = 'video' LIMIT 1 AdvertSelector::Placement Load (0.0ms) 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::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.0ms) rollback transaction  (0.0ms) begin transaction 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 Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 10:04:41', 100, '2012-10-07 00:00:00', 't', '2012-09-27 10:04:41', 50, 814558298, 1000, 'f', 0, '2012-09-27 00:00:00') Fixture Insert (0.0ms) 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-09-27 10:04:41', '2012-10-07 00:00:00', 't', '2012-09-27 10:04:41', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.2ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 10:04:41', '2012-09-27 10:04:41', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 10:04:41', '2012-09-27 10:04:41', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 10:04:41', '2012-09-27 10:04:41', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 10:04:41', '2012-09-27 10:04:41', 'leaderboard,video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 10:04:41', '2012-09-27 10:04:41', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 10:04:41', '2012-09-27 10:04:41', 'parade', 405688915)  (41.3ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.5ms) 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::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.3ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-09-27 10:04:41.969561', "conflicting_placements_array" = 'video,not_found' WHERE "advert_selector_placements"."id" = 718799085 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 AdvertSelector::Placement Load (0.0ms) 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::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.0ms) rollback transaction  (0.0ms) begin transaction 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 Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 10:05:07', 100, '2012-10-07 00:00:00', 't', '2012-09-27 10:05:07', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 10:05:07', '2012-10-07 00:00:00', 't', '2012-09-27 10:05:07', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 10:05:07', '2012-09-27 10:05:07', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 10:05:07', '2012-09-27 10:05:07', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 10:05:07', '2012-09-27 10:05:07', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 10:05:07', '2012-09-27 10:05:07', 'leaderboard,video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 10:05:07', '2012-09-27 10:05:07', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 10:05:07', '2012-09-27 10:05:07', 'parade', 405688915)  (45.3ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.5ms) 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.3ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-09-27 10:05:07.313296', "conflicting_placements_array" = 'video,not_found' WHERE "advert_selector_placements"."id" = 718799085 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.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."name" = 'video' LIMIT 1 AdvertSelector::Placement Load (0.0ms) 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 Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 10:05:24', 100, '2012-10-07 00:00:00', 't', '2012-09-27 10:05:24', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 10:05:24', '2012-10-07 00:00:00', 't', '2012-09-27 10:05:24', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 10:05:24', '2012-09-27 10:05:24', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 10:05:24', '2012-09-27 10:05:24', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 10:05:24', '2012-09-27 10:05:24', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 10:05:24', '2012-09-27 10:05:24', 'leaderboard,video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 10:05:24', '2012-09-27 10:05:24', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 10:05:24', '2012-09-27 10:05:24', 'parade', 405688915)  (36.1ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.5ms) 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.3ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = 'video,not_found', "updated_at" = '2012-09-27 10:05:24.187219' WHERE "advert_selector_placements"."id" = 718799085 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 AdvertSelector::Placement Load (0.0ms) 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 Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 10:05:53', 100, '2012-10-07 00:00:00', 't', '2012-09-27 10:05:53', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 10:05:53', '2012-10-07 00:00:00', 't', '2012-09-27 10:05:53', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 10:05:53', '2012-09-27 10:05:53', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 10:05:53', '2012-09-27 10:05:53', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 10:05:53', '2012-09-27 10:05:53', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 10:05:53', '2012-09-27 10:05:53', 'leaderboard,video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 10:05:53', '2012-09-27 10:05:53', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 10:05:53', '2012-09-27 10:05:53', 'parade', 405688915)  (120.6ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.5ms) 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.3ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = 'video,not_found', "updated_at" = '2012-09-27 10:05:53.871174' WHERE "advert_selector_placements"."id" = 718799085 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 AdvertSelector::Placement Load (0.0ms) 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 Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 10:06:03', 100, '2012-10-07 00:00:00', 't', '2012-09-27 10:06:03', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 10:06:03', '2012-10-07 00:00:00', 't', '2012-09-27 10:06:03', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 10:06:04', '2012-09-27 10:06:04', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 10:06:04', '2012-09-27 10:06:04', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 10:06:04', '2012-09-27 10:06:04', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 10:06:04', '2012-09-27 10:06:04', 'leaderboard,video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 10:06:04', '2012-09-27 10:06:04', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 10:06:04', '2012-09-27 10:06:04', 'parade', 405688915)  (371.3ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.5ms) 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.3ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = 'video,not_found', "updated_at" = '2012-09-27 10:06:04.395634' WHERE "advert_selector_placements"."id" = 718799085 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 AdvertSelector::Placement Load (0.0ms) 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 Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 10:08:41', 100, '2012-10-07 00:00:00', 't', '2012-09-27 10:08:41', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 10:08:41', '2012-10-07 00:00:00', 't', '2012-09-27 10:08:41', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 10:08:41', '2012-09-27 10:08:41', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 10:08:41', '2012-09-27 10:08:41', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 10:08:41', '2012-09-27 10:08:41', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') Fixture Delete (0.2ms) 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-09-27 10:08:41', '2012-09-27 10:08:41', 'leaderboard,video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 10:08:41', '2012-09-27 10:08:41', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 10:08:41', '2012-09-27 10:08:41', 'parade', 405688915)  (50.6ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.5ms) 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 Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 10:09:06', 100, '2012-10-07 00:00:00', 't', '2012-09-27 10:09:06', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 10:09:06', '2012-10-07 00:00:00', 't', '2012-09-27 10:09:06', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.2ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 10:09:06', '2012-09-27 10:09:06', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 10:09:06', '2012-09-27 10:09:06', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 10:09:06', '2012-09-27 10:09:06', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') Fixture Delete (0.2ms) 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-09-27 10:09:06', '2012-09-27 10:09:06', 'leaderboard,video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 10:09:06', '2012-09-27 10:09:06', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 10:09:06', '2012-09-27 10:09:06', 'parade', 405688915)  (54.4ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.5ms) 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 Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 10:09:43', 100, '2012-10-07 00:00:00', 't', '2012-09-27 10:09:43', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 10:09:43', '2012-10-07 00:00:00', 't', '2012-09-27 10:09:43', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 10:09:43', '2012-09-27 10:09:43', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 10:09:43', '2012-09-27 10:09:43', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 10:09:43', '2012-09-27 10:09:43', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 10:09:43', '2012-09-27 10:09:43', 'leaderboard,video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 10:09:43', '2012-09-27 10:09:43', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 10:09:43', '2012-09-27 10:09:43', 'parade', 405688915)  (36.0ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.5ms) 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.3ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = 'not_found,video', "updated_at" = '2012-09-27 10:09:43.504434' WHERE "advert_selector_placements"."id" = 718799085 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 AdvertSelector::Placement Load (0.0ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."name" = 'not_found' LIMIT 1 AdvertSelector::Placement Load (0.1ms) 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 Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 10:10:17', 100, '2012-10-07 00:00:00', 't', '2012-09-27 10:10:17', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 10:10:17', '2012-10-07 00:00:00', 't', '2012-09-27 10:10:17', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 10:10:17', '2012-09-27 10:10:17', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 10:10:17', '2012-09-27 10:10:17', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 10:10:17', '2012-09-27 10:10:17', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 10:10:17', '2012-09-27 10:10:17', 'leaderboard,video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 10:10:17', '2012-09-27 10:10:17', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 10:10:17', '2012-09-27 10:10:17', 'parade', 405688915)  (334.9ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.7ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 718799085]] AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.1ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = 'not_found,video', "updated_at" = '2012-09-27 10:10:18.343914' WHERE "advert_selector_placements"."id" = 718799085 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.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."name" = 'video' 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.1ms) 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.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 718799085]] AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.3ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 10:10:28', 100, '2012-10-07 00:00:00', 't', '2012-09-27 10:10:28', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 10:10:28', '2012-10-07 00:00:00', 't', '2012-09-27 10:10:28', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 10:10:28', '2012-09-27 10:10:28', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 10:10:28', '2012-09-27 10:10:28', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 10:10:28', '2012-09-27 10:10:28', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') Fixture Delete (0.2ms) 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-09-27 10:10:28', '2012-09-27 10:10:28', 'leaderboard,video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 10:10:28', '2012-09-27 10:10:28', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 10:10:28', '2012-09-27 10:10:28', 'parade', 405688915)  (295.2ms) commit transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 718799085]] AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.0ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = 'not_found,video', "updated_at" = '2012-09-27 10:10:28.487162' WHERE "advert_selector_placements"."id" = 718799085 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.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."name" = 'video' LIMIT 1 AdvertSelector::Placement Load (0.0ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."name" = 'not_found' LIMIT 1 AdvertSelector::Placement Load (0.1ms) 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 Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 10:10:38', 100, '2012-10-07 00:00:00', 't', '2012-09-27 10:10:38', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 10:10:38', '2012-10-07 00:00:00', 't', '2012-09-27 10:10:38', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 10:10:38', '2012-09-27 10:10:38', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 10:10:38', '2012-09-27 10:10:38', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 10:10:38', '2012-09-27 10:10:38', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 10:10:38', '2012-09-27 10:10:38', 'leaderboard,video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 10:10:38', '2012-09-27 10:10:38', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 10:10:38', '2012-09-27 10:10:38', 'parade', 405688915)  (389.2ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.5ms) 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.3ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = 'not_found,video', "updated_at" = '2012-09-27 10:10:38.920842' WHERE "advert_selector_placements"."id" = 718799085 AdvertSelector::Placement Load (0.3ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."name" = 'not_found' LIMIT 1 AdvertSelector::Placement Load (0.3ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."name" = 'video' LIMIT 1 AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."name" = 'not_found' LIMIT 1 AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."name" = 'video' LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1 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.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.3ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 10:11:30', 100, '2012-10-07 00:00:00', 't', '2012-09-27 10:11:30', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 10:11:30', '2012-10-07 00:00:00', 't', '2012-09-27 10:11:30', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 10:11:30', '2012-09-27 10:11:30', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 10:11:30', '2012-09-27 10:11:30', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 10:11:30', '2012-09-27 10:11:30', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 10:11:30', '2012-09-27 10:11:30', 'leaderboard,video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 10:11:30', '2012-09-27 10:11:30', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 10:11:30', '2012-09-27 10:11:30', 'parade', 405688915)  (285.9ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.6ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 718799085]] AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.1ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = 'not_found,video', "updated_at" = '2012-09-27 10:11:30.782422' WHERE "advert_selector_placements"."id" = 718799085 AdvertSelector::Placement Load (0.4ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."name" = 'leaderboard' LIMIT 1 AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."name" = 'not_found' LIMIT 1 AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."name" = 'video' LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1 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.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.3ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 10:11:43', 100, '2012-10-07 00:00:00', 't', '2012-09-27 10:11:43', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 10:11:43', '2012-10-07 00:00:00', 't', '2012-09-27 10:11:43', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 10:11:43', '2012-09-27 10:11:43', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 10:11:43', '2012-09-27 10:11:43', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 10:11:43', '2012-09-27 10:11:43', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 10:11:43', '2012-09-27 10:11:43', 'leaderboard,video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 10:11:43', '2012-09-27 10:11:43', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 10:11:43', '2012-09-27 10:11:43', 'parade', 405688915)  (43.1ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.6ms) 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.3ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = 'not_found,video', "updated_at" = '2012-09-27 10:11:43.828389' WHERE "advert_selector_placements"."id" = 718799085 AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."name" = 'leaderboard' LIMIT 1 AdvertSelector::Placement Load (0.0ms) 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 Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 10:11:52', 100, '2012-10-07 00:00:00', 't', '2012-09-27 10:11:52', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 10:11:52', '2012-10-07 00:00:00', 't', '2012-09-27 10:11:52', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 10:11:52', '2012-09-27 10:11:52', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 10:11:52', '2012-09-27 10:11:52', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 10:11:52', '2012-09-27 10:11:52', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') Fixture Delete (0.2ms) 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-09-27 10:11:52', '2012-09-27 10:11:52', 'leaderboard,video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 10:11:52', '2012-09-27 10:11:52', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 10:11:52', '2012-09-27 10:11:52', 'parade', 405688915)  (83.7ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.5ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 718799085]] AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = 'not_found,video', "updated_at" = '2012-09-27 10:11:52.195227' WHERE "advert_selector_placements"."id" = 718799085 AdvertSelector::Placement Load (0.3ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."name" = 'leaderboard' LIMIT 1 AdvertSelector::Placement Load (0.3ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."name" = 'leaderboard' LIMIT 1 AdvertSelector::Placement Load (0.3ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."name" = 'Leaderboard' LIMIT 1 AdvertSelector::Placement Load (0.3ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."name" = 'leaderboard' LIMIT 1 AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."name" = 'not_found' LIMIT 1 AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."name" = 'video' LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1 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.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.3ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 10:14:28', 100, '2012-10-07 00:00:00', 't', '2012-09-27 10:14:28', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 10:14:28', '2012-10-07 00:00:00', 't', '2012-09-27 10:14:28', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 10:14:28', '2012-09-27 10:14:28', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 10:14:28', '2012-09-27 10:14:28', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 10:14:28', '2012-09-27 10:14:28', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 10:14:28', '2012-09-27 10:14:28', 'leaderboard,video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 10:14:28', '2012-09-27 10:14:28', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 10:14:28', '2012-09-27 10:14:28', 'parade', 405688915)  (41.2ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.5ms) 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.3ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = 'not_found,video', "updated_at" = '2012-09-27 10:14:28.528059' WHERE "advert_selector_placements"."id" = 718799085  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction Connecting to database specified by database.yml Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 10:15:53', 100, '2012-10-07 00:00:00', 't', '2012-09-27 10:15:53', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 10:15:53', '2012-10-07 00:00:00', 't', '2012-09-27 10:15:53', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 10:15:53', '2012-09-27 10:15:53', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 10:15:53', '2012-09-27 10:15:53', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 10:15:53', '2012-09-27 10:15:53', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 10:15:53', '2012-09-27 10:15:53', 'leaderboard,video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 10:15:53', '2012-09-27 10:15:53', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 10:15:53', '2012-09-27 10:15:53', 'parade', 405688915)  (205.0ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.4ms) 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.3ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-09-27 10:15:53.970117', "conflicting_placements_array" = 'not_found,video' WHERE "advert_selector_placements"."id" = 718799085  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 10:16:15', 100, '2012-10-07 00:00:00', 't', '2012-09-27 10:16:15', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 10:16:15', '2012-10-07 00:00:00', 't', '2012-09-27 10:16:15', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 10:16:15', '2012-09-27 10:16:15', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 10:16:15', '2012-09-27 10:16:15', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 10:16:15', '2012-09-27 10:16:15', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') Fixture Delete (0.2ms) 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-09-27 10:16:15', '2012-09-27 10:16:15', 'leaderboard,video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 10:16:15', '2012-09-27 10:16:15', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 10:16:15', '2012-09-27 10:16:15', 'parade', 405688915)  (39.7ms) commit transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.5ms) 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.3ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-09-27 10:16:15.975682', "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.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 10:18:35', 100, '2012-10-07 00:00:00', 't', '2012-09-27 10:18:35', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 10:18:35', '2012-10-07 00:00:00', 't', '2012-09-27 10:18:35', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 10:18:35', '2012-09-27 10:18:35', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 10:18:35', '2012-09-27 10:18:35', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 10:18:35', '2012-09-27 10:18:35', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') Fixture Delete (0.2ms) DELETE FROM "advert_selector_placements" Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Parade', '2012-09-27 10:18:35', '2012-09-27 10:18:35', 'leaderboard,video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 10:18:35', '2012-09-27 10:18:35', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 10:18:35', '2012-09-27 10:18:35', 'parade', 405688915)  (54.1ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.5ms) 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.3ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = 'not_found,video', "updated_at" = '2012-09-27 10:18:35.260621' 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.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 10:18:48', 100, '2012-10-07 00:00:00', 't', '2012-09-27 10:18:48', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 10:18:48', '2012-10-07 00:00:00', 't', '2012-09-27 10:18:48', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 10:18:48', '2012-09-27 10:18:48', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 10:18:48', '2012-09-27 10:18:48', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 10:18:48', '2012-09-27 10:18:48', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') Fixture Delete (0.2ms) 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-09-27 10:18:48', '2012-09-27 10:18:48', 'leaderboard,video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 10:18:48', '2012-09-27 10:18:48', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 10:18:48', '2012-09-27 10:18:48', 'parade', 405688915)  (151.5ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.6ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 718799085]] AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.2ms) SAVEPOINT active_record_1  (0.5ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = 'not_found,video', "updated_at" = '2012-09-27 10:18:48.457383' WHERE "advert_selector_placements"."id" = 718799085 AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE (LOWER(name) = 'leaderboard') LIMIT 1  (0.2ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = '', "updated_at" = '2012-09-27 10:18:48.461411' 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  (0.1ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = 'paradenot_foundvideo', "updated_at" = '2012-09-27 10:18:48.463868' WHERE "advert_selector_placements"."id" = 718799085 AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE (LOWER(name) = 'not_found') 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 "conflicting_placements_array" = '', "updated_at" = '2012-09-27 10:18:48.466985' 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.1ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = 'paradeparadenot_foundvideo', "updated_at" = '2012-09-27 10:18:48.469466' WHERE "advert_selector_placements"."id" = 718799085 AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE (LOWER(name) = 'paradenot_foundvideo') LIMIT 1 AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."name" = 'paradeparadenot_foundvideo' LIMIT 1 AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."name" = 'paradenot_foundvideo' 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.1ms) 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.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 718799085]]  (0.2ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 10:19:42', 100, '2012-10-07 00:00:00', 't', '2012-09-27 10:19:42', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 10:19:42', '2012-10-07 00:00:00', 't', '2012-09-27 10:19:42', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 10:19:42', '2012-09-27 10:19:42', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 10:19:42', '2012-09-27 10:19:42', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 10:19:42', '2012-09-27 10:19:42', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 10:19:42', '2012-09-27 10:19:42', 'leaderboard,video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 10:19:42', '2012-09-27 10:19:42', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 10:19:42', '2012-09-27 10:19:42', 'parade', 405688915)  (48.0ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.5ms) 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.3ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = 'not_found,video', "updated_at" = '2012-09-27 10:19:42.748634' 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 "conflicting_placements_array" = '', "updated_at" = '2012-09-27 10:19:42.750551' 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 Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 10:20:07', 100, '2012-10-07 00:00:00', 't', '2012-09-27 10:20:07', 50, 814558298, 1000, 'f', 0, '2012-09-27 00:00:00') Fixture Insert (0.0ms) 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-09-27 10:20:07', '2012-10-07 00:00:00', 't', '2012-09-27 10:20:07', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 10:20:07', '2012-09-27 10:20:07', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 10:20:07', '2012-09-27 10:20:07', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 10:20:07', '2012-09-27 10:20:07', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 10:20:07', '2012-09-27 10:20:07', 'leaderboard,video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 10:20:07', '2012-09-27 10:20:07', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 10:20:07', '2012-09-27 10:20:07', 'parade', 405688915)  (50.4ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.5ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 718799085]] AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.1ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = 'not_found,video', "updated_at" = '2012-09-27 10:20:07.104609' 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 "conflicting_placements_array" = '', "updated_at" = '2012-09-27 10:20:07.107461' 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 Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 10:22:44', 100, '2012-10-07 00:00:00', 't', '2012-09-27 10:22:44', 50, 814558298, 1000, 'f', 0, '2012-09-27 00:00:00') Fixture Insert (0.0ms) 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-09-27 10:22:44', '2012-10-07 00:00:00', 't', '2012-09-27 10:22:44', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 10:22:44', '2012-09-27 10:22:44', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 10:22:44', '2012-09-27 10:22:44', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 10:22:44', '2012-09-27 10:22:44', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 10:22:44', '2012-09-27 10:22:44', 'leaderboard,video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 10:22:44', '2012-09-27 10:22:44', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 10:22:44', '2012-09-27 10:22:44', 'parade', 405688915)  (37.7ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.5ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 718799085]] AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.1ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-09-27 10:22:44.412006', "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-09-27 10:22:44.415493', "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.1ms) 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 Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 10:23:09', 100, '2012-10-07 00:00:00', 't', '2012-09-27 10:23:09', 50, 814558298, 1000, 'f', 0, '2012-09-27 00:00:00') Fixture Insert (0.0ms) 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-09-27 10:23:09', '2012-10-07 00:00:00', 't', '2012-09-27 10:23:09', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 10:23:09', '2012-09-27 10:23:09', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 10:23:09', '2012-09-27 10:23:09', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 10:23:09', '2012-09-27 10:23:09', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 10:23:09', '2012-09-27 10:23:09', 'leaderboard,video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 10:23:09', '2012-09-27 10:23:09', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 10:23:09', '2012-09-27 10:23:09', 'parade', 405688915)  (41.7ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.5ms) 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.3ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = 'not_found,video', "updated_at" = '2012-09-27 10:23:09.892292' 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 "conflicting_placements_array" = '', "updated_at" = '2012-09-27 10:23:09.894465' 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::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.0ms) rollback transaction  (0.0ms) begin transaction 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::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 Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 10:23:27', 100, '2012-10-07 00:00:00', 't', '2012-09-27 10:23:27', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 10:23:27', '2012-10-07 00:00:00', 't', '2012-09-27 10:23:27', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 10:23:27', '2012-09-27 10:23:27', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 10:23:27', '2012-09-27 10:23:27', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 10:23:27', '2012-09-27 10:23:27', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 10:23:27', '2012-09-27 10:23:27', 'leaderboard,video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 10:23:27', '2012-09-27 10:23:27', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 10:23:27', '2012-09-27 10:23:27', 'parade', 405688915)  (41.8ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.5ms) 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.3ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = 'not_found,video', "updated_at" = '2012-09-27 10:23:27.424277' 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 "conflicting_placements_array" = '', "updated_at" = '2012-09-27 10:23:27.426398' 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::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.0ms) rollback transaction  (0.0ms) begin transaction 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::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 Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 10:31:03', 100, '2012-10-07 00:00:00', 't', '2012-09-27 10:31:03', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 10:31:03', '2012-10-07 00:00:00', 't', '2012-09-27 10:31:03', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 10:31:03', '2012-09-27 10:31:03', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 10:31:03', '2012-09-27 10:31:03', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 10:31:03', '2012-09-27 10:31:03', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 10:31:03', '2012-09-27 10:31:03', 'leaderboard,video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 10:31:03', '2012-09-27 10:31:03', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 10:31:03', '2012-09-27 10:31:03', 'parade', 405688915)  (303.6ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.5ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 718799085]] AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-09-27 10:31:03.542990', "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-09-27 10:31:03.545222', "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::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.0ms) rollback transaction  (0.0ms) begin transaction 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::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 Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 10:31:29', 100, '2012-10-07 00:00:00', 't', '2012-09-27 10:31:29', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 10:31:29', '2012-10-07 00:00:00', 't', '2012-09-27 10:31:29', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 10:31:29', '2012-09-27 10:31:29', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 10:31:29', '2012-09-27 10:31:29', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 10:31:29', '2012-09-27 10:31:29', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') Fixture Delete (0.2ms) 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-09-27 10:31:29', '2012-09-27 10:31:29', 'leaderboard,video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 10:31:29', '2012-09-27 10:31:29', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 10:31:29', '2012-09-27 10:31:29', 'parade', 405688915)  (39.7ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.5ms) 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.3ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-09-27 10:31:29.968448', "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-09-27 10:31:29.970638', "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::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.0ms) rollback transaction  (0.0ms) begin transaction 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.2ms) rollback transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 718799085]] AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 10:32:13', 100, '2012-10-07 00:00:00', 't', '2012-09-27 10:32:13', 50, 814558298, 1000, 'f', 0, '2012-09-27 00:00:00') Fixture Insert (0.0ms) 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-09-27 10:32:13', '2012-10-07 00:00:00', 't', '2012-09-27 10:32:13', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 10:32:13', '2012-09-27 10:32:13', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 10:32:13', '2012-09-27 10:32:13', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 10:32:13', '2012-09-27 10:32:13', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') Fixture Delete (0.2ms) 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-09-27 10:32:13', '2012-09-27 10:32:13', 'leaderboard,video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 10:32:13', '2012-09-27 10:32:13', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 10:32:13', '2012-09-27 10:32:13', 'parade', 405688915)  (34.9ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.5ms) 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.2ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 10:32:49', 100, '2012-10-07 00:00:00', 't', '2012-09-27 10:32:49', 50, 814558298, 1000, 'f', 0, '2012-09-27 00:00:00') Fixture Insert (0.0ms) 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-09-27 10:32:49', '2012-10-07 00:00:00', 't', '2012-09-27 10:32:49', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 10:32:49', '2012-09-27 10:32:49', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 10:32:49', '2012-09-27 10:32:49', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 10:32:49', '2012-09-27 10:32:49', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 10:32:49', '2012-09-27 10:32:49', 'leaderboard,video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 10:32:49', '2012-09-27 10:32:49', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 10:32:49', '2012-09-27 10:32:49', 'parade', 405688915)  (41.5ms) commit transaction  (0.2ms) begin transaction AdvertSelector::Placement Load (0.5ms) 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 Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 10:33:02', 100, '2012-10-07 00:00:00', 't', '2012-09-27 10:33:02', 50, 814558298, 1000, 'f', 0, '2012-09-27 00:00:00') Fixture Insert (0.0ms) 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-09-27 10:33:02', '2012-10-07 00:00:00', 't', '2012-09-27 10:33:02', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 10:33:02', '2012-09-27 10:33:02', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 10:33:02', '2012-09-27 10:33:02', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 10:33:02', '2012-09-27 10:33:02', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 10:33:02', '2012-09-27 10:33:02', 'leaderboard,video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 10:33:02', '2012-09-27 10:33:02', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 10:33:02', '2012-09-27 10:33:02', 'parade', 405688915)  (43.2ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.5ms) 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 Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 10:33:07', 100, '2012-10-07 00:00:00', 't', '2012-09-27 10:33:07', 50, 814558298, 1000, 'f', 0, '2012-09-27 00:00:00') Fixture Insert (0.0ms) 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-09-27 10:33:07', '2012-10-07 00:00:00', 't', '2012-09-27 10:33:07', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 10:33:07', '2012-09-27 10:33:07', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 10:33:07', '2012-09-27 10:33:07', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 10:33:07', '2012-09-27 10:33:07', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 10:33:07', '2012-09-27 10:33:07', 'leaderboard,video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 10:33:07', '2012-09-27 10:33:07', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 10:33:07', '2012-09-27 10:33:07', 'parade', 405688915)  (44.4ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.6ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 718799085]] AdvertSelector::Placement Load (0.1ms) 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::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.0ms) rollback transaction  (0.0ms) begin transaction 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.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-09-27 10:33:07.304060', "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-09-27 10:33:07.306520', "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::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.0ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 10:33:12', 100, '2012-10-07 00:00:00', 't', '2012-09-27 10:33:12', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 10:33:12', '2012-10-07 00:00:00', 't', '2012-09-27 10:33:12', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 10:33:12', '2012-09-27 10:33:12', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 10:33:12', '2012-09-27 10:33:12', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 10:33:12', '2012-09-27 10:33:12', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') Fixture Delete (0.2ms) 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-09-27 10:33:12', '2012-09-27 10:33:12', 'leaderboard,video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 10:33:12', '2012-09-27 10:33:12', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 10:33:12', '2012-09-27 10:33:12', 'parade', 405688915)  (41.4ms) commit transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.2ms) 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::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.3ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = 'not_found,video', "updated_at" = '2012-09-27 10:33:12.228204' 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 "conflicting_placements_array" = '', "updated_at" = '2012-09-27 10:33:12.230381' 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.3ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."name" = 'not_found' LIMIT 1 AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."name" = 'video' LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1 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.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.3ms) rollback transaction  (0.1ms) begin transaction 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.0ms) rollback transaction  (0.0ms) begin transaction 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.0ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 10:34:10', 100, '2012-10-07 00:00:00', 't', '2012-09-27 10:34:10', 50, 814558298, 1000, 'f', 0, '2012-09-27 00:00:00') Fixture Insert (0.0ms) 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-09-27 10:34:10', '2012-10-07 00:00:00', 't', '2012-09-27 10:34:10', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 10:34:10', '2012-09-27 10:34:10', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 10:34:10', '2012-09-27 10:34:10', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 10:34:10', '2012-09-27 10:34:10', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 10:34:10', '2012-09-27 10:34:10', 'leaderboard,video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 10:34:10', '2012-09-27 10:34:10', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 10:34:10', '2012-09-27 10:34:10', 'parade', 405688915)  (50.1ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.5ms) 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::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.3ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = 'not_found,video', "updated_at" = '2012-09-27 10:34:10.673975' 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 "conflicting_placements_array" = '', "updated_at" = '2012-09-27 10:34:10.676176' 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.1ms) 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::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.0ms) rollback transaction  (0.0ms) begin transaction 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 Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 10:58:03', 100, '2012-10-07 00:00:00', 't', '2012-09-27 10:58:03', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 10:58:03', '2012-10-07 00:00:00', 't', '2012-09-27 10:58:03', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.2ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.2ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 10:58:03', '2012-09-27 10:58:03', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.2ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 10:58:03', '2012-09-27 10:58:03', 814558298, 929640376, '', 'Banner') Fixture Insert (0.2ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 10:58:03', '2012-09-27 10:58:03', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') Fixture Delete (0.6ms) DELETE FROM "advert_selector_placements" Fixture Insert (0.2ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Parade', '2012-09-27 10:58:03', '2012-09-27 10:58:03', 'leaderboard,video', 718799085) Fixture Insert (0.2ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 10:58:03', '2012-09-27 10:58:03', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 10:58:03', '2012-09-27 10:58:03', 'parade', 405688915)  (41.2ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 718799085]] AdvertSelector::Placement Load (0.1ms) 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::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.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-09-27 10:58:04.039040', "conflicting_placements_array" = 'not_found,video' WHERE "advert_selector_placements"."id" = 718799085 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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-09-27 10:58:04.050136', "conflicting_placements_array" = '' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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::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.0ms) rollback transaction  (0.0ms) begin transaction 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::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 Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 11:00:15', 100, '2012-10-07 00:00:00', 't', '2012-09-27 11:00:15', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 11:00:15', '2012-10-07 00:00:00', 't', '2012-09-27 11:00:15', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 11:00:15', '2012-09-27 11:00:15', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 11:00:15', '2012-09-27 11:00:15', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 11:00:15', '2012-09-27 11:00:15', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 11:00:15', '2012-09-27 11:00:15', 'leaderboard,video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 11:00:15', '2012-09-27 11:00:15', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 11:00:15', '2012-09-27 11:00:15', 'parade', 405688915)  (342.9ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.3ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 718799085]] AdvertSelector::Placement Load (0.1ms) 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::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.0ms) SAVEPOINT active_record_1  (0.5ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-09-27 11:00:15.376194', "conflicting_placements_array" = 'not_found,video' WHERE "advert_selector_placements"."id" = 718799085 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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-09-27 11:00:15.390564', "conflicting_placements_array" = '' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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::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.0ms) rollback transaction  (0.0ms) begin transaction 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::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 Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 11:05:47', 100, '2012-10-07 00:00:00', 't', '2012-09-27 11:05:47', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 11:05:47', '2012-10-07 00:00:00', 't', '2012-09-27 11:05:47', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 11:05:47', '2012-09-27 11:05:47', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 11:05:47', '2012-09-27 11:05:47', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 11:05:47', '2012-09-27 11:05:47', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') Fixture Delete (0.2ms) 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-09-27 11:05:47', '2012-09-27 11:05:47', 'leaderboard,video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 11:05:47', '2012-09-27 11:05:47', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 11:05:47', '2012-09-27 11:05:47', 'parade', 405688915)  (40.9ms) commit transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 718799085]] AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 11:05:47 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", nil], ["position", 1], ["updated_at", Thu, 27 Sep 2012 11:05:47 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 11:05:47 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 11:05:47 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position >= 1) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 11:05:47 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", "some_limit_helper_here"], ["position", 1], ["updated_at", Thu, 27 Sep 2012 11:05:47 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-09-27 11:05:47.851864' WHERE "advert_selector_helper_items"."id" = 960656442  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1) 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position > 2)  (0.1ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "position" = 11, "updated_at" = '2012-09-27 11:05:47.854191' WHERE "advert_selector_helper_items"."id" = 960656441  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 11)  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction 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.0ms) rollback transaction  (0.0ms) begin transaction 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.3ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = 'not_found,video', "updated_at" = '2012-09-27 11:05:47.858769' WHERE "advert_selector_placements"."id" = 718799085 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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 "conflicting_placements_array" = '', "updated_at" = '2012-09-27 11:05:47.860892' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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::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.0ms) rollback transaction  (0.0ms) begin transaction 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::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 Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 11:06:06', 100, '2012-10-07 00:00:00', 't', '2012-09-27 11:06:06', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 11:06:06', '2012-10-07 00:00:00', 't', '2012-09-27 11:06:06', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 11:06:06', '2012-09-27 11:06:06', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 11:06:06', '2012-09-27 11:06:06', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 11:06:06', '2012-09-27 11:06:06', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 11:06:06', '2012-09-27 11:06:06', 'leaderboard,video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 11:06:06', '2012-09-27 11:06:06', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 11:06:06', '2012-09-27 11:06:06', 'parade', 405688915)  (38.4ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.5ms) 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) SAVEPOINT active_record_1 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 11:06:06 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", nil], ["position", 1], ["updated_at", Thu, 27 Sep 2012 11:06:06 UTC +00:00]] SQL (0.0ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 11:06:06 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 11:06:06 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position >= 1) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 11:06:06 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", "some_limit_helper_here"], ["position", 1], ["updated_at", Thu, 27 Sep 2012 11:06:06 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "updated_at" = '2012-09-27 11:06:06.645790', "content_for" = 'f' WHERE "advert_selector_helper_items"."id" = 960656442  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1) 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position > 2)  (0.1ms) UPDATE "advert_selector_helper_items" SET "updated_at" = '2012-09-27 11:06:06.647957', "position" = 11, "content_for" = 'f' WHERE "advert_selector_helper_items"."id" = 960656441  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 11)  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction 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.0ms) rollback transaction  (0.0ms) begin transaction 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-09-27 11:06:06.652354', "conflicting_placements_array" = 'not_found,video' WHERE "advert_selector_placements"."id" = 718799085 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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-09-27 11:06:06.654397', "conflicting_placements_array" = '' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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::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.0ms) rollback transaction  (0.0ms) begin transaction 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::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 Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 11:06:41', 100, '2012-10-07 00:00:00', 't', '2012-09-27 11:06:41', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 11:06:41', '2012-10-07 00:00:00', 't', '2012-09-27 11:06:41', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 11:06:41', '2012-09-27 11:06:41', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 11:06:41', '2012-09-27 11:06:41', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 11:06:41', '2012-09-27 11:06:41', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 11:06:41', '2012-09-27 11:06:41', 'leaderboard,video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 11:06:41', '2012-09-27 11:06:41', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 11:06:41', '2012-09-27 11:06:41', 'parade', 405688915)  (300.0ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.5ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 718799085]] AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 11:06:41 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", nil], ["position", 1], ["updated_at", Thu, 27 Sep 2012 11:06:41 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 11:06:41 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 11:06:41 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position >= 1) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 11:06:41 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", "some_limit_helper_here"], ["position", 1], ["updated_at", Thu, 27 Sep 2012 11:06:41 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "updated_at" = '2012-09-27 11:06:41.808418', "content_for" = 'f' WHERE "advert_selector_helper_items"."id" = 960656442  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1) 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position > 2)  (0.1ms) UPDATE "advert_selector_helper_items" SET "position" = 11, "updated_at" = '2012-09-27 11:06:41.810686', "content_for" = 'f' WHERE "advert_selector_helper_items"."id" = 960656441  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 11)  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction 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.0ms) rollback transaction  (0.0ms) begin transaction 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-09-27 11:06:41.815425', "conflicting_placements_array" = 'not_found,video' WHERE "advert_selector_placements"."id" = 718799085 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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-09-27 11:06:41.817446', "conflicting_placements_array" = '' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE (LOWER(name) = 'parade') LIMIT 1 AdvertSelector::Placement Load (0.0ms) 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::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.0ms) rollback transaction  (0.0ms) begin transaction 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::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 Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 11:08:25', 100, '2012-10-07 00:00:00', 't', '2012-09-27 11:08:25', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 11:08:25', '2012-10-07 00:00:00', 't', '2012-09-27 11:08:25', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 11:08:25', '2012-09-27 11:08:25', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 11:08:25', '2012-09-27 11:08:25', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 11:08:25', '2012-09-27 11:08:25', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 11:08:25', '2012-09-27 11:08:25', 'leaderboard,video', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Video', '2012-09-27 11:08:25', '2012-09-27 11:08:25', 'parade', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 11:08:25', '2012-09-27 11:08:25', 'parade', 405688915)  (41.8ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.5ms) 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) SELECT COUNT(*) FROM "advert_selector_helper_items"   (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"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 718799085) ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 11:08:25 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", nil], ["position", 1], ["updated_at", Thu, 27 Sep 2012 11:08:25 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 718799085 AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 11:08:25 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 11:08:25 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 718799085 AND position >= 1) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 11:08:25 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", "some_limit_helper_here"], ["position", 1], ["updated_at", Thu, 27 Sep 2012 11:08:25 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-09-27 11:08:25.836962' WHERE "advert_selector_helper_items"."id" = 960656442  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 718799085 AND position = 1) 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"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 718799085 AND position > 2)  (0.0ms) UPDATE "advert_selector_helper_items" SET "position" = 11, "content_for" = 'f', "updated_at" = '2012-09-27 11:08:25.840032' WHERE "advert_selector_helper_items"."id" = 960656441  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 718799085 AND position = 11)  (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]]  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement'  (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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position DESC LIMIT 1  (0.1ms) rollback transaction  (0.0ms) begin transaction 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.0ms) rollback transaction  (0.0ms) begin transaction 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 "conflicting_placements_array" = 'not_found,video', "updated_at" = '2012-09-27 11:08:25.846780' WHERE "advert_selector_placements"."id" = 718799085 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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 "conflicting_placements_array" = '', "updated_at" = '2012-09-27 11:08:25.848814' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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::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.0ms) rollback transaction  (0.0ms) begin transaction 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::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 Connecting to database specified by database.yml  (0.1ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 11:41:23', 100, '2012-10-07 00:00:00', 't', '2012-09-27 11:41:23', 50, 814558298, 1000, 'f', 0, '2012-09-27 00:00:00') Fixture Insert (0.0ms) 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-09-27 11:41:23', '2012-10-07 00:00:00', 't', '2012-09-27 11:41:23', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 11:41:23', '2012-09-27 11:41:23', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 11:41:23', '2012-09-27 11:41:23', 814558298, 929640376, '', 'Banner') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 11:41:23', '2012-09-27 11:41:23', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 11:41:23', '2012-09-27 11:41:23', '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-09-27 11:41:23', '2012-09-27 11:41:23', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 11:41:23', '2012-09-27 11:41:23', 'parade', 405688915)  (34.7ms) 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]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items"   (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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 11:41:23 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 1], ["updated_at", Thu, 27 Sep 2012 11:41:23 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 11:41:23 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 11:41:23 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 11:41:23 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 11:41:23 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position > 2)  (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" = ? 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]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (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", 394627963]]  (0.0ms) SELECT COUNT(*) FROM "advert_selector_banners"  Processing by AdvertSelector::BannersController#create as HTML Parameters: {"banner"=>{"comment"=>"Pepsi banner", "name"=>"Pepsi", "end_time"=>"2012-10-07 00:00:00 UTC", "placement_id"=>"405688915", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-09-27 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", Thu, 27 Sep 2012 11:41:23 UTC +00:00], ["end_time", Sun, 07 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", Thu, 27 Sep 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Thu, 27 Sep 2012 11:41:23 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558299 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/banners/814558299 Completed 302 Found in 6ms (ActiveRecord: 0.8ms)  (0.1ms) 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", 394627963]]  (0.0ms) SELECT COUNT(*) FROM "advert_selector_banners" Processing by AdvertSelector::BannersController#destroy 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"]]  (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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position 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 3ms (ActiveRecord: 0.4ms)  (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", 394627963]] 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/banners/_form.html.erb (40.6ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 55ms (Views: 54.3ms | ActiveRecord: 0.6ms)  (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", 394627963]] Processing by AdvertSelector::BannersController#index as HTML AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 8ms (Views: 7.4ms | ActiveRecord: 0.4ms)  (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", 394627963]] 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 (21.7ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 28ms (Views: 27.5ms | ActiveRecord: 0.5ms)  (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", 394627963]] Processing by AdvertSelector::BannersController#show as HTML Parameters: {"id"=>"394627963"} Redirected to http://test.host/advert_selector/banners/394627963/edit Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (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", 394627963]] 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.0ms) rollback transaction  (0.0ms) begin transaction 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.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items"   (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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.4ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 11:41:23 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", nil], ["position", 1], ["updated_at", Thu, 27 Sep 2012 11:41:23 UTC +00:00]] SQL (0.0ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 11:41:23 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 11:41:23 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position >= 1) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 11:41:23 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", "some_limit_helper_here"], ["position", 1], ["updated_at", Thu, 27 Sep 2012 11:41:23 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-09-27 11:41:23.273601' WHERE "advert_selector_helper_items"."id" = 960656442  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1) SQL (0.0ms) 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position > 2)  (0.1ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "position" = 11, "updated_at" = '2012-09-27 11:41:23.275585' WHERE "advert_selector_helper_items"."id" = 960656441  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 11)  (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]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement'  (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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position DESC LIMIT 1  (0.1ms) rollback transaction  (0.0ms) begin transaction 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.0ms) rollback transaction  (0.0ms) begin transaction 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 "conflicting_placements_array" = 'not_found,video', "updated_at" = '2012-09-27 11:41:23.282490' WHERE "advert_selector_placements"."id" = 718799085 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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 "conflicting_placements_array" = '', "updated_at" = '2012-09-27 11:41:23.284572' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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::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.0ms) rollback transaction  (0.0ms) begin transaction 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::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::Placement Load (0.1ms) 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.5ms) INSERT INTO "advert_selector_placements" ("conflicting_placements_array", "created_at", "name", "only_once_per_session", "updated_at") VALUES (?, ?, ?, ?, ?) [["conflicting_placements_array", nil], ["created_at", Thu, 27 Sep 2012 11:41:23 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Thu, 27 Sep 2012 11:41:23 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 1019730478 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/1019730478 Completed 302 Found in 4ms (ActiveRecord: 0.6ms)  (0.0ms) SELECT COUNT(*) FROM "advert_selector_placements"   (0.1ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", "405688915"]]  (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"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position SQL (0.3ms) 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 3ms (ActiveRecord: 0.5ms)  (0.0ms) SELECT COUNT(*) FROM "advert_selector_placements"   (0.1ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/placements/_form.html.erb (16.2ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 26ms (Views: 24.3ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 AdvertSelector::Placement Load (0.0ms) 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 Completed 200 OK in 9ms (Views: 7.6ms | ActiveRecord: 0.4ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]] Processing by AdvertSelector::PlacementsController#new as HTML Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/placements/_form.html.erb (5.4ms) Completed 500 Internal Server Error in 7ms  (0.1ms) rollback transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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 0ms (ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/405688915 Completed 302 Found in 3ms (ActiveRecord: 0.2ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction 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" ORDER BY priority desc [AdvertSelector] AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" IN (405688915) Completed 500 Internal Server Error in 6ms  (0.0ms) rollback transaction Connecting to database specified by database.yml Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 11:41:34', 100, '2012-10-07 00:00:00', 't', '2012-09-27 11:41:34', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 11:41:34', '2012-10-07 00:00:00', 't', '2012-09-27 11:41:34', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 11:41:34', '2012-09-27 11:41:34', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 11:41:34', '2012-09-27 11:41:34', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 11:41:34', '2012-09-27 11:41:34', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') Fixture Delete (0.2ms) 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-09-27 11:41:34', '2012-09-27 11:41:34', '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-09-27 11:41:34', '2012-09-27 11:41:34', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 11:41:34', '2012-09-27 11:41:34', 'parade', 405688915)  (89.3ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.7ms) 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]]  (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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 11:41:34 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 1], ["updated_at", Thu, 27 Sep 2012 11:41:34 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 11:41:34 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 11:41:34 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 11:41:34 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 11:41:34 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position > 2)  (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" = ? 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]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.0ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 11:41:42', 100, '2012-10-07 00:00:00', 't', '2012-09-27 11:41:42', 50, 814558298, 1000, 'f', 0, '2012-09-27 00:00:00') Fixture Insert (0.0ms) 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-09-27 11:41:42', '2012-10-07 00:00:00', 't', '2012-09-27 11:41:42', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 11:41:43', '2012-09-27 11:41:43', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 11:41:43', '2012-09-27 11:41:43', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 11:41:43', '2012-09-27 11:41:43', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 11:41:43', '2012-09-27 11:41:43', '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-09-27 11:41:43', '2012-09-27 11:41:43', 'parade', 't', 1019730477) Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 11:41:43', '2012-09-27 11:41:43', 'parade', 405688915)  (49.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.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items"   (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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 11:41:43 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 1], ["updated_at", Thu, 27 Sep 2012 11:41:43 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 11:41:43 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 11:41:43 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 11:41:43 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 11:41:43 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position > 2)  (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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.0ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 11:42:10', 100, '2012-10-07 00:00:00', 't', '2012-09-27 11:42:10', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 11:42:10', '2012-10-07 00:00:00', 't', '2012-09-27 11:42:10', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 11:42:10', '2012-09-27 11:42:10', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 11:42:10', '2012-09-27 11:42:10', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 11:42:10', '2012-09-27 11:42:10', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 11:42:10', '2012-09-27 11:42:10', '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-09-27 11:42:10', '2012-09-27 11:42:10', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 11:42:10', '2012-09-27 11:42:10', 'parade', 405688915)  (37.1ms) 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]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items"   (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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 11:42:10 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 1], ["updated_at", Thu, 27 Sep 2012 11:42:10 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 11:42:10 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 11:42:10 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 11:42:10 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 11:42:10 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position > 2)  (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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.0ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 11:42:59', 100, '2012-10-07 00:00:00', 't', '2012-09-27 11:42:59', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 11:42:59', '2012-10-07 00:00:00', 't', '2012-09-27 11:42:59', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 11:42:59', '2012-09-27 11:42:59', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 11:42:59', '2012-09-27 11:42:59', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 11:42:59', '2012-09-27 11:42:59', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 11:42:59', '2012-09-27 11:42:59', '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-09-27 11:42:59', '2012-09-27 11:42:59', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 11:42:59', '2012-09-27 11:42:59', 'parade', 405688915)  (38.6ms) 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]]  (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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 11:42:59 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 1], ["updated_at", Thu, 27 Sep 2012 11:42:59 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 11:42:59 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 11:42:59 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 11:42:59 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 11:42:59 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position > 2)  (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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.0ms) rollback transaction Connecting to database specified by database.yml Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 11:43:19', 100, '2012-10-07 00:00:00', 't', '2012-09-27 11:43:19', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 11:43:19', '2012-10-07 00:00:00', 't', '2012-09-27 11:43:19', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 11:43:19', '2012-09-27 11:43:19', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 11:43:19', '2012-09-27 11:43:19', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 11:43:19', '2012-09-27 11:43:19', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 11:43:19', '2012-09-27 11:43:19', '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-09-27 11:43:19', '2012-09-27 11:43:19', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 11:43:19', '2012-09-27 11:43:19', 'parade', 405688915)  (211.7ms) 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.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items"   (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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 11:43:19 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 1], ["updated_at", Thu, 27 Sep 2012 11:43:19 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 11:43:19 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 11:43:19 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 11:43:19 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 11:43:19 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position > 2)  (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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.2ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.3ms) 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-09-27 11:49:08', 100, '2012-10-07 00:00:00', 't', '2012-09-27 11:49:08', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 11:49:08', '2012-10-07 00:00:00', 't', '2012-09-27 11:49:08', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 11:49:08', '2012-09-27 11:49:08', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 11:49:08', '2012-09-27 11:49:08', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 11:49:08', '2012-09-27 11:49:08', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 11:49:08', '2012-09-27 11:49:08', '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-09-27 11:49:08', '2012-09-27 11:49:08', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 11:49:08', '2012-09-27 11:49:08', 'parade', 405688915)  (139.6ms) 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]]  (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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 11:49:08 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 1], ["updated_at", Thu, 27 Sep 2012 11:49:08 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 11:49:08 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 11:49:08 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 11:49:08 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 11:49:08 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position > 2)  (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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.0ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.3ms) 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-09-27 11:49:17', 100, '2012-10-07 00:00:00', 't', '2012-09-27 11:49:17', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 11:49:17', '2012-10-07 00:00:00', 't', '2012-09-27 11:49:17', 100, 394627963, 1000, 't', 0, '2012-09-27 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", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 11:49:17', '2012-09-27 11:49:17', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 11:49:17', '2012-09-27 11:49:17', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 11:49:17', '2012-09-27 11:49:17', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') Fixture Delete (0.2ms) 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-09-27 11:49:17', '2012-09-27 11:49:17', 'leaderboard,video', 718799085) Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "only_once_per_session", "id") VALUES ('Video', '2012-09-27 11:49:17', '2012-09-27 11:49:17', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 11:49:17', '2012-09-27 11:49:17', 'parade', 405688915)  (124.7ms) 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]]  (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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 11:49:17 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 1], ["updated_at", Thu, 27 Sep 2012 11:49:17 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 11:49:17 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 11:49:17 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 11:49:17 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 11:49:17 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position > 2)  (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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.0ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 11:51:57', 100, '2012-10-07 00:00:00', 't', '2012-09-27 11:51:57', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 11:51:57', '2012-10-07 00:00:00', 't', '2012-09-27 11:51:57', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 11:51:57', '2012-09-27 11:51:57', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 11:51:57', '2012-09-27 11:51:57', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 11:51:57', '2012-09-27 11:51:57', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 11:51:57', '2012-09-27 11:51:57', '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-09-27 11:51:57', '2012-09-27 11:51:57', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 11:51:57', '2012-09-27 11:51:57', 'parade', 405688915)  (44.9ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.7ms) 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]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items"   (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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 11:51:57 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 1], ["updated_at", Thu, 27 Sep 2012 11:51:57 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 11:51:57 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 11:51:57 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 11:51:57 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 11:51:57 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position > 2)  (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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.0ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 11:53:25', 100, '2012-10-07 00:00:00', 't', '2012-09-27 11:53:25', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 11:53:25', '2012-10-07 00:00:00', 't', '2012-09-27 11:53:25', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 11:53:25', '2012-09-27 11:53:25', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 11:53:25', '2012-09-27 11:53:25', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 11:53:25', '2012-09-27 11:53:25', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 11:53:25', '2012-09-27 11:53:25', '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-09-27 11:53:25', '2012-09-27 11:53:25', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 11:53:25', '2012-09-27 11:53:25', 'parade', 405688915)  (38.5ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.7ms) 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]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items"   (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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 11:53:25 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 1], ["updated_at", Thu, 27 Sep 2012 11:53:25 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 11:53:25 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 11:53:25 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 11:53:25 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 11:53:25 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position > 2)  (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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.0ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 11:53:54', 100, '2012-10-07 00:00:00', 't', '2012-09-27 11:53:54', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 11:53:54', '2012-10-07 00:00:00', 't', '2012-09-27 11:53:54', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 11:53:54', '2012-09-27 11:53:54', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 11:53:54', '2012-09-27 11:53:54', 814558298, 929640376, '', 'Banner') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 11:53:54', '2012-09-27 11:53:54', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') Fixture Delete (0.2ms) 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-09-27 11:53:54', '2012-09-27 11:53:54', '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-09-27 11:53:54', '2012-09-27 11:53:54', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 11:53:54', '2012-09-27 11:53:54', 'parade', 405688915)  (52.8ms) commit transaction  (0.2ms) 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]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items"   (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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 11:53:54 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 1], ["updated_at", Thu, 27 Sep 2012 11:53:54 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 11:53:54 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 11:53:54 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 11:53:54 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 11:53:54 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position > 2)  (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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.0ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 11:54:06', 100, '2012-10-07 00:00:00', 't', '2012-09-27 11:54:06', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 11:54:06', '2012-10-07 00:00:00', 't', '2012-09-27 11:54:06', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 11:54:06', '2012-09-27 11:54:06', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 11:54:06', '2012-09-27 11:54:06', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 11:54:06', '2012-09-27 11:54:06', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 11:54:06', '2012-09-27 11:54:06', '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-09-27 11:54:06', '2012-09-27 11:54:06', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 11:54:06', '2012-09-27 11:54:06', 'parade', 405688915)  (41.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]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items"   (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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 11:54:06 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 1], ["updated_at", Thu, 27 Sep 2012 11:54:06 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 11:54:06 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 11:54:06 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 11:54:06 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 11:54:06 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position > 2)  (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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.0ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 11:54:42', 100, '2012-10-07 00:00:00', 't', '2012-09-27 11:54:42', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 11:54:42', '2012-10-07 00:00:00', 't', '2012-09-27 11:54:42', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.2ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 11:54:42', '2012-09-27 11:54:42', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 11:54:42', '2012-09-27 11:54:42', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 11:54:42', '2012-09-27 11:54:42', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') Fixture Delete (0.2ms) 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-09-27 11:54:42', '2012-09-27 11:54:42', '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-09-27 11:54:42', '2012-09-27 11:54:42', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 11:54:42', '2012-09-27 11:54:42', 'parade', 405688915)  (40.2ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.7ms) 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]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items"   (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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 11:54:42 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 1], ["updated_at", Thu, 27 Sep 2012 11:54:42 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 11:54:42 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 11:54:42 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 11:54:42 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 11:54:42 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position > 2)  (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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.0ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 11:55:00', 100, '2012-10-07 00:00:00', 't', '2012-09-27 11:55:00', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 11:55:00', '2012-10-07 00:00:00', 't', '2012-09-27 11:55:00', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 11:55:00', '2012-09-27 11:55:00', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 11:55:00', '2012-09-27 11:55:00', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 11:55:00', '2012-09-27 11:55:00', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') Fixture Delete (0.2ms) 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-09-27 11:55:00', '2012-09-27 11:55:00', '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-09-27 11:55:00', '2012-09-27 11:55:00', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 11:55:00', '2012-09-27 11:55:00', 'parade', 405688915)  (53.9ms) 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]]  (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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 11:55:00 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 1], ["updated_at", Thu, 27 Sep 2012 11:55:00 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 11:55:00 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 11:55:00 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 11:55:00 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 11:55:00 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position > 2)  (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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.2ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 11:55:32', 100, '2012-10-07 00:00:00', 't', '2012-09-27 11:55:32', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 11:55:32', '2012-10-07 00:00:00', 't', '2012-09-27 11:55:32', 100, 394627963, 1000, 't', 0, '2012-09-27 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", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 11:55:32', '2012-09-27 11:55:32', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 11:55:32', '2012-09-27 11:55:32', 814558298, 929640376, '', 'Banner') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 11:55:32', '2012-09-27 11:55:32', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') Fixture Delete (0.2ms) 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-09-27 11:55:32', '2012-09-27 11:55:32', '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-09-27 11:55:32', '2012-09-27 11:55:32', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 11:55:32', '2012-09-27 11:55:32', 'parade', 405688915)  (46.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]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items"   (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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 11:55:32 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 1], ["updated_at", Thu, 27 Sep 2012 11:55:32 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 11:55:32 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 11:55:32 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 11:55:32 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 11:55:32 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position > 2)  (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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) 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", nil], ["confirmed", false], ["created_at", Thu, 27 Sep 2012 11:55:32 UTC +00:00], ["end_time", Sun, 07 Oct 2012 00:00:00 UTC +00:00], ["fast_mode", false], ["frequency", nil], ["name", nil], ["placement_id", nil], ["priority", 0], ["running_view_count", 0], ["start_time", Wed, 26 Sep 2012 21:00:00 UTC +00:00], ["target_view_count", 100], ["updated_at", Thu, 27 Sep 2012 11:55:32 UTC +00:00]] SQLite3::ConstraintException: advert_selector_banners.name may not be NULL: 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 (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 11:55:49', 100, '2012-10-07 00:00:00', 't', '2012-09-27 11:55:49', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 11:55:49', '2012-10-07 00:00:00', 't', '2012-09-27 11:55:49', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 11:55:49', '2012-09-27 11:55:49', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 11:55:49', '2012-09-27 11:55:49', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 11:55:49', '2012-09-27 11:55:49', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 11:55:49', '2012-09-27 11:55:49', '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-09-27 11:55:49', '2012-09-27 11:55:49', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 11:55:49', '2012-09-27 11:55:49', 'parade', 405688915)  (37.8ms) 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]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items"   (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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 11:55:50 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 1], ["updated_at", Thu, 27 Sep 2012 11:55:50 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 11:55:50 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 11:55:50 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 11:55:50 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 11:55:50 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position > 2)  (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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) 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", nil], ["confirmed", false], ["created_at", Thu, 27 Sep 2012 11:55:50 UTC +00:00], ["end_time", Sun, 07 Oct 2012 00:00:00 UTC +00:00], ["fast_mode", false], ["frequency", nil], ["name", "test1"], ["placement_id", nil], ["priority", 0], ["running_view_count", 0], ["start_time", Wed, 26 Sep 2012 21:00:00 UTC +00:00], ["target_view_count", 100], ["updated_at", Thu, 27 Sep 2012 11:55:50 UTC +00:00]] SQLite3::ConstraintException: advert_selector_banners.placement_id may not be NULL: 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 (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction Connecting to database specified by database.yml  (0.2ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 11:56:20', 100, '2012-10-07 00:00:00', 't', '2012-09-27 11:56:20', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 11:56:20', '2012-10-07 00:00:00', 't', '2012-09-27 11:56:20', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 11:56:20', '2012-09-27 11:56:20', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 11:56:20', '2012-09-27 11:56:20', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 11:56:20', '2012-09-27 11:56:20', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') Fixture Delete (0.2ms) 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-09-27 11:56:20', '2012-09-27 11:56:20', '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-09-27 11:56:20', '2012-09-27 11:56:20', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 11:56:20', '2012-09-27 11:56:20', 'parade', 405688915)  (52.0ms) 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.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items"   (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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 11:56:20 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 1], ["updated_at", Thu, 27 Sep 2012 11:56:20 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 11:56:20 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 11:56:20 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 11:56:20 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 11:56:20 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position > 2)  (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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (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]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "start_time" = '2012-09-26 21:00:00.000000', "updated_at" = '2012-09-27 11:56:20.556233', "target_view_count" = 100 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 11:56:47', 100, '2012-10-07 00:00:00', 't', '2012-09-27 11:56:47', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 11:56:47', '2012-10-07 00:00:00', 't', '2012-09-27 11:56:47', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 11:56:47', '2012-09-27 11:56:47', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 11:56:47', '2012-09-27 11:56:47', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 11:56:47', '2012-09-27 11:56:47', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 11:56:47', '2012-09-27 11:56:47', '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-09-27 11:56:47', '2012-09-27 11:56:47', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 11:56:47', '2012-09-27 11:56:47', 'parade', 405688915)  (38.9ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.4ms) 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]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items"   (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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 11:56:47 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 1], ["updated_at", Thu, 27 Sep 2012 11:56:47 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 11:56:47 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 11:56:47 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 11:56:47 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 11:56:47 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position > 2)  (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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 11:56:47.398292', "target_view_count" = 100, "start_time" = '2012-09-26 21:00:00.000000' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 11:57:04', 100, '2012-10-07 00:00:00', 't', '2012-09-27 11:57:04', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 11:57:04', '2012-10-07 00:00:00', 't', '2012-09-27 11:57:04', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 11:57:04', '2012-09-27 11:57:04', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 11:57:04', '2012-09-27 11:57:04', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 11:57:04', '2012-09-27 11:57:04', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') Fixture Delete (0.2ms) 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-09-27 11:57:04', '2012-09-27 11:57:04', '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-09-27 11:57:04', '2012-09-27 11:57:04', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 11:57:04', '2012-09-27 11:57:04', 'parade', 405688915)  (48.1ms) 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.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items"   (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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 11:57:04 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 1], ["updated_at", Thu, 27 Sep 2012 11:57:04 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 11:57:04 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 11:57:04 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 11:57:04 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 11:57:04 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position > 2)  (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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "start_time" = '2012-09-26 21:00:00.000000', "target_view_count" = 100, "updated_at" = '2012-09-27 11:57:04.247697' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.7ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 11:57:19', 100, '2012-10-07 00:00:00', 't', '2012-09-27 11:57:19', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 11:57:19', '2012-10-07 00:00:00', 't', '2012-09-27 11:57:19', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 11:57:19', '2012-09-27 11:57:19', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 11:57:19', '2012-09-27 11:57:19', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 11:57:19', '2012-09-27 11:57:19', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') Fixture Delete (0.2ms) 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-09-27 11:57:19', '2012-09-27 11:57:19', '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-09-27 11:57:19', '2012-09-27 11:57:19', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 11:57:19', '2012-09-27 11:57:19', 'parade', 405688915)  (43.5ms) 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]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items"   (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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.8ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 11:57:19 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 1], ["updated_at", Thu, 27 Sep 2012 11:57:19 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 11:57:19 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 11:57:19 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 11:57:19 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 11:57:19 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position > 2)  (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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.2ms) rollback transaction  (0.2ms) begin transaction AdvertSelector::Banner Load (0.3ms) 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]]  (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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 11:57:20.597850', "target_view_count" = 100, "start_time" = '2012-09-26 21:00:00.000000' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (1.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 11:57:33', 100, '2012-10-07 00:00:00', 't', '2012-09-27 11:57:33', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 11:57:33', '2012-10-07 00:00:00', 't', '2012-09-27 11:57:33', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 11:57:33', '2012-09-27 11:57:33', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 11:57:33', '2012-09-27 11:57:33', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 11:57:33', '2012-09-27 11:57:33', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') Fixture Delete (0.2ms) 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-09-27 11:57:33', '2012-09-27 11:57:33', '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-09-27 11:57:33', '2012-09-27 11:57:33', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 11:57:33', '2012-09-27 11:57:33', 'parade', 405688915)  (55.4ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.8ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "start_time" = '2012-09-26 21:00:00.000000', "updated_at" = '2012-09-27 11:57:33.536171', "target_view_count" = 100 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 11:57:59', 100, '2012-10-07 00:00:00', 't', '2012-09-27 11:57:59', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 11:57:59', '2012-10-07 00:00:00', 't', '2012-09-27 11:57:59', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 11:57:59', '2012-09-27 11:57:59', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 11:57:59', '2012-09-27 11:57:59', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 11:57:59', '2012-09-27 11:57:59', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') Fixture Delete (0.2ms) 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-09-27 11:57:59', '2012-09-27 11:57:59', '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-09-27 11:57:59', '2012-09-27 11:57:59', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 11:57:59', '2012-09-27 11:57:59', 'parade', 405688915)  (43.5ms) commit transaction  (0.2ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "start_time" = '2012-09-26 21:00:00.000000', "updated_at" = '2012-09-27 11:57:59.624671', "target_view_count" = 100 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 11:58:12', 100, '2012-10-07 00:00:00', 't', '2012-09-27 11:58:12', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 11:58:12', '2012-10-07 00:00:00', 't', '2012-09-27 11:58:12', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 11:58:12', '2012-09-27 11:58:12', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 11:58:12', '2012-09-27 11:58:12', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 11:58:12', '2012-09-27 11:58:12', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') Fixture Delete (0.2ms) 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-09-27 11:58:12', '2012-09-27 11:58:12', '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-09-27 11:58:12', '2012-09-27 11:58:12', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 11:58:12', '2012-09-27 11:58:12', 'parade', 405688915)  (259.0ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.4ms) 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]]  (0.1ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "target_view_count" = 100, "updated_at" = '2012-09-27 11:58:12.350630', "start_time" = '2012-09-26 21:00:00.000000' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 11:58:19', 100, '2012-10-07 00:00:00', 't', '2012-09-27 11:58:19', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 11:58:19', '2012-10-07 00:00:00', 't', '2012-09-27 11:58:19', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 11:58:19', '2012-09-27 11:58:19', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 11:58:19', '2012-09-27 11:58:19', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 11:58:19', '2012-09-27 11:58:19', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') Fixture Delete (0.2ms) 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-09-27 11:58:19', '2012-09-27 11:58:19', '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-09-27 11:58:19', '2012-09-27 11:58:19', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 11:58:19', '2012-09-27 11:58:19', 'parade', 405688915)  (40.5ms) 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.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "target_view_count" = 100, "updated_at" = '2012-09-27 11:58:19.472852', "start_time" = '2012-09-26 21:00:00.000000' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 11:58:30', 100, '2012-10-07 00:00:00', 't', '2012-09-27 11:58:30', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 11:58:30', '2012-10-07 00:00:00', 't', '2012-09-27 11:58:30', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 11:58:30', '2012-09-27 11:58:30', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 11:58:30', '2012-09-27 11:58:30', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 11:58:30', '2012-09-27 11:58:30', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 11:58:30', '2012-09-27 11:58: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-09-27 11:58:30', '2012-09-27 11:58: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-09-27 11:58:30', '2012-09-27 11:58:30', 'parade', 405688915)  (182.3ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 11:58:31.123711', "target_view_count" = 100, "start_time" = '2012-09-26 21:00:00.000000' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 11:59:15', 100, '2012-10-07 00:00:00', 't', '2012-09-27 11:59:15', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 11:59:15', '2012-10-07 00:00:00', 't', '2012-09-27 11:59:15', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 11:59:15', '2012-09-27 11:59:15', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 11:59:15', '2012-09-27 11:59:15', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 11:59:15', '2012-09-27 11:59:15', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 11:59:15', '2012-09-27 11:59:15', '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-09-27 11:59:15', '2012-09-27 11:59:15', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 11:59:15', '2012-09-27 11:59:15', 'parade', 405688915)  (141.5ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction Connecting to database specified by database.yml Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 12:03:22', 100, '2012-10-07 00:00:00', 't', '2012-09-27 12:03:22', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 12:03:22', '2012-10-07 00:00:00', 't', '2012-09-27 12:03:22', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 12:03:22', '2012-09-27 12:03:22', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 12:03:22', '2012-09-27 12:03:22', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 12:03:22', '2012-09-27 12:03:22', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') Fixture Delete (0.2ms) 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-09-27 12:03:22', '2012-09-27 12:03:22', '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-09-27 12:03:22', '2012-09-27 12:03:22', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 12:03:22', '2012-09-27 12:03:22', 'parade', 405688915)  (429.6ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "start_time" = '2012-09-26 21:00:00.000000', "target_view_count" = 100, "updated_at" = '2012-09-27 12:03:22.984612' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 12:06:25', 100, '2012-10-07 00:00:00', 't', '2012-09-27 12:06:25', 50, 814558298, 1000, 'f', 0, '2012-09-27 00:00:00') Fixture Insert (0.0ms) 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-09-27 12:06:25', '2012-10-07 00:00:00', 't', '2012-09-27 12:06:25', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 12:06:25', '2012-09-27 12:06:25', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 12:06:25', '2012-09-27 12:06:25', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 12:06:25', '2012-09-27 12:06:25', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') Fixture Delete (0.2ms) 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-09-27 12:06:25', '2012-09-27 12:06:25', '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-09-27 12:06:25', '2012-09-27 12:06:25', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 12:06:25', '2012-09-27 12:06:25', 'parade', 405688915)  (40.1ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "start_time" = '2012-09-26 21:00:00.000000', "target_view_count" = 100, "updated_at" = '2012-09-27 12:06:25.374608' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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" = 200, "updated_at" = '2012-09-27 12:06:25.383944' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 12:07:10', 100, '2012-10-07 00:00:00', 't', '2012-09-27 12:07:10', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 12:07:10', '2012-10-07 00:00:00', 't', '2012-09-27 12:07:10', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 12:07:10', '2012-09-27 12:07:10', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 12:07:10', '2012-09-27 12:07:10', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 12:07:10', '2012-09-27 12:07:10', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 12:07:10', '2012-09-27 12:07:10', '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-09-27 12:07:10', '2012-09-27 12:07:10', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 12:07:10', '2012-09-27 12:07:10', 'parade', 405688915)  (43.0ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 12:07:10.939472', "start_time" = '2012-09-26 21:00:00.000000', "target_view_count" = 100 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 12:07:10.949377', "running_view_count" = 0 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 12:07:23', 100, '2012-10-07 00:00:00', 't', '2012-09-27 12:07:23', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 12:07:23', '2012-10-07 00:00:00', 't', '2012-09-27 12:07:23', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 12:07:23', '2012-09-27 12:07:23', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 12:07:23', '2012-09-27 12:07:23', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 12:07:23', '2012-09-27 12:07:23', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 12:07:23', '2012-09-27 12:07:23', '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-09-27 12:07:23', '2012-09-27 12:07:23', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 12:07:23', '2012-09-27 12:07:23', 'parade', 405688915)  (48.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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "start_time" = '2012-09-26 21:00:00.000000', "updated_at" = '2012-09-27 12:07:23.499908', "target_view_count" = 100 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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" = 0, "updated_at" = '2012-09-27 12:07:23.509236' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 12:08:21', 100, '2012-10-07 00:00:00', 't', '2012-09-27 12:08:21', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 12:08:21', '2012-10-07 00:00:00', 't', '2012-09-27 12:08:21', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 12:08:21', '2012-09-27 12:08:21', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 12:08:21', '2012-09-27 12:08:21', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 12:08:21', '2012-09-27 12:08:21', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') Fixture Delete (0.2ms) 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-09-27 12:08:21', '2012-09-27 12:08:21', '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-09-27 12:08:21', '2012-09-27 12:08:21', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 12:08:21', '2012-09-27 12:08:21', 'parade', 405688915)  (465.8ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.3ms) 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]]  (0.1ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 12:08:22.174067', "start_time" = '2012-09-26 21:00:00.000000', "target_view_count" = 100 WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 12:08:22.198414', "running_view_count" = 0 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 12:08:36', 100, '2012-10-07 00:00:00', 't', '2012-09-27 12:08:36', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 12:08:36', '2012-10-07 00:00:00', 't', '2012-09-27 12:08:36', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 12:08:36', '2012-09-27 12:08:36', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 12:08:36', '2012-09-27 12:08:36', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 12:08:36', '2012-09-27 12:08:36', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 12:08:36', '2012-09-27 12:08:36', 'leaderboard,video', 718799085) Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "only_once_per_session", "id") VALUES ('Video', '2012-09-27 12:08:36', '2012-09-27 12:08:36', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 12:08:36', '2012-09-27 12:08:36', 'parade', 405688915)  (44.6ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "target_view_count" = 100, "start_time" = '2012-09-26 21:00:00.000000', "updated_at" = '2012-09-27 12:08:36.691451' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 12:08:36.700898', "running_view_count" = 0 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 Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.5ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 12:08:53', 100, '2012-10-07 00:00:00', 't', '2012-09-27 12:08:53', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 12:08:53', '2012-10-07 00:00:00', 't', '2012-09-27 12:08:53', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 12:08:53', '2012-09-27 12:08:53', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 12:08:53', '2012-09-27 12:08:53', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 12:08:53', '2012-09-27 12:08:53', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 12:08:53', '2012-09-27 12:08:53', '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-09-27 12:08:53', '2012-09-27 12:08:53', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 12:08:53', '2012-09-27 12:08:53', 'parade', 405688915)  (80.8ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "target_view_count" = 100, "start_time" = '2012-09-26 21:00:00.000000', "updated_at" = '2012-09-27 12:08:53.575230' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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" = 0, "updated_at" = '2012-09-27 12:08:53.584778' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]]  (0.4ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 12:09:15', 100, '2012-10-07 00:00:00', 't', '2012-09-27 12:09:15', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 12:09:15', '2012-10-07 00:00:00', 't', '2012-09-27 12:09:15', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 12:09:15', '2012-09-27 12:09:15', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 12:09:15', '2012-09-27 12:09:15', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 12:09:15', '2012-09-27 12:09:15', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') Fixture Delete (0.2ms) 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-09-27 12:09:15', '2012-09-27 12:09:15', '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-09-27 12:09:15', '2012-09-27 12:09:15', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 12:09:15', '2012-09-27 12:09:15', 'parade', 405688915)  (31.0ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.7ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "start_time" = '2012-09-26 21:00:00.000000', "target_view_count" = 100, "updated_at" = '2012-09-27 12:09:15.731629' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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" = 0, "updated_at" = '2012-09-27 12:09:15.741091' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 AdvertSelector::Banner Load (0.3ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]]  (0.4ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 12:16:37', 100, '2012-10-07 00:00:00', 't', '2012-09-27 12:16:37', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 12:16:37', '2012-10-07 00:00:00', 't', '2012-09-27 12:16:37', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 12:16:37', '2012-09-27 12:16:37', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 12:16:37', '2012-09-27 12:16:37', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 12:16:37', '2012-09-27 12:16:37', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') Fixture Delete (0.2ms) 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-09-27 12:16:37', '2012-09-27 12:16:37', '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-09-27 12:16:37', '2012-09-27 12:16:37', 'parade', 't', 1019730477) Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 12:16:37', '2012-09-27 12:16:37', 'parade', 405688915)  (91.7ms) 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]]  (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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 12:16:37 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 1], ["updated_at", Thu, 27 Sep 2012 12:16:37 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 12:16:37 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 12:16:37 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 12:16:37 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 12:16:37 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position > 2)  (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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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]]  (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]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "start_time" = '2012-09-26 21:00:00.000000', "target_view_count" = 100, "updated_at" = '2012-09-27 12:16:37.692595' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 12:16:37.695579', "running_view_count" = 0 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]]  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 12:16:40', 100, '2012-10-07 00:00:00', 't', '2012-09-27 12:16:40', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 12:16:40', '2012-10-07 00:00:00', 't', '2012-09-27 12:16:40', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 12:16:40', '2012-09-27 12:16:40', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 12:16:40', '2012-09-27 12:16:40', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 12:16:40', '2012-09-27 12:16:40', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 12:16:40', '2012-09-27 12:16:40', '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-09-27 12:16:40', '2012-09-27 12:16:40', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 12:16:40', '2012-09-27 12:16:40', 'parade', 405688915)  (43.1ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.7ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "target_view_count" = 100, "start_time" = '2012-09-26 21:00:00.000000', "updated_at" = '2012-09-27 12:16:40.940067' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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" = 0, "updated_at" = '2012-09-27 12:16:40.949633' 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]]  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 12:18:34', 100, '2012-10-07 00:00:00', 't', '2012-09-27 12:18:34', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 12:18:34', '2012-10-07 00:00:00', 't', '2012-09-27 12:18:34', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 12:18:34', '2012-09-27 12:18:34', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 12:18:34', '2012-09-27 12:18:34', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 12:18:34', '2012-09-27 12:18:34', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 12:18:34', '2012-09-27 12:18:34', '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-09-27 12:18:34', '2012-09-27 12:18:34', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 12:18:34', '2012-09-27 12:18:34', 'parade', 405688915)  (41.1ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.7ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "start_time" = '2012-09-26 21:00:00.000000', "updated_at" = '2012-09-27 12:18:34.595353', "target_view_count" = 100 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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" = 0, "updated_at" = '2012-09-27 12:18:34.604913' 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]]  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 12:18:44', 100, '2012-10-07 00:00:00', 't', '2012-09-27 12:18:44', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 12:18:44', '2012-10-07 00:00:00', 't', '2012-09-27 12:18:44', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 12:18:44', '2012-09-27 12:18:44', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 12:18:44', '2012-09-27 12:18:44', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 12:18:44', '2012-09-27 12:18:44', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 12:18:44', '2012-09-27 12:18:44', '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-09-27 12:18:44', '2012-09-27 12:18:44', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 12:18:44', '2012-09-27 12:18:44', 'parade', 405688915)  (38.8ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.9ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "start_time" = '2012-09-26 21:00:00.000000', "updated_at" = '2012-09-27 12:18:44.371266', "target_view_count" = 100 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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" = 0, "updated_at" = '2012-09-27 12:18:44.380897' 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]]  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 12:18:59', 100, '2012-10-07 00:00:00', 't', '2012-09-27 12:18:59', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 12:18:59', '2012-10-07 00:00:00', 't', '2012-09-27 12:18:59', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 12:18:59', '2012-09-27 12:18:59', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 12:18:59', '2012-09-27 12:18:59', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 12:18:59', '2012-09-27 12:18:59', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 12:18:59', '2012-09-27 12:18:59', '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-09-27 12:18:59', '2012-09-27 12:18:59', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 12:18:59', '2012-09-27 12:18:59', 'parade', 405688915)  (32.3ms) commit transaction  (0.2ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "start_time" = '2012-09-26 21:00:00.000000', "updated_at" = '2012-09-27 12:18:59.323213', "target_view_count" = 100 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 12:18:59.332688', "running_view_count" = 0 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]]  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 12:19:27', 100, '2012-10-07 00:00:00', 't', '2012-09-27 12:19:27', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 12:19:27', '2012-10-07 00:00:00', 't', '2012-09-27 12:19:27', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 12:19:27', '2012-09-27 12:19:27', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 12:19:27', '2012-09-27 12:19:27', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 12:19:27', '2012-09-27 12:19:27', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 12:19:27', '2012-09-27 12:19:27', '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-09-27 12:19:27', '2012-09-27 12:19:27', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 12:19:27', '2012-09-27 12:19:27', 'parade', 405688915)  (521.7ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 12:19:28.435388', "start_time" = '2012-09-26 21:00:00.000000', "target_view_count" = 100 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 12:19:28.444791', "running_view_count" = 0 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]]  (0.5ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 12:23:56', 100, '2012-10-07 00:00:00', 't', '2012-09-27 12:23:56', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 12:23:56', '2012-10-07 00:00:00', 't', '2012-09-27 12:23:56', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 12:23:56', '2012-09-27 12:23:56', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 12:23:56', '2012-09-27 12:23:56', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 12:23:56', '2012-09-27 12:23:56', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') Fixture Delete (0.2ms) 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-09-27 12:23:56', '2012-09-27 12:23:56', '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-09-27 12:23:56', '2012-09-27 12:23:56', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 12:23:56', '2012-09-27 12:23:56', 'parade', 405688915)  (32.7ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "target_view_count" = 100, "start_time" = '2012-09-26 21:00:00.000000', "updated_at" = '2012-09-27 12:23:56.216245' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 12:23:56.225671', "running_view_count" = 0 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 12:24:06', 100, '2012-10-07 00:00:00', 't', '2012-09-27 12:24:06', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 12:24:06', '2012-10-07 00:00:00', 't', '2012-09-27 12:24:06', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 12:24:06', '2012-09-27 12:24:06', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 12:24:06', '2012-09-27 12:24:06', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 12:24:06', '2012-09-27 12:24:06', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') Fixture Delete (0.2ms) DELETE FROM "advert_selector_placements" Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Parade', '2012-09-27 12:24:06', '2012-09-27 12:24:06', 'leaderboard,video', 718799085) Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "only_once_per_session", "id") VALUES ('Video', '2012-09-27 12:24:06', '2012-09-27 12:24:06', 'parade', 't', 1019730477) Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 12:24:06', '2012-09-27 12:24:06', 'parade', 405688915)  (301.2ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.4ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "start_time" = '2012-09-26 21:00:00.000000', "updated_at" = '2012-09-27 12:24:06.426236', "target_view_count" = 100 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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" = 0, "updated_at" = '2012-09-27 12:24:06.435781' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 12:24:23', 100, '2012-10-07 00:00:00', 't', '2012-09-27 12:24:23', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 12:24:23', '2012-10-07 00:00:00', 't', '2012-09-27 12:24:23', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 12:24:23', '2012-09-27 12:24:23', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 12:24:23', '2012-09-27 12:24:23', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 12:24:23', '2012-09-27 12:24:23', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 12:24:23', '2012-09-27 12:24:23', '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-09-27 12:24:23', '2012-09-27 12:24:23', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 12:24:23', '2012-09-27 12:24:23', 'parade', 405688915)  (56.5ms) commit transaction  (0.2ms) begin transaction AdvertSelector::Banner Load (0.7ms) 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]]  (0.1ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 12:24:23.622197', "start_time" = '2012-09-26 21:00:00.000000', "target_view_count" = 100 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 12:24:23.631886', "running_view_count" = 0 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 12:24:38', 100, '2012-10-07 00:00:00', 't', '2012-09-27 12:24:38', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 12:24:38', '2012-10-07 00:00:00', 't', '2012-09-27 12:24:38', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 12:24:38', '2012-09-27 12:24:38', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 12:24:38', '2012-09-27 12:24:38', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 12:24:38', '2012-09-27 12:24:38', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 12:24:38', '2012-09-27 12:24:38', 'leaderboard,video', 718799085) Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "only_once_per_session", "id") VALUES ('Video', '2012-09-27 12:24:38', '2012-09-27 12:24:38', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 12:24:38', '2012-09-27 12:24:38', 'parade', 405688915)  (33.9ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.7ms) 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]]  (0.1ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "start_time" = '2012-09-26 21:00:00.000000', "target_view_count" = 100, "updated_at" = '2012-09-27 12:24:38.934866' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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" = 0, "updated_at" = '2012-09-27 12:24:38.944324' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 12:24:53', 100, '2012-10-07 00:00:00', 't', '2012-09-27 12:24:53', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 12:24:53', '2012-10-07 00:00:00', 't', '2012-09-27 12:24:53', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 12:24:53', '2012-09-27 12:24:53', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 12:24:53', '2012-09-27 12:24:53', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 12:24:53', '2012-09-27 12:24:53', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') Fixture Delete (0.2ms) DELETE FROM "advert_selector_placements" Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Parade', '2012-09-27 12:24:53', '2012-09-27 12:24:53', '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-09-27 12:24:53', '2012-09-27 12:24:53', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 12:24:53', '2012-09-27 12:24:53', 'parade', 405688915)  (47.3ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.7ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 12:24:53.826251', "start_time" = '2012-09-26 21:00:00.000000', "target_view_count" = 100 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 12:24:53.835914', "running_view_count" = 0 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]]  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 12:25:52', 100, '2012-10-07 00:00:00', 't', '2012-09-27 12:25:52', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 12:25:52', '2012-10-07 00:00:00', 't', '2012-09-27 12:25:52', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 12:25:52', '2012-09-27 12:25:52', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 12:25:52', '2012-09-27 12:25:52', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 12:25:52', '2012-09-27 12:25:52', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') Fixture Delete (0.2ms) 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-09-27 12:25:52', '2012-09-27 12:25:52', '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-09-27 12:25:52', '2012-09-27 12:25:52', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 12:25:52', '2012-09-27 12:25:52', 'parade', 405688915)  (48.0ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "target_view_count" = 100, "start_time" = '2012-09-26 21:00:00.000000', "updated_at" = '2012-09-27 12:25:52.877848' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 12:25:52.887418', "running_view_count" = 0 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]]  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 12:26:10', 100, '2012-10-07 00:00:00', 't', '2012-09-27 12:26:10', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 12:26:10', '2012-10-07 00:00:00', 't', '2012-09-27 12:26:10', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 12:26:10', '2012-09-27 12:26:10', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 12:26:10', '2012-09-27 12:26:10', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 12:26:10', '2012-09-27 12:26:10', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') Fixture Delete (0.2ms) 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-09-27 12:26:10', '2012-09-27 12:26:10', '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-09-27 12:26:10', '2012-09-27 12:26:10', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 12:26:10', '2012-09-27 12:26:10', 'parade', 405688915)  (37.0ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "target_view_count" = 100, "updated_at" = '2012-09-27 12:26:10.674017', "start_time" = '2012-09-26 21:00:00.000000' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 12:26:10.683485', "running_view_count" = 0 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]]  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 12:31:38', 100, '2012-10-07 00:00:00', 't', '2012-09-27 12:31:38', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 12:31:38', '2012-10-07 00:00:00', 't', '2012-09-27 12:31:38', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 12:31:38', '2012-09-27 12:31:38', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 12:31:38', '2012-09-27 12:31:38', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 12:31:38', '2012-09-27 12:31:38', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') Fixture Delete (0.1ms) DELETE FROM "advert_selector_placements" Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Parade', '2012-09-27 12:31:38', '2012-09-27 12:31:38', '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-09-27 12:31:38', '2012-09-27 12:31:38', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 12:31:38', '2012-09-27 12:31:38', 'parade', 405688915)  (82.6ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 12:31:38.876914', "start_time" = '2012-09-26 21:00:00.000000', "target_view_count" = 100 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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" = 0, "updated_at" = '2012-09-27 12:31:38.886361' 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]]  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 12:32:02', 100, '2012-10-07 00:00:00', 't', '2012-09-27 12:32:02', 50, 814558298, 1000, 'f', 0, '2012-09-27 00:00:00') Fixture Insert (0.0ms) 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-09-27 12:32:02', '2012-10-07 00:00:00', 't', '2012-09-27 12:32:02', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 12:32:02', '2012-09-27 12:32:02', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 12:32:02', '2012-09-27 12:32:02', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 12:32:02', '2012-09-27 12:32:02', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 12:32:02', '2012-09-27 12:32:02', '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-09-27 12:32:02', '2012-09-27 12:32:02', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 12:32:02', '2012-09-27 12:32:02', 'parade', 405688915)  (322.0ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_banners" SET "start_time" = '2012-09-26 21:00:00.000000', "target_view_count" = 100, "updated_at" = '2012-09-27 12:32:02.528460' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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" = 0, "updated_at" = '2012-09-27 12:32:02.538226' 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]]  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 12:32:42', 100, '2012-10-07 00:00:00', 't', '2012-09-27 12:32:42', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 12:32:42', '2012-10-07 00:00:00', 't', '2012-09-27 12:32:42', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 12:32:42', '2012-09-27 12:32:42', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 12:32:42', '2012-09-27 12:32:42', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 12:32:42', '2012-09-27 12:32:42', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 12:32:42', '2012-09-27 12:32:42', '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-09-27 12:32:42', '2012-09-27 12:32:42', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 12:32:42', '2012-09-27 12:32:42', 'parade', 405688915)  (39.9ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "target_view_count" = 100, "updated_at" = '2012-09-27 12:32:42.593699', "start_time" = '2012-09-26 21:00:00.000000' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 12:32:42.603126', "running_view_count" = 0 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]]  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 12:32:47', 100, '2012-10-07 00:00:00', 't', '2012-09-27 12:32:47', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 12:32:47', '2012-10-07 00:00:00', 't', '2012-09-27 12:32:47', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 12:32:47', '2012-09-27 12:32:47', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 12:32:47', '2012-09-27 12:32:47', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 12:32:47', '2012-09-27 12:32:47', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 12:32:47', '2012-09-27 12:32:47', '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-09-27 12:32:47', '2012-09-27 12:32:47', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 12:32:47', '2012-09-27 12:32:47', 'parade', 405688915)  (30.1ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.7ms) 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]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items"   (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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 12:32:47 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 1], ["updated_at", Thu, 27 Sep 2012 12:32:47 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 12:32:47 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 12:32:47 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 12:32:47 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 12:32:47 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position > 2)  (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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 12:32:47.722883', "start_time" = '2012-09-26 21:00:00.000000', "target_view_count" = 100 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 12:32:47.725879', "running_view_count" = 0 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]]  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 12:33:25', 100, '2012-10-07 00:00:00', 't', '2012-09-27 12:33:25', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 12:33:25', '2012-10-07 00:00:00', 't', '2012-09-27 12:33:25', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 12:33:25', '2012-09-27 12:33:25', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 12:33:25', '2012-09-27 12:33:25', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 12:33:25', '2012-09-27 12:33:25', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') Fixture Delete (0.2ms) 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-09-27 12:33:25', '2012-09-27 12:33:25', '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-09-27 12:33:25', '2012-09-27 12:33:25', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 12:33:25', '2012-09-27 12:33:25', 'parade', 405688915)  (261.3ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.5ms) 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]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items"   (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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 12:33:25 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 1], ["updated_at", Thu, 27 Sep 2012 12:33:25 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 12:33:25 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 12:33:25 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 12:33:25 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 12:33:25 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position > 2)  (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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "target_view_count" = 100, "updated_at" = '2012-09-27 12:33:25.773624', "start_time" = '2012-09-26 21:00:00.000000' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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" = 0, "updated_at" = '2012-09-27 12:33:25.776399' 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.1ms) 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", 814558298]]  (0.2ms) rollback transaction Connecting to database specified by database.yml Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 12:38:01', 100, '2012-10-07 00:00:00', 't', '2012-09-27 12:38:01', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 12:38:01', '2012-10-07 00:00:00', 't', '2012-09-27 12:38:01', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 12:38:01', '2012-09-27 12:38:01', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 12:38:01', '2012-09-27 12:38:01', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 12:38:01', '2012-09-27 12:38:01', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') Fixture Delete (0.2ms) 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-09-27 12:38:01', '2012-09-27 12:38:01', '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-09-27 12:38:01', '2012-09-27 12:38:01', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 12:38:01', '2012-09-27 12:38:01', 'parade', 405688915)  (34.5ms) 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]]  (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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 12:38:01 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 1], ["updated_at", Thu, 27 Sep 2012 12:38:01 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 12:38:01 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 12:38:01 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 12:38:01 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 12:38:01 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position > 2)  (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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "start_time" = '2012-09-26 21:00:00.000000', "updated_at" = '2012-09-27 12:38:01.259102', "target_view_count" = 100 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 12:38:01.261914', "running_view_count" = 0 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 12:39:10', 100, '2012-10-07 00:00:00', 't', '2012-09-27 12:39:10', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 12:39:10', '2012-10-07 00:00:00', 't', '2012-09-27 12:39:10', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 12:39:10', '2012-09-27 12:39:10', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 12:39:10', '2012-09-27 12:39:10', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 12:39:10', '2012-09-27 12:39:10', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 12:39:10', '2012-09-27 12:39:10', '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-09-27 12:39:10', '2012-09-27 12:39:10', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 12:39:10', '2012-09-27 12:39:10', 'parade', 405688915)  (49.2ms) commit transaction  (0.2ms) begin transaction AdvertSelector::Banner Load (0.7ms) 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]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items"   (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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 814558298) ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 12:39:11 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 1], ["updated_at", Thu, 27 Sep 2012 12:39:11 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 814558298 AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 12:39:11 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 12:39:11 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 814558298 AND position >= 0) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 12:39:11 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 12:39:11 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 814558298 AND position > 2)  (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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "start_time" = '2012-09-26 21:00:00.000000', "updated_at" = '2012-09-27 12:39:11.063151', "target_view_count" = 100 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 12:39:11.065843', "running_view_count" = 0 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 12:39:55', 100, '2012-10-07 00:00:00', 't', '2012-09-27 12:39:55', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 12:39:55', '2012-10-07 00:00:00', 't', '2012-09-27 12:39:55', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 12:39:55', '2012-09-27 12:39:55', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 12:39:55', '2012-09-27 12:39:55', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 12:39:55', '2012-09-27 12:39:55', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 12:39:55', '2012-09-27 12:39:55', '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-09-27 12:39:55', '2012-09-27 12:39:55', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 12:39:55', '2012-09-27 12:39:55', 'parade', 405688915)  (434.4ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.3ms) 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]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items"   (0.1ms) SAVEPOINT active_record_1 AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 814558298) ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.6ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 12:39:56 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 1], ["updated_at", Thu, 27 Sep 2012 12:39:56 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 814558298 AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 12:39:56 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 12:39:56 UTC +00:00]] SQL (0.2ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 814558298 AND position >= 0) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 12:39:56 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 12:39:56 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 814558298 AND position > 2)  (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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (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]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.0ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_banners" SET "start_time" = '2012-09-26 21:00:00.000000', "target_view_count" = 100, "updated_at" = '2012-09-27 12:39:56.177669' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 12:39:56.184573', "running_view_count" = 0 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 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", 814558298]] 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", 814558298]] AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]]  (0.2ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 12:40:22', 100, '2012-10-07 00:00:00', 't', '2012-09-27 12:40:22', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 12:40:22', '2012-10-07 00:00:00', 't', '2012-09-27 12:40:22', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 12:40:22', '2012-09-27 12:40:22', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 12:40:22', '2012-09-27 12:40:22', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 12:40:22', '2012-09-27 12:40:22', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 12:40:22', '2012-09-27 12:40:22', '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-09-27 12:40:22', '2012-09-27 12:40:22', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 12:40:22', '2012-09-27 12:40:22', 'parade', 405688915)  (35.2ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.7ms) 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]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items"   (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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 814558298) ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 12:40:22 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 1], ["updated_at", Thu, 27 Sep 2012 12:40:22 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 814558298 AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 12:40:22 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 12:40:22 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 814558298 AND position >= 0) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 12:40:22 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 12:40:22 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 814558298 AND position > 2)  (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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "target_view_count" = 100, "updated_at" = '2012-09-27 12:40:22.526032', "start_time" = '2012-09-26 21:00:00.000000' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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" = 0, "updated_at" = '2012-09-27 12:40:22.528912' 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 Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.3ms) 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-09-27 12:45:14', 100, '2012-10-07 00:00:00', 't', '2012-09-27 12:45:14', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 12:45:14', '2012-10-07 00:00:00', 't', '2012-09-27 12:45:14', 100, 394627963, 1000, 't', 0, '2012-09-27 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", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 12:45:14', '2012-09-27 12:45:14', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 12:45:14', '2012-09-27 12:45:14', 814558298, 929640376, '', 'Banner') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 12:45:14', '2012-09-27 12:45:14', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') Fixture Delete (0.2ms) DELETE FROM "advert_selector_placements" Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Parade', '2012-09-27 12:45:14', '2012-09-27 12:45:14', 'leaderboard,video', 718799085) Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "only_once_per_session", "id") VALUES ('Video', '2012-09-27 12:45:14', '2012-09-27 12:45:14', 'parade', 't', 1019730477) Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 12:45:14', '2012-09-27 12:45:14', 'parade', 405688915)  (27.0ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.3ms) 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]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items"   (0.1ms) SAVEPOINT active_record_1 AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.7ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 12:45:14 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 1], ["updated_at", Thu, 27 Sep 2012 12:45:14 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 10) SQL (0.2ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 12:45:14 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 12:45:14 UTC +00:00]] SQL (0.2ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.2ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 12:45:14 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 12:45:14 UTC +00:00]] AdvertSelector::HelperItem Load (0.3ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position > 2)  (0.0ms) RELEASE SAVEPOINT active_record_1 AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position DESC LIMIT 1  (0.2ms) 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]]  (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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]]  (0.0ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 12:45:14.997843', "confirmed" = 'f' WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (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]]  (0.1ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 12:45:15.004757', "target_view_count" = 100, "start_time" = '2012-09-26 21:00:00.000000' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 12:45:15.007912', "running_view_count" = 0 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 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.1ms) 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", 814558298]] 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.1ms) 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", 814558298]]  (0.2ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 12:46:17', 100, '2012-10-07 00:00:00', 't', '2012-09-27 12:46:17', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 12:46:17', '2012-10-07 00:00:00', 't', '2012-09-27 12:46:17', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 12:46:17', '2012-09-27 12:46:17', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 12:46:17', '2012-09-27 12:46:17', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 12:46:17', '2012-09-27 12:46:17', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') Fixture Delete (0.3ms) DELETE FROM "advert_selector_placements" Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Parade', '2012-09-27 12:46:17', '2012-09-27 12:46:17', 'leaderboard,video', 718799085) Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "only_once_per_session", "id") VALUES ('Video', '2012-09-27 12:46:17', '2012-09-27 12:46:17', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 12:46:17', '2012-09-27 12:46:17', 'parade', 405688915)  (38.9ms) commit transaction  (0.2ms) 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]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items"   (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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 12:46:17 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 1], ["updated_at", Thu, 27 Sep 2012 12:46:17 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 12:46:17 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 12:46:17 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 12:46:17 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 12:46:17 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position > 2)  (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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 12:46:17.861017', "confirmed" = 'f' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "start_time" = '2012-09-26 21:00:00.000000', "target_view_count" = 100, "updated_at" = '2012-09-27 12:46:17.864950' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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" = 0, "updated_at" = '2012-09-27 12:46:17.866682' 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 Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 12:46:40', 100, '2012-10-07 00:00:00', 't', '2012-09-27 12:46:40', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-09-27 12:46:40', '2012-10-07 00:00:00', 't', '2012-09-27 12:46:40', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 12:46:40', '2012-09-27 12:46:40', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 12:46:40', '2012-09-27 12:46:40', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 12:46:40', '2012-09-27 12:46:40', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 12:46:40', '2012-09-27 12:46:40', '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-09-27 12:46:40', '2012-09-27 12:46:40', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 12:46:40', '2012-09-27 12:46:40', 'parade', 405688915)  (38.7ms) commit transaction  (0.0ms) begin transaction AdvertSelector::Banner Load (0.5ms) 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]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items"   (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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 12:46:40 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 1], ["updated_at", Thu, 27 Sep 2012 12:46:40 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 12:46:40 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 12:46:40 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 12:46:40 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 12:46:40 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position > 2)  (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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "confirmed" = 'f', "updated_at" = '2012-09-27 12:46:40.579375' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 12:46:40.582192' 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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 12:46:40.585636', "target_view_count" = 100, "start_time" = '2012-09-26 21:00:00.000000' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 12:46:40.587393', "running_view_count" = 0 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 Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 12:47:33', 100, '2012-10-02 00:00:00', 't', '2012-09-27 12:47:33', 50, 814558298, 1000, 'f', 0, '2012-09-22 00:00:00') Fixture Insert (0.0ms) 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-09-27 12:47:33', '2012-10-07 00:00:00', 't', '2012-09-27 12:47:33', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 12:47:33', '2012-09-27 12:47:33', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 12:47:33', '2012-09-27 12:47:33', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 12:47:33', '2012-09-27 12:47:33', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') Fixture Delete (0.2ms) 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-09-27 12:47:33', '2012-09-27 12:47:33', '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-09-27 12:47:33', '2012-09-27 12:47:33', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 12:47:33', '2012-09-27 12:47:33', 'parade', 405688915)  (46.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]]  (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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 12:47:33 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 1], ["updated_at", Thu, 27 Sep 2012 12:47:33 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 12:47:33 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 12:47:33 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 12:47:33 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 12:47:33 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position > 2)  (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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "confirmed" = 'f', "updated_at" = '2012-09-27 12:47:33.931475' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 12:47:33.934236' 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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "start_time" = '2012-09-26 21:00:00.000000', "target_view_count" = 100, "updated_at" = '2012-09-27 12:47:33.937661', "end_time" = '2012-10-07 00:00:00.000000' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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" = 0, "updated_at" = '2012-09-27 12:47:33.939428' 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.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", 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 Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 12:48:11', 100, '2012-10-02 00:00:00', 't', '2012-09-27 12:48:11', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 12:48:11', '2012-10-07 00:00:00', 't', '2012-09-27 12:48:11', 100, 394627963, 1000, 't', 0, '2012-09-27 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", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 12:48:11', '2012-09-27 12:48:11', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 12:48:11', '2012-09-27 12:48:11', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 12:48:11', '2012-09-27 12:48:11', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') Fixture Delete (0.2ms) 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-09-27 12:48:11', '2012-09-27 12:48:11', '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-09-27 12:48:11', '2012-09-27 12:48:11', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 12:48:11', '2012-09-27 12:48:11', 'parade', 405688915)  (47.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]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items"   (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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 12:48:11 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 1], ["updated_at", Thu, 27 Sep 2012 12:48:11 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 12:48:11 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 12:48:11 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 12:48:11 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 12:48:11 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position > 2)  (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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 12:48:11.142914', "confirmed" = 'f' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 12:48:11.145324', "confirmed" = 't' 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "start_time" = '2012-09-26 21:00:00.000000', "target_view_count" = 100, "updated_at" = '2012-09-27 12:48:11.149084', "end_time" = '2012-10-07 00:00:00.000000' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 12:48:11.150971', "running_view_count" = 0 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", 394627963]]  (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-07 00:00:00 UTC", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-09-27 00:00:00 UTC"}}  (0.0ms) 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", Thu, 27 Sep 2012 12:48:11 UTC +00:00], ["end_time", Sun, 07 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", Thu, 27 Sep 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Thu, 27 Sep 2012 12:48:11 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558299 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/banners/814558299 Completed 302 Found in 6ms (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", 394627963]]  (0.0ms) SELECT COUNT(*) FROM "advert_selector_banners" Processing by AdvertSelector::BannersController#destroy 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"]]  (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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position SQL (0.3ms) 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 3ms (ActiveRecord: 0.4ms)  (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", 394627963]] 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"]] Completed 500 Internal Server Error in 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", 394627963]] Processing by AdvertSelector::BannersController#index as HTML AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 15ms (Views: 13.6ms | ActiveRecord: 0.5ms)  (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", 394627963]] 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 (71.9ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 80ms (Views: 79.1ms | ActiveRecord: 0.5ms)  (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", 394627963]] Processing by AdvertSelector::BannersController#show as HTML Parameters: {"id"=>"394627963"} Redirected to http://test.host/advert_selector/banners/394627963/edit Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (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", 394627963]] 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.0ms) rollback transaction  (0.0ms) begin transaction 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.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items"   (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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.4ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 12:48:11 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", nil], ["position", 1], ["updated_at", Thu, 27 Sep 2012 12:48:11 UTC +00:00]] SQL (0.0ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 12:48:11 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 12:48:11 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position >= 1) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 12:48:11 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", "some_limit_helper_here"], ["position", 1], ["updated_at", Thu, 27 Sep 2012 12:48:11 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-09-27 12:48:11.307883' WHERE "advert_selector_helper_items"."id" = 960656442  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1) SQL (0.0ms) 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position > 2)  (0.1ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-09-27 12:48:11.309887', "position" = 11 WHERE "advert_selector_helper_items"."id" = 960656441  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 11)  (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]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement'  (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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position DESC LIMIT 1  (0.1ms) rollback transaction  (0.0ms) begin transaction 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.0ms) rollback transaction  (0.0ms) begin transaction 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.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = 'not_found,video', "updated_at" = '2012-09-27 12:48:11.317435' WHERE "advert_selector_placements"."id" = 718799085 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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 "conflicting_placements_array" = '', "updated_at" = '2012-09-27 12:48:11.319601' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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::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.0ms) rollback transaction  (0.0ms) begin transaction 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::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::Placement Load (0.1ms) 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.5ms) INSERT INTO "advert_selector_placements" ("conflicting_placements_array", "created_at", "name", "only_once_per_session", "updated_at") VALUES (?, ?, ?, ?, ?) [["conflicting_placements_array", nil], ["created_at", Thu, 27 Sep 2012 12:48:11 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Thu, 27 Sep 2012 12:48:11 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 1019730478 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/1019730478 Completed 302 Found in 4ms (ActiveRecord: 0.6ms)  (0.0ms) SELECT COUNT(*) FROM "advert_selector_placements"   (0.1ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position SQL (0.3ms) 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 3ms (ActiveRecord: 0.4ms)  (0.0ms) SELECT COUNT(*) FROM "advert_selector_placements"   (0.1ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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.1ms) 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  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/placements/_form.html.erb (17.0ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 26ms (Views: 23.9ms | ActiveRecord: 0.7ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 9ms (Views: 7.6ms | ActiveRecord: 0.4ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]] Processing by AdvertSelector::PlacementsController#new as HTML Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/placements/_form.html.erb (3.7ms) Completed 500 Internal Server Error in 5ms  (0.1ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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 0ms (ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/405688915 Completed 302 Found in 3ms (ActiveRecord: 0.2ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction 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" ORDER BY priority desc [AdvertSelector] AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" IN (405688915) Completed 500 Internal Server Error in 6ms  (0.0ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 12:50:25', 100, '2012-10-02 00:00:00', 't', '2012-09-27 12:50:25', 50, 814558298, 1000, 'f', 0, '2012-09-22 00:00:00') Fixture Insert (0.0ms) 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-09-27 12:50:25', '2012-10-07 00:00:00', 't', '2012-09-27 12:50:25', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 12:50:25', '2012-09-27 12:50:25', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 12:50:25', '2012-09-27 12:50:25', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 12:50:25', '2012-09-27 12:50:25', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') Fixture Delete (0.2ms) 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-09-27 12:50:25', '2012-09-27 12:50:25', '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-09-27 12:50:25', '2012-09-27 12:50:25', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 12:50:25', '2012-09-27 12:50:25', 'parade', 405688915)  (48.7ms) 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]]  (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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 12:50:25 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 1], ["updated_at", Thu, 27 Sep 2012 12:50:25 UTC +00:00]] SQL (0.0ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 12:50:25 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 12:50:25 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 12:50:25 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 12:50:25 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position > 2)  (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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 12:50:25.423480', "confirmed" = 'f' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 12:50:25.425790', "confirmed" = 't' 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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "end_time" = '2012-10-07 00:00:00.000000', "start_time" = '2012-09-26 21:00:00.000000', "target_view_count" = 100, "updated_at" = '2012-09-27 12:50:25.429354' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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" = 0, "updated_at" = '2012-09-27 12:50:25.431215' 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", 394627963]]  (0.0ms) 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-07 00:00:00 UTC", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-09-27 00:00:00 UTC"}}  (0.0ms) 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", Thu, 27 Sep 2012 12:50:25 UTC +00:00], ["end_time", Sun, 07 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", Thu, 27 Sep 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Thu, 27 Sep 2012 12:50:25 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558299 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.1ms) 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", 394627963]]  (0.0ms) SELECT COUNT(*) FROM "advert_selector_banners" Processing by AdvertSelector::BannersController#destroy 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"]]  (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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position 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 3ms (ActiveRecord: 0.4ms)  (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", 394627963]] 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/banners/_form.html.erb (40.5ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 55ms (Views: 53.9ms | ActiveRecord: 0.6ms)  (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", 394627963]] Processing by AdvertSelector::BannersController#index as HTML AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 9ms (Views: 7.8ms | ActiveRecord: 0.5ms)  (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", 394627963]] 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 (19.0ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 26ms (Views: 25.0ms | ActiveRecord: 0.4ms)  (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", 394627963]] Processing by AdvertSelector::BannersController#show as HTML Parameters: {"id"=>"394627963"} Redirected to http://test.host/advert_selector/banners/394627963/edit Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (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", 394627963]] 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.0ms) rollback transaction  (0.0ms) begin transaction 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.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items"   (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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.4ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 12:50:25 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", nil], ["position", 1], ["updated_at", Thu, 27 Sep 2012 12:50:25 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 12:50:25 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 12:50:25 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position >= 1) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 12:50:25 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", "some_limit_helper_here"], ["position", 1], ["updated_at", Thu, 27 Sep 2012 12:50:25 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "updated_at" = '2012-09-27 12:50:25.573802', "content_for" = 'f' WHERE "advert_selector_helper_items"."id" = 960656442  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1) SQL (0.0ms) 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position > 2)  (0.1ms) UPDATE "advert_selector_helper_items" SET "updated_at" = '2012-09-27 12:50:25.575658', "content_for" = 'f', "position" = 11 WHERE "advert_selector_helper_items"."id" = 960656441  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 11)  (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]]  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement'  (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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position DESC LIMIT 1  (0.1ms) rollback transaction  (0.0ms) begin transaction 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.0ms) rollback transaction  (0.0ms) begin transaction 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) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = 'not_found,video', "updated_at" = '2012-09-27 12:50:25.661200' WHERE "advert_selector_placements"."id" = 718799085 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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 "conflicting_placements_array" = '', "updated_at" = '2012-09-27 12:50:25.663418' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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::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.0ms) rollback transaction  (0.0ms) begin transaction 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::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::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", Thu, 27 Sep 2012 12:50:25 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Thu, 27 Sep 2012 12:50:25 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 1019730478 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/1019730478 Completed 302 Found in 4ms (ActiveRecord: 0.6ms)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_placements"   (0.1ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position SQL (0.3ms) 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 3ms (ActiveRecord: 0.5ms)  (0.0ms) SELECT COUNT(*) FROM "advert_selector_placements"   (0.1ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/placements/_form.html.erb (15.2ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 23ms (Views: 22.0ms | ActiveRecord: 0.6ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 9ms (Views: 7.5ms | ActiveRecord: 0.4ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]] Processing by AdvertSelector::PlacementsController#new as HTML Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/placements/_form.html.erb (4.8ms) Completed 500 Internal Server Error in 6ms  (0.1ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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 0ms (ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/405688915 Completed 302 Found in 2ms (ActiveRecord: 0.2ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction 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" ORDER BY priority desc [AdvertSelector] AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" IN (405688915) Completed 500 Internal Server Error in 6ms  (0.0ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 12:52:09', 100, '2012-10-02 00:00:00', 't', '2012-09-27 12:52:09', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 12:52:09', '2012-10-07 00:00:00', 't', '2012-09-27 12:52:09', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 12:52:09', '2012-09-27 12:52:09', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 12:52:09', '2012-09-27 12:52:09', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 12:52:09', '2012-09-27 12:52:09', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') Fixture Delete (0.2ms) 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-09-27 12:52:09', '2012-09-27 12:52:09', '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-09-27 12:52:09', '2012-09-27 12:52:09', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 12:52:09', '2012-09-27 12:52:09', 'parade', 405688915)  (38.8ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.7ms) 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]]  (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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 12:52:10 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 1], ["updated_at", Thu, 27 Sep 2012 12:52:10 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 12:52:10 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 12:52:10 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 12:52:10 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 12:52:10 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position > 2)  (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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "confirmed" = 'f', "updated_at" = '2012-09-27 12:52:10.039078' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 12:52:10.041288' 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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "target_view_count" = 100, "end_time" = '2012-10-07 00:00:00.000000', "start_time" = '2012-09-26 21:00:00.000000', "updated_at" = '2012-09-27 12:52:10.044857' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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" = 0, "updated_at" = '2012-09-27 12:52:10.046707' 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", 394627963]]  (0.0ms) 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-07 00:00:00 UTC", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-09-27 00:00:00 UTC"}}  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) 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", Thu, 27 Sep 2012 12:52:10 UTC +00:00], ["end_time", Sun, 07 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", Thu, 27 Sep 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Thu, 27 Sep 2012 12:52:10 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558299 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.1ms) 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", 394627963]]  (0.0ms) SELECT COUNT(*) FROM "advert_selector_banners" Processing by AdvertSelector::BannersController#destroy 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"]]  (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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position 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 3ms (ActiveRecord: 0.5ms)  (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", 394627963]] 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/banners/_form.html.erb (40.4ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 55ms (Views: 53.7ms | ActiveRecord: 0.6ms)  (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", 394627963]] Processing by AdvertSelector::BannersController#index as HTML AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 9ms (Views: 7.6ms | ActiveRecord: 0.4ms)  (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", 394627963]] 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.6ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 28ms (Views: 26.3ms | ActiveRecord: 0.4ms)  (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", 394627963]] Processing by AdvertSelector::BannersController#show as HTML Parameters: {"id"=>"394627963"} Redirected to http://test.host/advert_selector/banners/394627963/edit Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (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", 394627963]] 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.0ms) rollback transaction  (0.0ms) begin transaction 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.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items"   (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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.4ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 12:52:10 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", nil], ["position", 1], ["updated_at", Thu, 27 Sep 2012 12:52:10 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 12:52:10 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 12:52:10 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position >= 1) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 12:52:10 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", "some_limit_helper_here"], ["position", 1], ["updated_at", Thu, 27 Sep 2012 12:52:10 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "updated_at" = '2012-09-27 12:52:10.197754', "content_for" = 'f' WHERE "advert_selector_helper_items"."id" = 960656442  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1) SQL (0.0ms) 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position > 2)  (0.0ms) UPDATE "advert_selector_helper_items" SET "position" = 11, "updated_at" = '2012-09-27 12:52:10.199544', "content_for" = 'f' WHERE "advert_selector_helper_items"."id" = 960656441  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 11)  (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]]  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement'  (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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position DESC LIMIT 1  (0.1ms) rollback transaction  (0.0ms) begin transaction 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.0ms) rollback transaction  (0.0ms) begin transaction 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.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = 'not_found,video', "updated_at" = '2012-09-27 12:52:10.286566' WHERE "advert_selector_placements"."id" = 718799085 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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 "conflicting_placements_array" = '', "updated_at" = '2012-09-27 12:52:10.288750' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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.1ms) 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.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::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.0ms) rollback transaction  (0.0ms) begin transaction 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.0ms) rollback transaction  (0.0ms) begin transaction 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.0ms) rollback transaction  (0.1ms) begin transaction AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.1ms) 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.5ms) INSERT INTO "advert_selector_placements" ("conflicting_placements_array", "created_at", "name", "only_once_per_session", "updated_at") VALUES (?, ?, ?, ?, ?) [["conflicting_placements_array", nil], ["created_at", Thu, 27 Sep 2012 12:52:10 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Thu, 27 Sep 2012 12:52:10 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 1019730478 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/1019730478 Completed 302 Found in 4ms (ActiveRecord: 0.6ms)  (0.0ms) SELECT COUNT(*) FROM "advert_selector_placements"   (0.1ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position SQL (0.3ms) 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.4ms)  (0.0ms) SELECT COUNT(*) FROM "advert_selector_placements"   (0.1ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/placements/_form.html.erb (14.8ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 23ms (Views: 21.6ms | ActiveRecord: 0.6ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 9ms (Views: 7.8ms | ActiveRecord: 0.4ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]] Processing by AdvertSelector::PlacementsController#new as HTML Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/placements/_form.html.erb (4.7ms) Completed 500 Internal Server Error in 6ms  (0.1ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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 0ms (ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/405688915 Completed 302 Found in 3ms (ActiveRecord: 0.2ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction 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" ORDER BY priority desc [AdvertSelector] AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" IN (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position [AdvertSelector] Showing banner Pepsi in placement Leaderboard Completed 200 OK in 8ms (Views: 7.5ms | ActiveRecord: 0.3ms)  (0.0ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 12:52:50', 100, '2012-10-02 00:00:00', 't', '2012-09-27 12:52:50', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 12:52:50', '2012-10-07 00:00:00', 't', '2012-09-27 12:52:50', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.2ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 12:52:50', '2012-09-27 12:52:50', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 12:52:50', '2012-09-27 12:52:50', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 12:52:50', '2012-09-27 12:52:50', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') Fixture Delete (0.2ms) 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-09-27 12:52:50', '2012-09-27 12:52:50', '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-09-27 12:52:50', '2012-09-27 12:52:50', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 12:52:50', '2012-09-27 12:52:50', 'parade', 405688915)  (298.1ms) 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]]  (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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 12:52:50 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 1], ["updated_at", Thu, 27 Sep 2012 12:52:50 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 12:52:50 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 12:52:50 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 12:52:50 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 12:52:50 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position > 2)  (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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 12:52:50.588937', "confirmed" = 'f' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 12:52:50.591236', "confirmed" = 't' 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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 12:52:50.595111', "start_time" = '2012-09-26 21:00:00.000000', "end_time" = '2012-10-07 00:00:00.000000', "target_view_count" = 100 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 12:52:50.596964', "running_view_count" = 0 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 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", 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", 394627963]]  (0.0ms) 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-07 00:00:00 UTC", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-09-27 00:00:00 UTC"}}  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) 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", Thu, 27 Sep 2012 12:52:50 UTC +00:00], ["end_time", Sun, 07 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", Thu, 27 Sep 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Thu, 27 Sep 2012 12:52:50 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558299 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.1ms) 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", 394627963]]  (0.0ms) SELECT COUNT(*) FROM "advert_selector_banners" Processing by AdvertSelector::BannersController#destroy 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"]]  (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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position SQL (0.3ms) 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 3ms (ActiveRecord: 0.5ms)  (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", 394627963]] 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/banners/_form.html.erb (40.0ms) 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" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 55ms (Views: 53.3ms | ActiveRecord: 0.7ms)  (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", 394627963]] Processing by AdvertSelector::BannersController#index as HTML AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 9ms (Views: 7.9ms | ActiveRecord: 0.5ms)  (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", 394627963]] 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.3ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 25ms (Views: 24.1ms | ActiveRecord: 0.4ms)  (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", 394627963]] Processing by AdvertSelector::BannersController#show as HTML Parameters: {"id"=>"394627963"} Redirected to http://test.host/advert_selector/banners/394627963/edit Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (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", 394627963]] 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.0ms) rollback transaction  (0.0ms) begin transaction 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.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items"   (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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.4ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 12:52:50 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", nil], ["position", 1], ["updated_at", Thu, 27 Sep 2012 12:52:50 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 12:52:50 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 12:52:50 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position >= 1) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 12:52:50 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", "some_limit_helper_here"], ["position", 1], ["updated_at", Thu, 27 Sep 2012 12:52:50 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-09-27 12:52:50.740643' WHERE "advert_selector_helper_items"."id" = 960656442  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1) SQL (0.0ms) 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position > 2)  (0.0ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "position" = 11, "updated_at" = '2012-09-27 12:52:50.742622' WHERE "advert_selector_helper_items"."id" = 960656441  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 11)  (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]]  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement'  (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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position DESC LIMIT 1  (0.1ms) rollback transaction  (0.0ms) begin transaction 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.6ms) rollback transaction  (0.0ms) begin transaction 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.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = 'not_found,video', "updated_at" = '2012-09-27 12:52:50.833716' WHERE "advert_selector_placements"."id" = 718799085 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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 "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]]  (0.1ms) rollback transaction  (0.0ms) begin transaction 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.0ms) rollback transaction  (0.0ms) begin transaction 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::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::Placement Load (0.1ms) 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.5ms) INSERT INTO "advert_selector_placements" ("conflicting_placements_array", "created_at", "name", "only_once_per_session", "updated_at") VALUES (?, ?, ?, ?, ?) [["conflicting_placements_array", nil], ["created_at", Thu, 27 Sep 2012 12:52:50 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Thu, 27 Sep 2012 12:52:50 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 1019730478 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/1019730478 Completed 302 Found in 4ms (ActiveRecord: 0.6ms)  (0.0ms) SELECT COUNT(*) FROM "advert_selector_placements"   (0.1ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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 3ms (ActiveRecord: 0.4ms)  (0.0ms) SELECT COUNT(*) FROM "advert_selector_placements"   (0.1ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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) = '') LIMIT 1 AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE (LOWER(name) = 'parade') LIMIT 1  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/placements/_form.html.erb (14.5ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 22ms (Views: 21.2ms | ActiveRecord: 0.6ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 9ms (Views: 7.9ms | ActiveRecord: 0.4ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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 (12.4ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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.0ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = 405688915 LIMIT 1 Completed 200 OK in 19ms (Views: 18.1ms | ActiveRecord: 0.4ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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::Placement Load (0.1ms) 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 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/405688915 Completed 302 Found in 2ms (ActiveRecord: 0.2ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements [AdvertSelector] AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc [AdvertSelector] AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" IN (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position [AdvertSelector] Showing banner Pepsi in placement Leaderboard Completed 200 OK in 8ms (Views: 7.2ms | ActiveRecord: 0.3ms)  (0.0ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 12:53:05', 100, '2012-10-02 00:00:00', 't', '2012-09-27 12:53:05', 50, 814558298, 1000, 'f', 0, '2012-09-22 00:00:00') Fixture Insert (0.0ms) 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-09-27 12:53:05', '2012-10-07 00:00:00', 't', '2012-09-27 12:53:05', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 12:53:05', '2012-09-27 12:53:05', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 12:53:05', '2012-09-27 12:53:05', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 12:53:05', '2012-09-27 12:53:05', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 12:53:05', '2012-09-27 12:53:05', '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-09-27 12:53:05', '2012-09-27 12:53:05', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 12:53:05', '2012-09-27 12:53:05', 'parade', 405688915)  (151.8ms) 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]]  (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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 12:53:05 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 1], ["updated_at", Thu, 27 Sep 2012 12:53:05 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 12:53:05 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 12:53:05 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 12:53:05 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 12:53:05 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position > 2)  (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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 12:53:05.612538', "confirmed" = 'f' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 12:53:05.614831', "confirmed" = 't' 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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "start_time" = '2012-09-26 21:00:00.000000', "updated_at" = '2012-09-27 12:53:05.618412', "target_view_count" = 100, "end_time" = '2012-10-07 00:00:00.000000' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 12:53:05.620224', "running_view_count" = 0 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", 394627963]]  (0.0ms) 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-07 00:00:00 UTC", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-09-27 00:00:00 UTC"}}  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) 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", Thu, 27 Sep 2012 12:53:05 UTC +00:00], ["end_time", Sun, 07 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", Thu, 27 Sep 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Thu, 27 Sep 2012 12:53:05 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558299 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.1ms) 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", 394627963]]  (0.0ms) SELECT COUNT(*) FROM "advert_selector_banners" Processing by AdvertSelector::BannersController#destroy 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"]]  (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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position 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 3ms (ActiveRecord: 0.4ms)  (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", 394627963]] 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/banners/_form.html.erb (39.8ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 55ms (Views: 53.6ms | ActiveRecord: 0.6ms)  (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", 394627963]] Processing by AdvertSelector::BannersController#index as HTML AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 9ms (Views: 8.2ms | ActiveRecord: 0.5ms)  (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", 394627963]] 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.5ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 25ms (Views: 24.5ms | ActiveRecord: 0.4ms)  (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", 394627963]] Processing by AdvertSelector::BannersController#show as HTML Parameters: {"id"=>"394627963"} Redirected to http://test.host/advert_selector/banners/394627963/edit Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (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", 394627963]] 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.0ms) rollback transaction  (0.0ms) begin transaction 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.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items"   (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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.4ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 12:53:05 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", nil], ["position", 1], ["updated_at", Thu, 27 Sep 2012 12:53:05 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 12:53:05 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 12:53:05 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position >= 1) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 12:53:05 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", "some_limit_helper_here"], ["position", 1], ["updated_at", Thu, 27 Sep 2012 12:53:05 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-09-27 12:53:05.762218' WHERE "advert_selector_helper_items"."id" = 960656442  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1) SQL (0.0ms) 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position > 2)  (0.1ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "position" = 11, "updated_at" = '2012-09-27 12:53:05.764040' WHERE "advert_selector_helper_items"."id" = 960656441  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 11)  (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]]  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement'  (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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position DESC LIMIT 1  (0.1ms) rollback transaction  (0.0ms) begin transaction 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.6ms) rollback transaction  (0.0ms) begin transaction 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.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = 'not_found,video', "updated_at" = '2012-09-27 12:53:05.850182' WHERE "advert_selector_placements"."id" = 718799085 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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 "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]]  (0.1ms) rollback transaction  (0.0ms) begin transaction 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.0ms) rollback transaction  (0.0ms) begin transaction 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::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::Placement Load (0.1ms) 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", Thu, 27 Sep 2012 12:53:05 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Thu, 27 Sep 2012 12:53:05 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 1019730478 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/1019730478 Completed 302 Found in 4ms (ActiveRecord: 0.6ms)  (0.0ms) SELECT COUNT(*) FROM "advert_selector_placements"   (0.1ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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 3ms (ActiveRecord: 0.4ms)  (0.0ms) SELECT COUNT(*) FROM "advert_selector_placements"   (0.1ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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) = '') LIMIT 1 AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE (LOWER(name) = 'parade') LIMIT 1  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/placements/_form.html.erb (14.5ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 23ms (Views: 21.4ms | ActiveRecord: 0.6ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 9ms (Views: 7.8ms | ActiveRecord: 0.4ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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 (12.4ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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.0ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = 405688915 LIMIT 1 Completed 200 OK in 19ms (Views: 18.2ms | ActiveRecord: 0.4ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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.0ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/405688915 Completed 302 Found in 2ms (ActiveRecord: 0.2ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction 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" ORDER BY priority desc [AdvertSelector] AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" IN (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position [AdvertSelector] Showing banner Pepsi in placement Leaderboard Completed 200 OK in 8ms (Views: 7.3ms | ActiveRecord: 0.3ms)  (0.0ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 12:53:11', 100, '2012-10-02 00:00:00', 't', '2012-09-27 12:53:11', 50, 814558298, 1000, 'f', 0, '2012-09-22 00:00:00') Fixture Insert (0.0ms) 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-09-27 12:53:11', '2012-10-07 00:00:00', 't', '2012-09-27 12:53:11', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 12:53:11', '2012-09-27 12:53:11', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 12:53:11', '2012-09-27 12:53:11', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 12:53:11', '2012-09-27 12:53:11', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 12:53:11', '2012-09-27 12:53:11', '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-09-27 12:53:11', '2012-09-27 12:53:11', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 12:53:11', '2012-09-27 12:53:11', 'parade', 405688915)  (39.1ms) commit transaction  (0.2ms) 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]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items"   (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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 12:53:11 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 1], ["updated_at", Thu, 27 Sep 2012 12:53:11 UTC +00:00]] SQL (0.0ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 12:53:11 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 12:53:11 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 12:53:11 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 12:53:11 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position > 2)  (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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "confirmed" = 'f', "updated_at" = '2012-09-27 12:53:11.996031' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 12:53:11.998275' 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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "start_time" = '2012-09-26 21:00:00.000000', "end_time" = '2012-10-07 00:00:00.000000', "target_view_count" = 100, "updated_at" = '2012-09-27 12:53:12.001844' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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" = 0, "updated_at" = '2012-09-27 12:53:12.003649' 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.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", 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", 394627963]]  (0.0ms) 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-07 00:00:00 UTC", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-09-27 00:00:00 UTC"}}  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) 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", Thu, 27 Sep 2012 12:53:12 UTC +00:00], ["end_time", Sun, 07 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", Thu, 27 Sep 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Thu, 27 Sep 2012 12:53:12 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558299 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.1ms) 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", 394627963]]  (0.0ms) SELECT COUNT(*) FROM "advert_selector_banners" Processing by AdvertSelector::BannersController#destroy 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"]]  (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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position 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 3ms (ActiveRecord: 0.4ms)  (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", 394627963]] 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/banners/_form.html.erb (40.7ms) 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" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 57ms (Views: 56.1ms | ActiveRecord: 0.7ms)  (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", 394627963]] Processing by AdvertSelector::BannersController#index as HTML AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 9ms (Views: 8.1ms | ActiveRecord: 0.4ms)  (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", 394627963]] 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.7ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 25ms (Views: 24.7ms | ActiveRecord: 0.4ms)  (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", 394627963]] Processing by AdvertSelector::BannersController#show as HTML Parameters: {"id"=>"394627963"} Redirected to http://test.host/advert_selector/banners/394627963/edit Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (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", 394627963]] 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.0ms) rollback transaction  (0.0ms) begin transaction 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.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items"   (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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.4ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 12:53:12 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", nil], ["position", 1], ["updated_at", Thu, 27 Sep 2012 12:53:12 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 12:53:12 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 12:53:12 UTC +00:00]] SQL (0.2ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position >= 1) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 12:53:12 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", "some_limit_helper_here"], ["position", 1], ["updated_at", Thu, 27 Sep 2012 12:53:12 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "updated_at" = '2012-09-27 12:53:12.149609', "content_for" = 'f' WHERE "advert_selector_helper_items"."id" = 960656442  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1) SQL (0.0ms) 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position > 2)  (0.0ms) UPDATE "advert_selector_helper_items" SET "updated_at" = '2012-09-27 12:53:12.151460', "position" = 11, "content_for" = 'f' WHERE "advert_selector_helper_items"."id" = 960656441  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 11)  (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]]  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement'  (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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position DESC LIMIT 1  (0.1ms) rollback transaction  (0.0ms) begin transaction 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.0ms) rollback transaction  (0.0ms) begin transaction 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.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-09-27 12:53:12.237536', "conflicting_placements_array" = 'not_found,video' WHERE "advert_selector_placements"."id" = 718799085 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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-09-27 12:53:12.239727', "conflicting_placements_array" = '' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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::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.0ms) rollback transaction  (0.0ms) begin transaction 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::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::Placement Load (0.1ms) 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.5ms) INSERT INTO "advert_selector_placements" ("conflicting_placements_array", "created_at", "name", "only_once_per_session", "updated_at") VALUES (?, ?, ?, ?, ?) [["conflicting_placements_array", nil], ["created_at", Thu, 27 Sep 2012 12:53:12 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Thu, 27 Sep 2012 12:53:12 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 1019730478 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/1019730478 Completed 302 Found in 4ms (ActiveRecord: 0.6ms)  (0.0ms) SELECT COUNT(*) FROM "advert_selector_placements"   (0.1ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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.4ms)  (0.0ms) SELECT COUNT(*) FROM "advert_selector_placements"   (0.1ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/placements/_form.html.erb (15.4ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 23ms (Views: 22.1ms | ActiveRecord: 0.6ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 8ms (Views: 7.5ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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 (12.5ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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.0ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = 405688915 LIMIT 1 Completed 200 OK in 19ms (Views: 18.3ms | ActiveRecord: 0.4ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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 0ms (ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/405688915 Completed 302 Found in 2ms (ActiveRecord: 0.2ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction 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" ORDER BY priority desc [AdvertSelector] AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" IN (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position [AdvertSelector] Showing banner Pepsi in placement Leaderboard Completed 200 OK in 8ms (Views: 7.3ms | ActiveRecord: 0.3ms)  (0.0ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 12:56:44', 100, '2012-10-02 00:00:00', 't', '2012-09-27 12:56:44', 50, 814558298, 1000, 'f', 0, '2012-09-22 00:00:00') Fixture Insert (0.0ms) 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-09-27 12:56:44', '2012-10-07 00:00:00', 't', '2012-09-27 12:56:44', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 12:56:44', '2012-09-27 12:56:44', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 12:56:44', '2012-09-27 12:56:44', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 12:56:44', '2012-09-27 12:56:44', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 12:56:44', '2012-09-27 12:56:44', '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-09-27 12:56:44', '2012-09-27 12:56:44', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 12:56:44', '2012-09-27 12:56:44', 'parade', 405688915)  (34.1ms) commit 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.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]]  (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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.6ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 12:56:44 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 1], ["updated_at", Thu, 27 Sep 2012 12:56:44 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 12:56:44 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 12:56:44 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 12:56:44 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 12:56:44 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position > 2)  (0.0ms) RELEASE SAVEPOINT active_record_1 AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]]  (0.2ms) SELECT COUNT(*) FROM "advert_selector_helper_items" AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position LIMIT 1 AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position DESC LIMIT 1  (0.2ms) 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]]  (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]]  (0.0ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_banners" SET "confirmed" = 'f', "updated_at" = '2012-09-27 12:56:44.452233' WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.4ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "confirmed" = 't', "updated_at" = '2012-09-27 12:56:44.457752' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 AdvertSelector::Banner Load (0.1ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 12:56:44.462865', "start_time" = '2012-09-26 21:00:00.000000', "target_view_count" = 100, "end_time" = '2012-10-07 00:00:00.000000' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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" = 0, "updated_at" = '2012-09-27 12:56:44.464961' 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", 394627963]]  (0.0ms) 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-07 00:00:00 UTC", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-09-27 00:00:00 UTC"}}  (0.0ms) 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", Thu, 27 Sep 2012 12:56:44 UTC +00:00], ["end_time", Sun, 07 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", Thu, 27 Sep 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Thu, 27 Sep 2012 12:56:44 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558299 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.8ms)  (0.1ms) 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", 394627963]]  (0.0ms) SELECT COUNT(*) FROM "advert_selector_banners" Processing by AdvertSelector::BannersController#destroy 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"]]  (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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position SQL (0.3ms) 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 3ms (ActiveRecord: 0.4ms)  (0.1ms) 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", 394627963]] 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/banners/_form.html.erb (54.5ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 69ms (Views: 68.0ms | ActiveRecord: 0.7ms)  (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", 394627963]] Processing by AdvertSelector::BannersController#index as HTML AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 9ms (Views: 7.7ms | ActiveRecord: 0.4ms)  (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", 394627963]] 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.8ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 26ms (Views: 25.2ms | ActiveRecord: 0.5ms)  (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", 394627963]] Processing by AdvertSelector::BannersController#show as HTML Parameters: {"id"=>"394627963"} Redirected to http://test.host/advert_selector/banners/394627963/edit Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (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", 394627963]] 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.0ms) rollback transaction  (0.0ms) begin transaction 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.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items"   (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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.4ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 12:56:44 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", nil], ["position", 1], ["updated_at", Thu, 27 Sep 2012 12:56:44 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 12:56:44 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 12:56:44 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position >= 1) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 12:56:44 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", "some_limit_helper_here"], ["position", 1], ["updated_at", Thu, 27 Sep 2012 12:56:44 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-09-27 12:56:44.623052' WHERE "advert_selector_helper_items"."id" = 960656442  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1) SQL (0.0ms) 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position > 2)  (0.0ms) UPDATE "advert_selector_helper_items" SET "position" = 11, "content_for" = 'f', "updated_at" = '2012-09-27 12:56:44.624887' WHERE "advert_selector_helper_items"."id" = 960656441  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 11)  (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]]  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement'  (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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position DESC LIMIT 1  (0.1ms) rollback transaction  (0.0ms) begin transaction 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.0ms) rollback transaction  (0.0ms) begin transaction 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.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = 'not_found,video', "updated_at" = '2012-09-27 12:56:44.711647' WHERE "advert_selector_placements"."id" = 718799085 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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 "conflicting_placements_array" = '', "updated_at" = '2012-09-27 12:56:44.713914' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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::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.0ms) rollback transaction  (0.0ms) begin transaction 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::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::Placement Load (0.1ms) 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", Thu, 27 Sep 2012 12:56:44 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Thu, 27 Sep 2012 12:56:44 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 1019730478 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/1019730478 Completed 302 Found in 4ms (ActiveRecord: 0.6ms)  (0.0ms) SELECT COUNT(*) FROM "advert_selector_placements"   (0.1ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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 3ms (ActiveRecord: 0.4ms)  (0.0ms) SELECT COUNT(*) FROM "advert_selector_placements"   (0.1ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/placements/_form.html.erb (15.1ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 24ms (Views: 22.3ms | ActiveRecord: 0.7ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 11ms (Views: 9.8ms | ActiveRecord: 0.5ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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 (13.3ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 20ms (Views: 19.4ms | ActiveRecord: 0.5ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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 0ms (ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", "405688915"]]  (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"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/405688915 Completed 302 Found in 3ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction  (0.0ms) rollback transaction  (0.0ms) begin transaction 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" ORDER BY priority desc [AdvertSelector] AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" IN (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position [AdvertSelector] Showing banner Pepsi in placement Leaderboard Completed 200 OK in 9ms (Views: 8.4ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 17:47:47', 100, '2012-10-02 00:00:00', 't', '2012-09-27 17:47:47', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 17:47:47', '2012-10-07 00:00:00', 't', '2012-09-27 17:47:47', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 17:47:47', '2012-09-27 17:47:47', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 17:47:47', '2012-09-27 17:47:47', 814558298, 929640376, '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 17:47:47', '2012-09-27 17:47:47', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') Fixture Delete (0.2ms) 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-09-27 17:47:47', '2012-09-27 17:47:47', '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-09-27 17:47:47', '2012-09-27 17:47:47', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 17:47:47', '2012-09-27 17:47:47', 'parade', 405688915)  (267.8ms) commit transaction  (0.1ms) begin transaction Started GET "/" for 127.0.0.1 at Thu Sep 27 20:47:47 +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" ORDER BY priority desc [AdvertSelector] AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" IN (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position [AdvertSelector] Showing banner Pepsi in placement Leaderboard Rendered examples/index.html.erb within layouts/application (27.2ms) Completed 200 OK in 35ms (Views: 34.1ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 17:48:59', 100, '2012-10-02 00:00:00', 't', '2012-09-27 17:48:59', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 17:48:59', '2012-10-07 00:00:00', 't', '2012-09-27 17:48:59', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 17:48:59', '2012-09-27 17:48:59', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 17:48:59', '2012-09-27 17:48:59', 814558298, 929640376, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 17:48:59', '2012-09-27 17:48:59', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 17:48:59', '2012-09-27 17:48:59', '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-09-27 17:48:59', '2012-09-27 17:48:59', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 17:48:59', '2012-09-27 17:48:59', 'parade', 405688915)  (45.5ms) commit transaction  (0.1ms) begin transaction Started GET "/" for 127.0.0.1 at Thu Sep 27 20:48:59 +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" ORDER BY priority desc [AdvertSelector] AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" IN (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position [AdvertSelector] Showing banner Pepsi in placement Leaderboard Rendered examples/index.html.erb within layouts/application (27.3ms) Completed 200 OK in 33ms (Views: 32.0ms | ActiveRecord: 0.5ms) AdvertSelector::Banner Load (0.5ms) 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::HelperItem Load (0.4ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position DESC LIMIT 1 AdvertSelector::HelperItem Load (0.3ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.2ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 17:50:17', 100, '2012-10-02 00:00:00', 't', '2012-09-27 17:50:17', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 17:50:17', '2012-10-07 00:00:00', 't', '2012-09-27 17:50:17', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 17:50:17', '2012-09-27 17:50:17', 394627963, 960656439, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 17:50:17', '2012-09-27 17:50:17', 814558298, 929640376, 't', '', 'Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 17:50:17', '2012-09-27 17:50:17', 394627963, 435138789, 'f', 'pepsi=true', 'Banner') 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-09-27 17:50:17', '2012-09-27 17:50:17', '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-09-27 17:50:17', '2012-09-27 17:50:17', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 17:50:17', '2012-09-27 17:50:17', 'parade', 405688915)  (40.8ms) 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]] Started GET "/" for 127.0.0.1 at Thu Sep 27 20:50:17 +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" ORDER BY priority desc [AdvertSelector] AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" IN (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position [AdvertSelector] Showing banner Pepsi in placement Leaderboard Rendered examples/index.html.erb within layouts/application (18.6ms) Completed 200 OK in 24ms (Views: 23.0ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.3ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" LIMIT 1 AdvertSelector::Banner Load (0.4ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" LIMIT 1 AdvertSelector::Banner Load (0.4ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" LIMIT 1 AdvertSelector::HelperItem Load (0.3ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position AdvertSelector::Banner Load (0.4ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY "advert_selector_banners"."id" DESC LIMIT 1 AdvertSelector::HelperItem Load (0.3ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position AdvertSelector::HelperItem Load (0.3ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" LIMIT 1  (0.2ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 17:51:16', 100, '2012-10-02 00:00:00', 't', '2012-09-27 17:51:16', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 17:51:16', '2012-10-07 00:00:00', 't', '2012-09-27 17:51:16', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 17:51:16', '2012-09-27 17:51:16', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 17:51:16', '2012-09-27 17:51:16', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 17:51:16', '2012-09-27 17:51:16', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') Fixture Delete (0.2ms) 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-09-27 17:51:16', '2012-09-27 17:51:16', '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-09-27 17:51:16', '2012-09-27 17:51:16', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 17:51:16', '2012-09-27 17:51:16', 'parade', 405688915)  (41.2ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.8ms) 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]] Started GET "/" for 127.0.0.1 at Thu Sep 27 20:51:16 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements [AdvertSelector] AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc [AdvertSelector] AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" IN (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (26.4ms) Completed 200 OK in 31ms (Views: 30.5ms | ActiveRecord: 0.5ms) AdvertSelector::HelperItem Load (0.3ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" LIMIT 1 AdvertSelector::Banner Load (0.3ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = 394627963 LIMIT 1 AdvertSelector::HelperItem Load (0.4ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.2ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 17:52:26', 100, '2012-10-02 00:00:00', 't', '2012-09-27 17:52:26', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 17:52:26', '2012-10-07 00:00:00', 't', '2012-09-27 17:52:26', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 17:52:26', '2012-09-27 17:52:26', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 17:52:26', '2012-09-27 17:52:26', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 17:52:26', '2012-09-27 17:52:26', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-27 17:52:26', '2012-09-27 17:52:26', '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-09-27 17:52:26', '2012-09-27 17:52:26', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 17:52:26', '2012-09-27 17:52:26', 'parade', 405688915)  (44.9ms) commit transaction  (0.0ms) 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]] Started GET "/" for 127.0.0.1 at Thu Sep 27 20:52:26 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements [AdvertSelector] AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc [AdvertSelector] AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" IN (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (25.5ms) Completed 200 OK in 30ms (Views: 29.5ms | ActiveRecord: 0.5ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position DESC LIMIT 1  (0.0ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 17:52:47', 100, '2012-10-02 00:00:00', 't', '2012-09-27 17:52:47', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 17:52:47', '2012-10-07 00:00:00', 't', '2012-09-27 17:52:47', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 17:52:47', '2012-09-27 17:52:47', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 17:52:47', '2012-09-27 17:52:47', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 17:52:47', '2012-09-27 17:52:47', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') Fixture Delete (0.2ms) 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-09-27 17:52:47', '2012-09-27 17:52:47', '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-09-27 17:52:47', '2012-09-27 17:52:47', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 17:52:47', '2012-09-27 17:52:47', 'parade', 405688915)  (32.8ms) commit transaction  (0.0ms) 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]] Started GET "/" for 127.0.0.1 at Thu Sep 27 20:52:47 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements [AdvertSelector] AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc [AdvertSelector] AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" IN (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (25.2ms) Completed 200 OK in 30ms (Views: 29.2ms | ActiveRecord: 0.5ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position DESC LIMIT 1  (0.0ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 17:52:54', 100, '2012-10-02 00:00:00', 't', '2012-09-27 17:52:54', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 17:52:54', '2012-10-07 00:00:00', 't', '2012-09-27 17:52:54', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 17:52:54', '2012-09-27 17:52:54', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 17:52:54', '2012-09-27 17:52:54', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 17:52:54', '2012-09-27 17:52:54', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') Fixture Delete (0.2ms) 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-09-27 17:52:54', '2012-09-27 17:52:54', '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-09-27 17:52:54', '2012-09-27 17:52:54', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 17:52:54', '2012-09-27 17:52:54', 'parade', 405688915)  (40.1ms) commit transaction  (0.2ms) begin transaction AdvertSelector::Banner Load (0.7ms) 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]] Started GET "/" for 127.0.0.1 at Thu Sep 27 20:52:54 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements [AdvertSelector] AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc [AdvertSelector] AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" IN (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (25.4ms) Completed 200 OK in 30ms (Views: 29.5ms | ActiveRecord: 0.5ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position DESC LIMIT 1  (0.3ms) rollback transaction Connecting to database specified by database.yml Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 18:04:58', 100, '2012-10-02 00:00:00', 't', '2012-09-27 18:04:58', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 18:04:58', '2012-10-07 00:00:00', 't', '2012-09-27 18:04:58', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 18:04:58', '2012-09-27 18:04:58', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 18:04:58', '2012-09-27 18:04:58', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 18:04:58', '2012-09-27 18:04:58', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') Fixture Delete (0.2ms) 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-09-27 18:04:58', '2012-09-27 18:04:58', '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-09-27 18:04:58', '2012-09-27 18:04:58', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 18:04:58', '2012-09-27 18:04:58', 'parade', 405688915)  (57.7ms) 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]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items"   (0.1ms) SAVEPOINT active_record_1 AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 18:04:58 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 2], ["updated_at", Thu, 27 Sep 2012 18:04:58 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 18:04:58 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 18:04:58 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 18:04:58 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 18:04:58 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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]]  (0.0ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-27 18:04:58.557473' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-27 18:04:58.558194' OR end_time IS NULL) AND (start_time < '2012-09-27 18:04:58.558292' 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.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", 394627963]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 18:04:58.561615', "confirmed" = 'f' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 18:04:58.564061', "confirmed" = 't' 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 18:04:58.567969', "end_time" = '2012-10-07 00:00:00.000000', "target_view_count" = 100, "start_time" = '2012-09-26 21:00:00.000000' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 18:04:58.570030', "running_view_count" = 0 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 18:05:52', 100, '2012-10-02 00:00:00', 't', '2012-09-27 18:05:52', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 18:05:52', '2012-10-07 00:00:00', 't', '2012-09-27 18:05:52', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 18:05:52', '2012-09-27 18:05:52', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 18:05:52', '2012-09-27 18:05:52', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 18:05:52', '2012-09-27 18:05:52', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') Fixture Delete (0.2ms) 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-09-27 18:05:52', '2012-09-27 18:05:52', '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-09-27 18:05:52', '2012-09-27 18:05:52', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 18:05:52', '2012-09-27 18:05:52', 'parade', 405688915)  (471.4ms) 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]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items"   (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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 18:05:52 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 2], ["updated_at", Thu, 27 Sep 2012 18:05:52 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 18:05:52 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 18:05:52 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 18:05:52 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 18:05:52 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-27 18:05:52.732337' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-27 18:05:52.733070' OR end_time IS NULL) AND (start_time < '2012-09-27 18:05:52.733171' 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]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "confirmed" = 'f', "updated_at" = '2012-09-27 18:05:52.736700' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 18:05:52.739073' 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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "start_time" = '2012-09-26 21:00:00.000000', "end_time" = '2012-10-07 00:00:00.000000', "updated_at" = '2012-09-27 18:05:52.742914', "target_view_count" = 100 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 18:05:52.744855', "running_view_count" = 0 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 18:06:03', 100, '2012-10-02 00:00:00', 't', '2012-09-27 18:06:03', 50, 814558298, 1000, 'f', 0, '2012-09-22 00:00:00') Fixture Insert (0.0ms) 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-09-27 18:06:03', '2012-10-07 00:00:00', 't', '2012-09-27 18:06:03', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 18:06:03', '2012-09-27 18:06:03', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 18:06:03', '2012-09-27 18:06:03', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 18:06:03', '2012-09-27 18:06:03', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-27 18:06:03', '2012-09-27 18:06:03', '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-09-27 18:06:03', '2012-09-27 18:06:03', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 18:06:03', '2012-09-27 18:06:03', 'parade', 405688915)  (84.0ms) 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]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items"   (0.1ms) SAVEPOINT active_record_1 AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 18:06:03 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 2], ["updated_at", Thu, 27 Sep 2012 18:06:03 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 18:06:03 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 18:06:03 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 18:06:03 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 18:06:03 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-27 18:06:03.645933' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-27 18:06:03.646766' OR end_time IS NULL) AND (start_time < '2012-09-27 18:06:03.646876' 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]]  (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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "confirmed" = 'f', "updated_at" = '2012-09-27 18:06:03.650681' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 18:06:03.653235' 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "start_time" = '2012-09-26 21:00:00.000000', "target_view_count" = 100, "updated_at" = '2012-09-27 18:06:03.657609', "end_time" = '2012-10-07 00:00:00.000000' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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" = 0, "updated_at" = '2012-09-27 18:06:03.659802' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 18:11:25', 100, '2012-10-02 00:00:00', 't', '2012-09-27 18:11:25', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 18:11:25', '2012-10-07 00:00:00', 't', '2012-09-27 18:11:25', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 18:11:25', '2012-09-27 18:11:25', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 18:11:25', '2012-09-27 18:11:25', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 18:11:25', '2012-09-27 18:11:25', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-27 18:11:25', '2012-09-27 18:11:25', '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-09-27 18:11:25', '2012-09-27 18:11:25', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 18:11:25', '2012-09-27 18:11:25', 'parade', 405688915)  (46.4ms) 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]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items"   (0.0ms) SAVEPOINT active_record_1 AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 814558298) ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 18:11:25 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 2], ["updated_at", Thu, 27 Sep 2012 18:11:25 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 814558298 AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 18:11:25 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 18:11:25 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 814558298 AND position >= 0) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 18:11:25 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 18:11:25 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-27 18:11:25.617121' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-27 18:11:25.617836' OR end_time IS NULL) AND (start_time < '2012-09-27 18:11:25.617935' 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.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", 394627963]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 18:11:25.621259', "confirmed" = 'f' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 18:11:25.623801', "confirmed" = 't' 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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "end_time" = '2012-10-07 00:00:00.000000', "start_time" = '2012-09-26 21:00:00.000000', "updated_at" = '2012-09-27 18:11:25.627464', "target_view_count" = 100 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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" = 0, "updated_at" = '2012-09-27 18:11:25.629375' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 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", 814558298]] 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.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", 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 Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 18:11:37', 100, '2012-10-02 00:00:00', 't', '2012-09-27 18:11:37', 50, 814558298, 1000, 'f', 0, '2012-09-22 00:00:00') Fixture Insert (0.0ms) 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-09-27 18:11:37', '2012-10-07 00:00:00', 't', '2012-09-27 18:11:37', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 18:11:37', '2012-09-27 18:11:37', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 18:11:37', '2012-09-27 18:11:37', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 18:11:37', '2012-09-27 18:11:37', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-27 18:11:37', '2012-09-27 18:11:37', '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-09-27 18:11:37', '2012-09-27 18:11:37', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 18:11:37', '2012-09-27 18:11:37', 'parade', 405688915)  (33.6ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.7ms) 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]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items"   (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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 814558298) ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 18:11:37 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 2], ["updated_at", Thu, 27 Sep 2012 18:11:37 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 814558298 AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 18:11:37 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 18:11:37 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 814558298 AND position >= 0) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 18:11:37 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 18:11:37 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-27 18:11:37.661929' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-27 18:11:37.662637' OR end_time IS NULL) AND (start_time < '2012-09-27 18:11:37.662741' 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.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", 394627963]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "confirmed" = 'f', "updated_at" = '2012-09-27 18:11:37.666150' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 18:11:37.668586' 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 18:11:37.672395', "end_time" = '2012-10-07 00:00:00.000000', "start_time" = '2012-09-26 21:00:00.000000', "target_view_count" = 100 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 18:11:37.674817', "running_view_count" = 0 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 Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 18:17:57', 100, '2012-10-02 00:00:00', 't', '2012-09-27 18:17:57', 50, 814558298, 1000, 'f', 0, '2012-09-22 00:00:00') Fixture Insert (0.0ms) 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-09-27 18:17:57', '2012-10-07 00:00:00', 't', '2012-09-27 18:17:57', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 18:17:57', '2012-09-27 18:17:57', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 18:17:57', '2012-09-27 18:17:57', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 18:17:57', '2012-09-27 18:17:57', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-27 18:17:57', '2012-09-27 18:17:57', '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-09-27 18:17:57', '2012-09-27 18:17:57', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 18:17:57', '2012-09-27 18:17:57', 'parade', 405688915)  (37.6ms) 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]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items"   (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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 18:17:57 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 2], ["updated_at", Thu, 27 Sep 2012 18:17:57 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 18:17:57 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 18:17:57 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 18:17:57 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 18:17:57 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-27 18:17:57.847095' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-27 18:17:57.847797' OR end_time IS NULL) AND (start_time < '2012-09-27 18:17:57.847895' 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.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", 394627963]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "confirmed" = 'f', "updated_at" = '2012-09-27 18:17:57.853850' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 18:17:57.855988' 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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "start_time" = '2012-09-26 21:00:00.000000', "end_time" = '2012-10-07 00:00:00.000000', "target_view_count" = 100, "updated_at" = '2012-09-27 18:17:57.860189' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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" = 0, "updated_at" = '2012-09-27 18:17:57.862152' 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 Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 18:18:24', 100, '2012-10-02 00:00:00', 't', '2012-09-27 18:18:24', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 18:18:24', '2012-10-07 00:00:00', 't', '2012-09-27 18:18:24', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 18:18:24', '2012-09-27 18:18:24', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 18:18:24', '2012-09-27 18:18:24', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 18:18:24', '2012-09-27 18:18:24', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') Fixture Delete (0.2ms) 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-09-27 18:18:24', '2012-09-27 18:18:24', '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-09-27 18:18:24', '2012-09-27 18:18:24', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 18:18:24', '2012-09-27 18:18:24', 'parade', 405688915)  (40.3ms) 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.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items"   (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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 18:18:24 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 2], ["updated_at", Thu, 27 Sep 2012 18:18:24 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 18:18:24 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 18:18:24 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 18:18:24 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 18:18:24 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-27 18:18:24.965708' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-27 18:18:24.966435' OR end_time IS NULL) AND (start_time < '2012-09-27 18:18:24.966538' 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.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", 394627963]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 18:18:24.970548', "running_view_count" = 0 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 "updated_at" = '2012-09-27 18:18:24.975852', "running_view_count" = 1001 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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 18:18:24.978789', "confirmed" = 'f' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 18:18:24.980794', "confirmed" = 't' 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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 18:18:24.985037', "end_time" = '2012-10-07 00:00:00.000000', "start_time" = '2012-09-26 21:00:00.000000', "target_view_count" = 100 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 18:18:24.987025', "running_view_count" = 0 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 Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 18:19:29', 100, '2012-10-02 00:00:00', 't', '2012-09-27 18:19:29', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 18:19:29', '2012-10-07 00:00:00', 't', '2012-09-27 18:19:29', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 18:19:29', '2012-09-27 18:19:29', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 18:19:29', '2012-09-27 18:19:29', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 18:19:29', '2012-09-27 18:19:29', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-27 18:19:29', '2012-09-27 18:19:29', '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-09-27 18:19:29', '2012-09-27 18:19:29', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 18:19:29', '2012-09-27 18:19:29', 'parade', 405688915)  (45.6ms) commit transaction  (0.2ms) 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.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items"   (0.1ms) SAVEPOINT active_record_1 AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 18:19:30 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 2], ["updated_at", Thu, 27 Sep 2012 18:19:30 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 18:19:30 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 18:19:30 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 18:19:30 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 18:19:30 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-27 18:19:30.032898' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-27 18:19:30.033599' OR end_time IS NULL) AND (start_time < '2012-09-27 18:19:30.033705' 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-09-27 18:19:30.034521' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-09-27 18:19:30.035199' OR end_time IS NULL) AND (start_time < '2011-09-27 18:19:30.035311' 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.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", 394627963]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 18:19:30.039594', "running_view_count" = 0 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 AdvertSelector::Banner Load (0.1ms) 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 "updated_at" = '2012-09-27 18:19:30.045223', "running_view_count" = 1001 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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 18:19:30.048175', "confirmed" = 'f' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 18:19:30.050089', "confirmed" = 't' 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 18:19:30.054219', "end_time" = '2012-10-07 00:00:00.000000', "target_view_count" = 100, "start_time" = '2012-09-26 21:00:00.000000' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 18:19:30.056135', "running_view_count" = 0 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 Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 18:20:50', 100, '2012-10-02 00:00:00', 't', '2012-09-27 18:20:50', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 18:20:50', '2012-10-07 00:00:00', 't', '2012-09-27 18:20:50', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 18:20:50', '2012-09-27 18:20:50', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 18:20:50', '2012-09-27 18:20:50', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 18:20:50', '2012-09-27 18:20:50', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') Fixture Delete (0.2ms) 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-09-27 18:20:50', '2012-09-27 18:20:50', '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-09-27 18:20:50', '2012-09-27 18:20:50', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 18:20:50', '2012-09-27 18:20:50', 'parade', 405688915)  (74.3ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.7ms) 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]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items"   (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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 18:20:50 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 2], ["updated_at", Thu, 27 Sep 2012 18:20:50 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 18:20:50 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 18:20:50 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 18:20:50 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 18:20:50 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-27 18:20:50.755142' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-27 18:20:50.755850' OR end_time IS NULL) AND (start_time < '2012-09-27 19:20:50.755962' 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-09-27 18:20:50.756817' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-09-27 18:20:50.757478' OR end_time IS NULL) AND (start_time < '2011-09-27 19:20:50.757603' 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]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 18:20:50.761860', "running_view_count" = 0 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 AdvertSelector::Banner Load (0.1ms) 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 "updated_at" = '2012-09-27 18:20:50.767462', "running_view_count" = 1001 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 18:20:50.770380', "confirmed" = 'f' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 18:20:50.772327', "confirmed" = 't' 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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 18:20:50.776464', "end_time" = '2012-10-07 00:00:00.000000', "start_time" = '2012-09-26 21:00:00.000000', "target_view_count" = 100 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 18:20:50.778375', "running_view_count" = 0 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 Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 18:23:29', 100, '2012-10-02 00:00:00', 't', '2012-09-27 18:23:29', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 18:23:29', '2012-10-07 00:00:00', 't', '2012-09-27 18:23:29', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 18:23:29', '2012-09-27 18:23:29', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 18:23:29', '2012-09-27 18:23:29', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 18:23:29', '2012-09-27 18:23:29', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-27 18:23:29', '2012-09-27 18:23:29', '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-09-27 18:23:29', '2012-09-27 18:23:29', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 18:23:29', '2012-09-27 18:23:29', 'parade', 405688915)  (47.1ms) commit transaction  (0.2ms) 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]] Started GET "/" for 127.0.0.1 at Thu Sep 27 21:23:29 +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-09-27 18:23:29.216750' OR end_time IS NULL) AND (start_time < '2012-09-27 19:23:29.216941' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (25.6ms) Completed 200 OK in 30ms (Views: 29.7ms | ActiveRecord: 0.5ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position DESC LIMIT 1  (0.0ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 18:23:51', 100, '2012-10-02 00:00:00', 't', '2012-09-27 18:23:51', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 18:23:51', '2012-10-07 00:00:00', 't', '2012-09-27 18:23:51', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 18:23:51', '2012-09-27 18:23:51', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 18:23:51', '2012-09-27 18:23:51', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 18:23:51', '2012-09-27 18:23:51', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-27 18:23:51', '2012-09-27 18:23:51', '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-09-27 18:23:51', '2012-09-27 18:23:51', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 18:23:51', '2012-09-27 18:23:51', 'parade', 405688915)  (34.2ms) commit transaction  (0.2ms) 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]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items"   (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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 18:23:51 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 2], ["updated_at", Thu, 27 Sep 2012 18:23:51 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 18:23:51 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 18:23:51 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 18:23:51 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 18:23:51 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-27 18:23:51.677168' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-27 18:23:51.677872' OR end_time IS NULL) AND (start_time < '2012-09-27 19:23:51.677982' 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-09-27 18:23:51.678824' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-09-27 18:23:51.679483' OR end_time IS NULL) AND (start_time < '2011-09-27 19:23:51.679596' 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]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 18:23:51.683907', "running_view_count" = 0 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.1ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 18:23:51.691688', "running_view_count" = 1001 WHERE "advert_selector_banners"."id" = 814558298  (0.1ms) RELEASE SAVEPOINT active_record_1 AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]]  (0.3ms) 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]]  (0.1ms) SAVEPOINT active_record_1  (1.0ms) UPDATE "advert_selector_banners" SET "confirmed" = 'f', "updated_at" = '2012-09-27 18:23:51.702701' WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.3ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "confirmed" = 't', "updated_at" = '2012-09-27 18:23:51.709830' 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "start_time" = '2012-09-26 21:00:00.000000', "end_time" = '2012-10-07 00:00:00.000000', "target_view_count" = 100, "updated_at" = '2012-09-27 18:23:51.714184' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 18:23:51.716181', "running_view_count" = 0 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 Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 18:23:54', 100, '2012-10-02 00:00:00', 't', '2012-09-27 18:23:54', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 18:23:54', '2012-10-07 00:00:00', 't', '2012-09-27 18:23:54', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 18:23:54', '2012-09-27 18:23:54', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 18:23:54', '2012-09-27 18:23:54', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 18:23:54', '2012-09-27 18:23:54', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') Fixture Delete (0.2ms) 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-09-27 18:23:54', '2012-09-27 18:23:54', '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-09-27 18:23:54', '2012-09-27 18:23:54', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 18:23:54', '2012-09-27 18:23:54', 'parade', 405688915)  (173.3ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.7ms) 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]] Started GET "/" for 127.0.0.1 at Thu Sep 27 21:23:54 +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-09-27 18:23:54.282941' OR end_time IS NULL) AND (start_time < '2012-09-27 19:23:54.283136' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (24.8ms) Completed 200 OK in 30ms (Views: 28.9ms | ActiveRecord: 0.5ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position DESC LIMIT 1 AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time > '2012-09-27 18:23:54.311093' OR end_time IS NULL) AND (start_time < '2012-09-27 19:23:54.311229' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count) ORDER BY priority desc AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" IN (405688915) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position  (0.0ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 18:24:13', 100, '2012-10-02 00:00:00', 't', '2012-09-27 18:24:13', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 18:24:13', '2012-10-07 00:00:00', 't', '2012-09-27 18:24:13', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 18:24:13', '2012-09-27 18:24:13', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 18:24:13', '2012-09-27 18:24:13', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 18:24:13', '2012-09-27 18:24:13', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-27 18:24:13', '2012-09-27 18:24:13', '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-09-27 18:24:13', '2012-09-27 18:24:13', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 18:24:13', '2012-09-27 18:24:13', 'parade', 405688915)  (77.4ms) commit transaction  (0.2ms) 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]] Started GET "/" for 127.0.0.1 at Thu Sep 27 21:24:14 +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-09-27 18:24:14.031751' OR end_time IS NULL) AND (start_time < '2012-09-27 19:24:14.031947' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (24.1ms) Completed 200 OK in 29ms (Views: 28.1ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Thu Sep 27 21:24:14 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (1.6ms) Completed 200 OK in 3ms (Views: 2.6ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 21:39:14 +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-09-27 18:39:14.065866' OR end_time IS NULL) AND (start_time < '2012-09-27 19:39:14.066050' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (4.7ms) Completed 200 OK in 6ms (Views: 5.3ms | ActiveRecord: 0.4ms)  (0.0ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 18:25:21', 100, '2012-10-02 00:00:00', 't', '2012-09-27 18:25:21', 50, 814558298, 1000, 'f', 0, '2012-09-22 00:00:00') Fixture Insert (0.0ms) 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-09-27 18:25:21', '2012-10-07 00:00:00', 't', '2012-09-27 18:25:21', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 18:25:21', '2012-09-27 18:25:21', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 18:25:21', '2012-09-27 18:25:21', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 18:25:21', '2012-09-27 18:25:21', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-27 18:25:21', '2012-09-27 18:25:21', '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-09-27 18:25:21', '2012-09-27 18:25:21', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 18:25:21', '2012-09-27 18:25:21', 'parade', 405688915)  (402.2ms) commit transaction  (0.0ms) 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]]  (0.0ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 18:25:32', 100, '2012-10-02 00:00:00', 't', '2012-09-27 18:25:32', 50, 814558298, 1000, 'f', 0, '2012-09-22 00:00:00') Fixture Insert (0.0ms) 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-09-27 18:25:32', '2012-10-07 00:00:00', 't', '2012-09-27 18:25:32', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 18:25:32', '2012-09-27 18:25:32', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 18:25:32', '2012-09-27 18:25:32', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 18:25:32', '2012-09-27 18:25:32', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-27 18:25:32', '2012-09-27 18:25:32', '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-09-27 18:25:32', '2012-09-27 18:25:32', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 18:25:32', '2012-09-27 18:25:32', 'parade', 405688915)  (35.3ms) 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]]  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 18:25:44', 100, '2012-10-02 00:00:00', 't', '2012-09-27 18:25:44', 50, 814558298, 1000, 'f', 0, '2012-09-22 00:00:00') Fixture Insert (0.0ms) 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-09-27 18:25:44', '2012-10-07 00:00:00', 't', '2012-09-27 18:25:44', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 18:25:44', '2012-09-27 18:25:44', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 18:25:44', '2012-09-27 18:25:44', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 18:25:44', '2012-09-27 18:25:44', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-27 18:25:44', '2012-09-27 18:25:44', '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-09-27 18:25:44', '2012-09-27 18:25:44', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 18:25:44', '2012-09-27 18:25:44', 'parade', 405688915)  (38.7ms) 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]] Started GET "/" for 127.0.0.1 at Thu Sep 27 21:25:44 +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-09-27 18:25:44.609961' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (24.1ms) Completed 200 OK in 29ms (Views: 28.3ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Thu Sep 27 21:25:44 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (1.6ms) Completed 200 OK in 3ms (Views: 2.5ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 21:40:44 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (1.7ms) Completed 200 OK in 3ms (Views: 2.6ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 18:29:47', 100, '2012-10-02 00:00:00', 't', '2012-09-27 18:29:47', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 18:29:47', '2012-10-07 00:00:00', 't', '2012-09-27 18:29:47', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 18:29:47', '2012-09-27 18:29:47', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 18:29:47', '2012-09-27 18:29:47', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 18:29:47', '2012-09-27 18:29:47', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-27 18:29:47', '2012-09-27 18:29:47', '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-09-27 18:29:47', '2012-09-27 18:29:47', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 18:29:47', '2012-09-27 18:29:47', 'parade', 405688915)  (35.9ms) 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]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items"   (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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 814558298) ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 18:29:47 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 2], ["updated_at", Thu, 27 Sep 2012 18:29:47 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 814558298 AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 18:29:47 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 18:29:47 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 814558298 AND position >= 0) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 18:29:47 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 18:29:47 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-27 18:29:47.813124' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-27 18:29:47.813904' OR end_time IS NULL) AND (start_time < '2012-09-27 19:29:47.814028' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count)  (0.0ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-09-27 18:29:47.814908' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-09-27 18:29:47.815600' OR end_time IS NULL) AND (start_time < '2011-09-27 19:29:47.815718' 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]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "running_view_count" = 0, "updated_at" = '2012-09-27 18:29:47.820031' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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" = 1001, "updated_at" = '2012-09-27 18:29:47.825619' 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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 18:29:47.828611', "confirmed" = 'f' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 18:29:47.830637', "confirmed" = 't' 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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "target_view_count" = 100, "end_time" = '2012-10-07 00:00:00.000000', "updated_at" = '2012-09-27 18:29:47.834926', "start_time" = '2012-09-26 21:00:00.000000' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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" = 0, "updated_at" = '2012-09-27 18:29:47.836888' 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.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", 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", 394627963]]  (0.0ms) SELECT COUNT(*) FROM "advert_selector_banners" Processing by AdvertSelector::BannersController#create as HTML Parameters: {"banner"=>{"comment"=>"Pepsi banner", "name"=>"Pepsi", "end_time"=>"2012-10-07 00:00:00 UTC", "placement_id"=>"405688915", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-09-27 00:00:00 UTC"}}  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) 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", Thu, 27 Sep 2012 18:29:47 UTC +00:00], ["end_time", Sun, 07 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", Thu, 27 Sep 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Thu, 27 Sep 2012 18:29:47 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558299 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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", 394627963]]  (0.0ms) SELECT COUNT(*) FROM "advert_selector_banners"  Processing by AdvertSelector::BannersController#destroy 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"]]  (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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position SQL (0.2ms) 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 394627963 AND position > 2) SQL (0.1ms) 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.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", 394627963]] 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/banners/_form.html.erb (45.1ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 60ms (Views: 58.6ms | ActiveRecord: 0.7ms)  (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", 394627963]] Processing by AdvertSelector::BannersController#index as HTML AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners"  AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 9ms (Views: 7.6ms | ActiveRecord: 0.4ms)  (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", 394627963]] 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 (99.8ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 106ms (Views: 105.7ms | ActiveRecord: 0.5ms)  (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", 394627963]] Processing by AdvertSelector::BannersController#show as HTML Parameters: {"id"=>"394627963"} Redirected to http://test.host/advert_selector/banners/394627963/edit Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (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", 394627963]] 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.0ms) rollback transaction  (0.0ms) begin transaction 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.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items"  (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"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 718799085) ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.4ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 18:29:48 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", nil], ["position", 1], ["updated_at", Thu, 27 Sep 2012 18:29:48 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 718799085 AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 18:29:48 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 18:29:48 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 718799085 AND position >= 1) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 18:29:48 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", "some_limit_helper_here"], ["position", 1], ["updated_at", Thu, 27 Sep 2012 18:29:48 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "updated_at" = '2012-09-27 18:29:48.070635', "content_for" = 'f' WHERE "advert_selector_helper_items"."id" = 960656442  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 718799085 AND position = 1) SQL (0.0ms) 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"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 718799085 AND position > 2)  (0.1ms) UPDATE "advert_selector_helper_items" SET "position" = 11, "updated_at" = '2012-09-27 18:29:48.072425', "content_for" = 'f' WHERE "advert_selector_helper_items"."id" = 960656441  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 718799085 AND position = 11)  (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" = ? LIMIT 1 [["id", 718799085]]  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement'  (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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position DESC LIMIT 1  (0.1ms) rollback transaction  (0.0ms) begin transaction 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.0ms) rollback transaction  (0.0ms) begin transaction 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-09-27 18:29:48.079216', "conflicting_placements_array" = 'not_found,video' WHERE "advert_selector_placements"."id" = 718799085 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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-09-27 18:29:48.081293', "conflicting_placements_array" = '' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE (LOWER(name) = 'parade') LIMIT 1 AdvertSelector::Placement Load (0.0ms) 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::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.0ms) rollback transaction  (0.0ms) begin transaction 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::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::Placement Load (0.1ms) 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.5ms) INSERT INTO "advert_selector_placements" ("conflicting_placements_array", "created_at", "name", "only_once_per_session", "updated_at") VALUES (?, ?, ?, ?, ?) [["conflicting_placements_array", nil], ["created_at", Thu, 27 Sep 2012 18:29:48 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Thu, 27 Sep 2012 18:29:48 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 1019730478 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/1019730478 Completed 302 Found in 4ms (ActiveRecord: 0.6ms)  (0.0ms) SELECT COUNT(*) FROM "advert_selector_placements"  (0.1ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position SQL (0.3ms) 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 3ms (ActiveRecord: 0.4ms)  (0.0ms) SELECT COUNT(*) FROM "advert_selector_placements"  (0.1ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/placements/_form.html.erb (15.0ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 23ms (Views: 21.7ms | ActiveRecord: 0.6ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 9ms (Views: 7.7ms | ActiveRecord: 0.4ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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 (12.6ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 19ms (Views: 18.4ms | ActiveRecord: 0.4ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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.0ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Placement Load (0.1ms) 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 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/405688915 Completed 302 Found in 3ms (ActiveRecord: 0.2ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction  (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]] Started GET "/" for 127.0.0.1 at Thu Sep 27 21:29:48 +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-09-27 18:29:48.174573' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 9ms (Views: 8.1ms | ActiveRecord: 0.3ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Thu Sep 27 21:29:48 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 2ms (Views: 2.2ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 21:44:48 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 2ms (Views: 2.3ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 3ms (Views: 2.6ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 18:32:07', 100, '2012-10-02 00:00:00', 't', '2012-09-27 18:32:07', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 18:32:07', '2012-10-07 00:00:00', 't', '2012-09-27 18:32:07', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 18:32:07', '2012-09-27 18:32:07', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 18:32:07', '2012-09-27 18:32:07', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 18:32:07', '2012-09-27 18:32:07', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-27 18:32:07', '2012-09-27 18:32:07', '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-09-27 18:32:07', '2012-09-27 18:32:07', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 18:32:07', '2012-09-27 18:32:07', 'parade', 405688915)  (331.1ms) 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]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items"   (0.0ms) SAVEPOINT active_record_1 AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 814558298) ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 18:32:08 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 2], ["updated_at", Thu, 27 Sep 2012 18:32:08 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 814558298 AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 18:32:08 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 18:32:08 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 814558298 AND position >= 0) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 18:32:08 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 18:32:08 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-27 18:32:08.158816' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-27 18:32:08.159583' OR end_time IS NULL) AND (start_time < '2012-09-27 19:32:08.159704' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count)  (0.0ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-09-27 18:32:08.160608' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-09-27 18:32:08.161292' OR end_time IS NULL) AND (start_time < '2011-09-27 19:32:08.161410' 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]]  (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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 18:32:08.168677', "running_view_count" = 0 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 "updated_at" = '2012-09-27 18:32:08.174617', "running_view_count" = 1001 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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "confirmed" = 'f', "updated_at" = '2012-09-27 18:32:08.179062' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 18:32:08.180986' 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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 18:32:08.186804', "start_time" = '2012-09-26 21:00:00.000000', "end_time" = '2012-10-07 00:00:00.000000', "target_view_count" = 100 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 18:32:08.188788', "running_view_count" = 0 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]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners"  Processing by AdvertSelector::BannersController#create as HTML Parameters: {"banner"=>{"comment"=>"Pepsi banner", "name"=>"Pepsi", "end_time"=>"2012-10-07 00:00:00 UTC", "placement_id"=>"405688915", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-09-27 00:00:00 UTC"}}  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) 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", Thu, 27 Sep 2012 18:32:08 UTC +00:00], ["end_time", Sun, 07 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", Thu, 27 Sep 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Thu, 27 Sep 2012 18:32:08 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558299 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.1ms) 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]]  (0.0ms) SELECT COUNT(*) FROM "advert_selector_banners"  Processing by AdvertSelector::BannersController#destroy 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"]]  (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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position SQL (0.2ms) 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.0ms) UPDATE "advert_selector_helper_items" SET position = (position - 1) WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 394627963 AND position > 2) SQL (0.1ms) 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.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]] 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/banners/_form.html.erb (45.5ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 60ms (Views: 58.9ms | ActiveRecord: 0.7ms)  (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]] Processing by AdvertSelector::BannersController#index as HTML AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners"  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" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 88ms (Views: 86.8ms | ActiveRecord: 0.5ms)  (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]] 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.0ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 25ms (Views: 24.0ms | 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]] Processing by AdvertSelector::BannersController#show as HTML Parameters: {"id"=>"394627963"} Redirected to http://test.host/advert_selector/banners/394627963/edit Completed 302 Found in 0ms (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]] 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.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::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.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items"   (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"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 718799085) ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 18:32:08 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", nil], ["position", 1], ["updated_at", Thu, 27 Sep 2012 18:32:08 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 718799085 AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 18:32:08 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 18:32:08 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 718799085 AND position >= 1) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 18:32:08 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", "some_limit_helper_here"], ["position", 1], ["updated_at", Thu, 27 Sep 2012 18:32:08 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "updated_at" = '2012-09-27 18:32:08.437315', "content_for" = 'f' WHERE "advert_selector_helper_items"."id" = 960656442  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 718799085 AND position = 1) SQL (0.0ms) 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"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 718799085 AND position > 2)  (0.1ms) UPDATE "advert_selector_helper_items" SET "updated_at" = '2012-09-27 18:32:08.439173', "content_for" = 'f', "position" = 11 WHERE "advert_selector_helper_items"."id" = 960656441  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 718799085 AND position = 11)  (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]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement'  (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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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::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::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.3ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-09-27 18:32:08.451357', "conflicting_placements_array" = 'not_found,video' WHERE "advert_selector_placements"."id" = 718799085 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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-09-27 18:32:08.453480', "conflicting_placements_array" = '' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE (LOWER(name) = 'parade') LIMIT 1 AdvertSelector::Placement Load (0.0ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."name" = 'not_found' LIMIT 1 AdvertSelector::Placement Load (0.1ms) 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::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.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", 394627963]] 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::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::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.6ms) INSERT INTO "advert_selector_placements" ("conflicting_placements_array", "created_at", "name", "only_once_per_session", "updated_at") VALUES (?, ?, ?, ?, ?) [["conflicting_placements_array", nil], ["created_at", Thu, 27 Sep 2012 18:32:08 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Thu, 27 Sep 2012 18:32:08 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 1019730478 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/1019730478 Completed 302 Found in 4ms (ActiveRecord: 0.7ms)  (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::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.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", "405688915"]]  (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"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position SQL (0.3ms) 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 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::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  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/placements/_form.html.erb (15.2ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 23ms (Views: 22.0ms | 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::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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 9ms (Views: 7.7ms | ActiveRecord: 0.4ms)  (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::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 (12.5ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 19ms (Views: 18.4ms | ActiveRecord: 0.4ms)  (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::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 0ms (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::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 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/405688915 Completed 302 Found in 3ms (ActiveRecord: 0.2ms)  (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]]  (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]] Started GET "/" for 127.0.0.1 at Thu Sep 27 21:32:08 +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-09-27 18:32:08.577886' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 9ms (Views: 8.0ms | ActiveRecord: 0.3ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Thu Sep 27 21:32:08 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 2ms (Views: 2.3ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 21:47:08 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 3ms (Views: 2.4ms | 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]] Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 3ms (Views: 2.5ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 18:32:47', 100, '2012-10-02 00:00:00', 't', '2012-09-27 18:32:47', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 18:32:47', '2012-10-07 00:00:00', 't', '2012-09-27 18:32:47', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 18:32:47', '2012-09-27 18:32:47', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 18:32:47', '2012-09-27 18:32:47', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 18:32:47', '2012-09-27 18:32:47', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-27 18:32:47', '2012-09-27 18:32:47', '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-09-27 18:32:47', '2012-09-27 18:32:47', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 18:32:47', '2012-09-27 18:32:47', 'parade', 405688915)  (43.7ms) 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]]  (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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 814558298) ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 18:32:47 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 2], ["updated_at", Thu, 27 Sep 2012 18:32:47 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 814558298 AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 18:32:47 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 18:32:47 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 814558298 AND position >= 0) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 18:32:47 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 18:32:47 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-27 18:32:47.866253' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-27 18:32:47.867023' OR end_time IS NULL) AND (start_time < '2012-09-27 19:32:47.867139' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count)  (0.0ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-09-27 18:32:47.868010' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-09-27 18:32:47.868679' OR end_time IS NULL) AND (start_time < '2011-09-27 19:32:47.868793' 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]]  (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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "running_view_count" = 0, "updated_at" = '2012-09-27 18:32:47.876074' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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" = 1001, "updated_at" = '2012-09-27 18:32:47.882095' 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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 18:32:47.886617', "confirmed" = 'f' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 18:32:47.888582', "confirmed" = 't' 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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "target_view_count" = 100, "updated_at" = '2012-09-27 18:32:47.894230', "start_time" = '2012-09-26 21:00:00.000000', "end_time" = '2012-10-07 00:00:00.000000' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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" = 0, "updated_at" = '2012-09-27 18:32:47.896194' 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]]  (0.0ms) SELECT COUNT(*) FROM "advert_selector_banners"  Processing by AdvertSelector::BannersController#create as HTML Parameters: {"banner"=>{"comment"=>"Pepsi banner", "name"=>"Pepsi", "end_time"=>"2012-10-07 00:00:00 UTC", "placement_id"=>"405688915", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-09-27 00:00:00 UTC"}}  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) 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", Thu, 27 Sep 2012 18:32:47 UTC +00:00], ["end_time", Sun, 07 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", Thu, 27 Sep 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Thu, 27 Sep 2012 18:32:47 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558299 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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]]  (0.0ms) SELECT COUNT(*) FROM "advert_selector_banners"  Processing by AdvertSelector::BannersController#destroy 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"]]  (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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position SQL (0.2ms) 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.0ms) UPDATE "advert_selector_helper_items" SET position = (position - 1) WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 394627963 AND position > 2) SQL (0.1ms) 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.6ms)  (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]] 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/banners/_form.html.erb (45.8ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.4ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 AdvertSelector::Placement Load (0.3ms) 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 Completed 200 OK in 69ms (Views: 67.5ms | ActiveRecord: 1.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]] Processing by AdvertSelector::BannersController#index as HTML AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners"  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" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 92ms (Views: 90.5ms | ActiveRecord: 0.5ms)  (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]] 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.7ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 25ms (Views: 24.7ms | ActiveRecord: 0.4ms)  (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]] Processing by AdvertSelector::BannersController#show as HTML Parameters: {"id"=>"394627963"} Redirected to http://test.host/advert_selector/banners/394627963/edit Completed 302 Found in 0ms (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]] 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.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::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.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items"   (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"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 718799085) ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.4ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 18:32:48 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", nil], ["position", 1], ["updated_at", Thu, 27 Sep 2012 18:32:48 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 718799085 AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 18:32:48 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 18:32:48 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 718799085 AND position >= 1) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 18:32:48 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", "some_limit_helper_here"], ["position", 1], ["updated_at", Thu, 27 Sep 2012 18:32:48 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "updated_at" = '2012-09-27 18:32:48.157301', "content_for" = 'f' WHERE "advert_selector_helper_items"."id" = 960656442  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 718799085 AND position = 1) SQL (0.0ms) 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"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 718799085 AND position > 2)  (0.1ms) UPDATE "advert_selector_helper_items" SET "updated_at" = '2012-09-27 18:32:48.159165', "content_for" = 'f', "position" = 11 WHERE "advert_selector_helper_items"."id" = 960656441  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 718799085 AND position = 11)  (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]]  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement'  (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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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::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.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", 394627963]] 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-09-27 18:32:48.170678', "conflicting_placements_array" = 'not_found,video' WHERE "advert_selector_placements"."id" = 718799085 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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-09-27 18:32:48.172831', "conflicting_placements_array" = '' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE (LOWER(name) = 'parade') LIMIT 1 AdvertSelector::Placement Load (0.0ms) 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::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::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::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::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.5ms) INSERT INTO "advert_selector_placements" ("conflicting_placements_array", "created_at", "name", "only_once_per_session", "updated_at") VALUES (?, ?, ?, ?, ?) [["conflicting_placements_array", nil], ["created_at", Thu, 27 Sep 2012 18:32:48 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Thu, 27 Sep 2012 18:32:48 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 1019730478 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/1019730478 Completed 302 Found in 4ms (ActiveRecord: 0.6ms)  (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::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 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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 3ms (ActiveRecord: 0.4ms)  (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::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  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/placements/_form.html.erb (15.1ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 23ms (Views: 22.0ms | ActiveRecord: 0.6ms)  (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::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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 9ms (Views: 7.7ms | ActiveRecord: 0.4ms)  (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::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 (12.8ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 19ms (Views: 18.7ms | ActiveRecord: 0.4ms)  (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::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 0ms (ActiveRecord: 0.0ms)  (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::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 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/405688915 Completed 302 Found in 3ms (ActiveRecord: 0.2ms)  (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]]  (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]] Started GET "/" for 127.0.0.1 at Thu Sep 27 21:32:48 +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-09-27 18:32:48.295429' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 9ms (Views: 8.0ms | ActiveRecord: 0.3ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Thu Sep 27 21:32:48 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 2ms (Views: 2.3ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 21:47:48 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 2ms (Views: 2.3ms | 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]] Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 3ms (Views: 2.5ms | ActiveRecord: 0.0ms) [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard  (0.2ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 18:40:14', 100, '2012-10-02 00:00:00', 't', '2012-09-27 18:40:14', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 18:40:14', '2012-10-07 00:00:00', 't', '2012-09-27 18:40:14', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 18:40:14', '2012-09-27 18:40:14', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 18:40:14', '2012-09-27 18:40:14', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 18:40:14', '2012-09-27 18:40:14', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-27 18:40:14', '2012-09-27 18:40:14', '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-09-27 18:40:14', '2012-09-27 18:40:14', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 18:40:14', '2012-09-27 18:40:14', 'parade', 405688915)  (58.9ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.3ms) 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]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items"   (0.1ms) SAVEPOINT active_record_1 AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 814558298) ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 18:40:14 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 2], ["updated_at", Thu, 27 Sep 2012 18:40:14 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 814558298 AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 18:40:14 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 18:40:14 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 814558298 AND position >= 0) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 18:40:14 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 18:40:14 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-27 18:40:14.437688' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-27 18:40:14.438466' OR end_time IS NULL) AND (start_time < '2012-09-27 19:40:14.438575' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count)  (0.0ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-09-27 18:40:14.439416' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-09-27 18:40:14.440072' OR end_time IS NULL) AND (start_time < '2011-09-27 19:40:14.440182' 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]]  (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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "running_view_count" = 0, "updated_at" = '2012-09-27 18:40:14.447648' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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" = 1001, "updated_at" = '2012-09-27 18:40:14.453538' 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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "confirmed" = 'f', "updated_at" = '2012-09-27 18:40:14.458225' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 18:40:14.460203' 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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "target_view_count" = 100, "start_time" = '2012-09-26 21:00:00.000000', "updated_at" = '2012-09-27 18:40:14.465892', "end_time" = '2012-10-07 00:00:00.000000' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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" = 0, "updated_at" = '2012-09-27 18:40:14.467873' 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]]  (0.0ms) SELECT COUNT(*) FROM "advert_selector_banners" Processing by AdvertSelector::BannersController#create as HTML Parameters: {"banner"=>{"comment"=>"Pepsi banner", "name"=>"Pepsi", "end_time"=>"2012-10-07 00:00:00 UTC", "placement_id"=>"405688915", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-09-27 00:00:00 UTC"}}  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) 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", Thu, 27 Sep 2012 18:40:14 UTC +00:00], ["end_time", Sun, 07 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", Thu, 27 Sep 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Thu, 27 Sep 2012 18:40:14 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558299 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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]]  (0.0ms) SELECT COUNT(*) FROM "advert_selector_banners" Processing by AdvertSelector::BannersController#destroy 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"]]  (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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position SQL (0.2ms) 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 394627963 AND position > 2) SQL (0.1ms) 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.6ms)  (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]] 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/banners/_form.html.erb (57.3ms) AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 AdvertSelector::Placement Load (0.2ms) 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 Completed 200 OK in 78ms (Views: 76.5ms | ActiveRecord: 1.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]] Processing by AdvertSelector::BannersController#index as HTML AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 109ms (Views: 107.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]] 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.7ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 25ms (Views: 24.6ms | ActiveRecord: 0.4ms)  (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]] Processing by AdvertSelector::BannersController#show as HTML Parameters: {"id"=>"394627963"} Redirected to http://test.host/advert_selector/banners/394627963/edit Completed 302 Found in 0ms (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]] 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.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::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.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items"  (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"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 718799085) ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.4ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 18:40:14 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", nil], ["position", 1], ["updated_at", Thu, 27 Sep 2012 18:40:14 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 718799085 AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 18:40:14 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 18:40:14 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 718799085 AND position >= 1) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 18:40:14 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", "some_limit_helper_here"], ["position", 1], ["updated_at", Thu, 27 Sep 2012 18:40:14 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-09-27 18:40:14.752192' WHERE "advert_selector_helper_items"."id" = 960656442  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 718799085 AND position = 1) SQL (0.0ms) 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"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 718799085 AND position > 2)  (0.1ms) UPDATE "advert_selector_helper_items" SET "position" = 11, "content_for" = 'f', "updated_at" = '2012-09-27 18:40:14.753973' WHERE "advert_selector_helper_items"."id" = 960656441  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 718799085 AND position = 11)  (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]]  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement'  (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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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::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::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.3ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = 'not_found,video', "updated_at" = '2012-09-27 18:40:14.765520' WHERE "advert_selector_placements"."id" = 718799085 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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 "conflicting_placements_array" = '', "updated_at" = '2012-09-27 18:40:14.767772' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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::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::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::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 718799085]] AdvertSelector::Placement Load (0.1ms) 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::Placement Load (0.0ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_placements"  Processing by AdvertSelector::PlacementsController#create as HTML Parameters: {"placement"=>{"name"=>"new placement"}}  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "advert_selector_placements" ("conflicting_placements_array", "created_at", "name", "only_once_per_session", "updated_at") VALUES (?, ?, ?, ?, ?) [["conflicting_placements_array", nil], ["created_at", Thu, 27 Sep 2012 18:40:14 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Thu, 27 Sep 2012 18:40:14 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 1019730478 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/1019730478 Completed 302 Found in 4ms (ActiveRecord: 0.7ms)  (0.1ms) 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::Placement Load (0.0ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_placements" Processing by AdvertSelector::PlacementsController#destroy as HTML Parameters: {"id"=>"405688915"} AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", "405688915"]]  (0.1ms) SAVEPOINT active_record_1 AdvertSelector::HelperItem Load (0.5ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position SQL (0.3ms) 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 8ms (ActiveRecord: 1.0ms)  (0.1ms) 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::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.1ms) 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  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/placements/_form.html.erb (21.3ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 31ms (Views: 29.1ms | ActiveRecord: 0.7ms)  (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::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::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" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 12ms (Views: 10.6ms | ActiveRecord: 0.7ms)  (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::Placement Load (0.1ms) 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 (12.6ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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.0ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = 405688915 LIMIT 1 Completed 200 OK in 19ms (Views: 18.5ms | 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::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::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 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/405688915 Completed 302 Found in 3ms (ActiveRecord: 0.2ms)  (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]]  (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]] Started GET "/" for 127.0.0.1 at Thu Sep 27 21:40:14 +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-09-27 18:40:14.924615' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 9ms (Views: 8.8ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Thu Sep 27 21:40:14 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 8ms (Views: 7.4ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 21:55:14 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 3ms (Views: 2.4ms | 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]] Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 3ms (Views: 2.6ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.3ms) 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-09-27 18:40:30', 100, '2012-10-02 00:00:00', 't', '2012-09-27 18:40:30', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 18:40:30', '2012-10-07 00:00:00', 't', '2012-09-27 18:40:30', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 18:40:30', '2012-09-27 18:40:30', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 18:40:30', '2012-09-27 18:40:30', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 18:40:30', '2012-09-27 18:40:30', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') Fixture Delete (0.2ms) 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-09-27 18:40:30', '2012-09-27 18:40: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-09-27 18:40:30', '2012-09-27 18:40: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-09-27 18:40:30', '2012-09-27 18:40:30', 'parade', 405688915)  (46.4ms) 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.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items"   (0.1ms) SAVEPOINT active_record_1 AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 18:40:30 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 2], ["updated_at", Thu, 27 Sep 2012 18:40:30 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 18:40:30 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 18:40:30 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 18:40:30 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 18:40:30 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position SQL (0.1ms) DELETE FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."id" = ? [["id", 960656440]] SQL (0.3ms) UPDATE "advert_selector_helper_items" SET position = (position - 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position > 3)  (0.0ms) RELEASE SAVEPOINT active_record_1 AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-27 18:40:30.614260' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-27 18:40:30.615911' OR end_time IS NULL) AND (start_time < '2012-09-27 19:40:30.616159' 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-09-27 18:40:30.617525' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-09-27 18:40:30.618428' OR end_time IS NULL) AND (start_time < '2011-09-27 19:40:30.618544' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count)  (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]]  (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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "running_view_count" = 0, "updated_at" = '2012-09-27 18:40:30.626247' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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" = 1001, "updated_at" = '2012-09-27 18:40:30.632105' 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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 18:40:30.636448', "confirmed" = 'f' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 18:40:30.638403', "confirmed" = 't' 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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "target_view_count" = 100, "start_time" = '2012-09-26 21:00:00.000000', "end_time" = '2012-10-07 00:00:00.000000', "updated_at" = '2012-09-27 18:40:30.644287' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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" = 0, "updated_at" = '2012-09-27 18:40:30.646317' 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.1ms) 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]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners"  Processing by AdvertSelector::BannersController#create as HTML Parameters: {"banner"=>{"comment"=>"Pepsi banner", "name"=>"Pepsi", "end_time"=>"2012-10-07 00:00:00 UTC", "placement_id"=>"405688915", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-09-27 00:00:00 UTC"}}  (0.2ms) 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", Thu, 27 Sep 2012 18:40:30 UTC +00:00], ["end_time", Sun, 07 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", Thu, 27 Sep 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Thu, 27 Sep 2012 18:40:30 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558299 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/banners/814558299 Completed 302 Found in 8ms (ActiveRecord: 0.9ms)  (0.1ms) 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]]  (0.0ms) SELECT COUNT(*) FROM "advert_selector_banners"  Processing by AdvertSelector::BannersController#destroy 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"]]  (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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position SQL (0.2ms) 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position > 2) SQL (0.1ms) 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.6ms)  (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]] 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/banners/_form.html.erb (45.9ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 62ms (Views: 60.3ms | 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]] Processing by AdvertSelector::BannersController#index as HTML AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners"  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" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 102ms (Views: 101.1ms | ActiveRecord: 0.5ms)  (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]] 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.4ms) 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" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 25ms (Views: 24.6ms | ActiveRecord: 0.5ms)  (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]] Processing by AdvertSelector::BannersController#show as HTML Parameters: {"id"=>"394627963"} Redirected to http://test.host/advert_selector/banners/394627963/edit Completed 302 Found in 0ms (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]] 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.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::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.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items"   (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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 18:40:30 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", nil], ["position", 1], ["updated_at", Thu, 27 Sep 2012 18:40:30 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 18:40:30 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 18:40:30 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position >= 1) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 18:40:30 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", "some_limit_helper_here"], ["position", 1], ["updated_at", Thu, 27 Sep 2012 18:40:30 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "updated_at" = '2012-09-27 18:40:30.920872', "content_for" = 'f' WHERE "advert_selector_helper_items"."id" = 960656442  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1) SQL (0.0ms) 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position > 2)  (0.1ms) UPDATE "advert_selector_helper_items" SET "updated_at" = '2012-09-27 18:40:30.922776', "position" = 11, "content_for" = 'f' WHERE "advert_selector_helper_items"."id" = 960656441  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 11)  (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]]  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement'  (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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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::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.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", 394627963]] 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 "conflicting_placements_array" = 'not_found,video', "updated_at" = '2012-09-27 18:40:30.934490' WHERE "advert_selector_placements"."id" = 718799085 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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 "conflicting_placements_array" = '', "updated_at" = '2012-09-27 18:40:30.936546' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE (LOWER(name) = 'parade') LIMIT 1 AdvertSelector::Placement Load (0.0ms) 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::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.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", 394627963]] 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.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", 394627963]] 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::Placement Load (0.0ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.1ms) 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.5ms) INSERT INTO "advert_selector_placements" ("conflicting_placements_array", "created_at", "name", "only_once_per_session", "updated_at") VALUES (?, ?, ?, ?, ?) [["conflicting_placements_array", nil], ["created_at", Thu, 27 Sep 2012 18:40:30 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Thu, 27 Sep 2012 18:40:30 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 1019730478 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/1019730478 Completed 302 Found in 4ms (ActiveRecord: 0.6ms)  (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::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 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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 3ms (ActiveRecord: 0.4ms)  (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::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  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/placements/_form.html.erb (15.3ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 23ms (Views: 22.0ms | ActiveRecord: 0.6ms)  (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::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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 8ms (Views: 7.5ms | 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::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 (12.5ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 19ms (Views: 18.2ms | ActiveRecord: 0.4ms)  (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::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 0ms (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::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 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/405688915 Completed 302 Found in 2ms (ActiveRecord: 0.2ms)  (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]]  (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]] Started GET "/" for 127.0.0.1 at Thu Sep 27 21:40:31 +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-09-27 18:40:31.059915' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 9ms (Views: 8.0ms | ActiveRecord: 0.3ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Thu Sep 27 21:40:31 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 2ms (Views: 2.3ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 21:55:31 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 3ms (Views: 2.4ms | 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]] Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 3ms (Views: 2.5ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 18:42:30', 100, '2012-10-02 00:00:00', 't', '2012-09-27 18:42:30', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 18:42:30', '2012-10-07 00:00:00', 't', '2012-09-27 18:42:30', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 18:42:30', '2012-09-27 18:42:30', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 18:42:30', '2012-09-27 18:42:30', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 18:42:30', '2012-09-27 18:42:30', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-27 18:42:30', '2012-09-27 18:42: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-09-27 18:42:30', '2012-09-27 18:42: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-09-27 18:42:30', '2012-09-27 18:42:30', 'parade', 405688915)  (45.8ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 18:42:30.356202' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 21:42:30 +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-09-27 18:42:30.369349' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (13.3ms) Completed 200 OK in 18ms (Views: 17.4ms | ActiveRecord: 0.4ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 21:42:30 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (1.5ms) Completed 200 OK in 3ms (Views: 2.4ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 21:57:30 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (1.6ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 18:42:30.407456' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 21:42:30 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 3ms (Views: 2.5ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 18:45:46', 100, '2012-10-02 00:00:00', 't', '2012-09-27 18:45:46', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 18:45:46', '2012-10-07 00:00:00', 't', '2012-09-27 18:45:46', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 18:45:46', '2012-09-27 18:45:46', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 18:45:46', '2012-09-27 18:45:46', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 18:45:46', '2012-09-27 18:45:46', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-27 18:45:46', '2012-09-27 18:45:46', '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-09-27 18:45:46', '2012-09-27 18:45:46', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 18:45:46', '2012-09-27 18:45:46', 'parade', 405688915)  (40.6ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 18:45:46.629327', "fast_mode" = 't' WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 21:45:46 +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-09-27 18:45:46.642614' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (13.4ms) Completed 200 OK in 18ms (Views: 17.6ms | ActiveRecord: 0.4ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 21:45:46 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (1.4ms) Completed 200 OK in 2ms (Views: 2.3ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 22:00:46 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (1.6ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.8ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 18:45:46.681304', "fast_mode" = 't' WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.3ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.1ms) RELEASE SAVEPOINT active_record_1 AdvertSelector::Placement Load (0.3ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = 405688915 LIMIT 1  (0.3ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 18:46:03', 100, '2012-10-02 00:00:00', 't', '2012-09-27 18:46:03', 50, 814558298, 1000, 'f', 0, '2012-09-22 00:00:00') Fixture Insert (0.0ms) 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-09-27 18:46:03', '2012-10-07 00:00:00', 't', '2012-09-27 18:46:03', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 18:46:03', '2012-09-27 18:46:03', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 18:46:03', '2012-09-27 18:46:03', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 18:46:03', '2012-09-27 18:46:03', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-27 18:46:03', '2012-09-27 18:46:03', '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-09-27 18:46:03', '2012-09-27 18:46:03', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 18:46:03', '2012-09-27 18:46:03', 'parade', 405688915)  (41.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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 18:46:03.616590' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 21:46:03 +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-09-27 18:46:03.629955' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (13.4ms) Completed 200 OK in 18ms (Views: 17.5ms | ActiveRecord: 0.4ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 21:46:03 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (1.4ms) Completed 200 OK in 3ms (Views: 2.4ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 22:01:03 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (1.5ms) Completed 200 OK in 3ms (Views: 2.5ms | 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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 18:46:03.667768' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.2ms) UPDATE "advert_selector_placements" SET "only_once_per_session" = 't', "updated_at" = '2012-09-27 18:46:03.670826' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 21:46:03 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 3ms (Views: 2.4ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 21:46:03 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 3ms (Views: 2.3ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 18:46:14', 100, '2012-10-02 00:00:00', 't', '2012-09-27 18:46:14', 50, 814558298, 1000, 'f', 0, '2012-09-22 00:00:00') Fixture Insert (0.0ms) 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-09-27 18:46:14', '2012-10-07 00:00:00', 't', '2012-09-27 18:46:14', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 18:46:14', '2012-09-27 18:46:14', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 18:46:14', '2012-09-27 18:46:14', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 18:46:14', '2012-09-27 18:46:14', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') Fixture Delete (0.2ms) 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-09-27 18:46:14', '2012-09-27 18:46:14', '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-09-27 18:46:14', '2012-09-27 18:46:14', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 18:46:14', '2012-09-27 18:46:14', 'parade', 405688915)  (85.8ms) 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.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 18:46:14.345964' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 21:46:14 +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-09-27 18:46:14.359104' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (13.3ms) Completed 200 OK in 18ms (Views: 17.5ms | ActiveRecord: 0.4ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 21:46:14 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (1.5ms) Completed 200 OK in 3ms (Views: 2.4ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 22:01:14 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (1.6ms) Completed 200 OK in 3ms (Views: 2.5ms | 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 18:46:14.397126' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 "only_once_per_session" = 't', "updated_at" = '2012-09-27 18:46:14.400226' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 21:46:14 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 3ms (Views: 2.5ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 21:46:14 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 2ms (Views: 2.3ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 18:46:50', 100, '2012-10-02 00:00:00', 't', '2012-09-27 18:46:50', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 18:46:50', '2012-10-07 00:00:00', 't', '2012-09-27 18:46:50', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 18:46:50', '2012-09-27 18:46:50', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 18:46:50', '2012-09-27 18:46:50', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 18:46:50', '2012-09-27 18:46:50', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') Fixture Delete (0.2ms) 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-09-27 18:46:50', '2012-09-27 18:46:50', '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-09-27 18:46:50', '2012-09-27 18:46:50', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 18:46:50', '2012-09-27 18:46:50', 'parade', 405688915)  (47.6ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 18:46:51.007330', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 21:46:51 +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-09-27 18:46:51.020526' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (13.2ms) Completed 200 OK in 18ms (Views: 17.4ms | ActiveRecord: 0.4ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 21:46:51 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (1.5ms) Completed 200 OK in 3ms (Views: 2.5ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 22:01:51 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (1.6ms) Completed 200 OK in 3ms (Views: 2.5ms | 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 18:46:51.058566', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.2ms) UPDATE "advert_selector_placements" SET "only_once_per_session" = 't', "updated_at" = '2012-09-27 18:46:51.061658' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 21:46:51 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 3ms (Views: 2.5ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 21:46:51 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 2ms (Views: 2.3ms | ActiveRecord: 0.0ms)  (0.3ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 18:47:32', 100, '2012-10-02 00:00:00', 't', '2012-09-27 18:47:32', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 18:47:32', '2012-10-07 00:00:00', 't', '2012-09-27 18:47:32', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 18:47:32', '2012-09-27 18:47:32', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 18:47:32', '2012-09-27 18:47:32', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 18:47:32', '2012-09-27 18:47:32', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-27 18:47:32', '2012-09-27 18:47:32', '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-09-27 18:47:32', '2012-09-27 18:47:32', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 18:47:32', '2012-09-27 18:47:32', 'parade', 405688915)  (476.1ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.9ms) 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]]  (0.1ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 18:47:33.302519' WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 21:47:33 +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-09-27 18:47:33.322931' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (12822.9ms) Completed 200 OK in 12830ms (Views: 12829.3ms | ActiveRecord: 0.5ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 21:47:46 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (11228.2ms) Completed 200 OK in 11232ms (Views: 11231.6ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 22:02:57 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (3261.2ms) Completed 200 OK in 3265ms (Views: 3264.7ms | ActiveRecord: 0.0ms)  (0.3ms) rollback transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.3ms) 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]]  (0.1ms) SAVEPOINT active_record_1  (0.7ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 18:48:00.683846' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 18:48:00.688608', "only_once_per_session" = 't' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 21:48:00 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized Completed 500 Internal Server Error in 3704ms  (0.2ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.3ms) 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-09-27 18:49:08', 100, '2012-10-02 00:00:00', 't', '2012-09-27 18:49:08', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 18:49:08', '2012-10-07 00:00:00', 't', '2012-09-27 18:49:08', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 18:49:08', '2012-09-27 18:49:08', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 18:49:08', '2012-09-27 18:49:08', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 18:49:08', '2012-09-27 18:49:08', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') Fixture Delete (0.1ms) DELETE FROM "advert_selector_placements" Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Parade', '2012-09-27 18:49:08', '2012-09-27 18:49:08', '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-09-27 18:49:08', '2012-09-27 18:49:08', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 18:49:08', '2012-09-27 18:49:08', 'parade', 405688915)  (103.5ms) commit transaction  (0.2ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 18:49:08.886459' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 21:49:08 +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-09-27 18:49:08.899458' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (6438.1ms) Completed 200 OK in 6445ms (Views: 6444.5ms | ActiveRecord: 0.5ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 21:49:15 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelector::Placement Load (0.4ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (19875.8ms) Completed 200 OK in 19880ms (Views: 19878.8ms | ActiveRecord: 0.4ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 22:04:35 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (7398.1ms) Completed 200 OK in 7402ms (Views: 7401.6ms | ActiveRecord: 0.0ms)  (0.3ms) rollback transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.3ms) 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]]  (0.1ms) SAVEPOINT active_record_1  (0.5ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 18:49:42.659978' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 18:49:42.664679', "only_once_per_session" = 't' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 21:49:42 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements Completed 500 Internal Server Error in 3ms  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 18:49:58', 100, '2012-10-02 00:00:00', 't', '2012-09-27 18:49:58', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 18:49:58', '2012-10-07 00:00:00', 't', '2012-09-27 18:49:58', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 18:49:58', '2012-09-27 18:49:58', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 18:49:58', '2012-09-27 18:49:58', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 18:49:58', '2012-09-27 18:49:58', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-27 18:49:58', '2012-09-27 18:49:58', '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-09-27 18:49:58', '2012-09-27 18:49:58', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 18:49:58', '2012-09-27 18:49:58', 'parade', 405688915)  (507.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.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 18:49:59.214860', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 21:49:59 +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-09-27 18:49:59.228115' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (13.7ms) Completed 200 OK in 19ms (Views: 18.0ms | ActiveRecord: 0.5ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 21:49:59 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (1.5ms) Completed 200 OK in 3ms (Views: 2.4ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 22:04:59 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (1.6ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 18:49:59.266718', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.2ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-09-27 18:49:59.269818', "only_once_per_session" = 't' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 AdvertSelector::Placement Load (0.4ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  Started GET "/" for 127.0.0.1 at Thu Sep 27 21:50:18 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements Completed 500 Internal Server Error in 11ms AdvertSelector::Placement Load (0.4ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" Started GET "/" for 127.0.0.1 at Thu Sep 27 21:50:28 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 8ms (Views: 7.8ms | ActiveRecord: 0.0ms) AdvertSelector::Placement Load (0.3ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  Started GET "/" for 127.0.0.1 at Thu Sep 27 21:50:32 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 9ms (Views: 8.6ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 21:50:32 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 2ms (Views: 2.2ms | ActiveRecord: 0.0ms) AdvertSelector::Placement Load (0.3ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  (0.4ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 18:51:14', 100, '2012-10-02 00:00:00', 't', '2012-09-27 18:51:14', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 18:51:14', '2012-10-07 00:00:00', 't', '2012-09-27 18:51:14', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 18:51:14', '2012-09-27 18:51:14', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 18:51:14', '2012-09-27 18:51:14', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 18:51:14', '2012-09-27 18:51:14', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') Fixture Delete (0.2ms) 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-09-27 18:51:14', '2012-09-27 18:51:14', '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-09-27 18:51:14', '2012-09-27 18:51:14', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 18:51:14', '2012-09-27 18:51:14', 'parade', 405688915)  (93.5ms) 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.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 18:51:14.960603' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 21:51:14 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements [AdvertSelector] AdvertSelector::Banner Load (0.5ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time > '2012-09-27 18:51:14.974278' OR end_time IS NULL) ORDER BY priority desc [AdvertSelector] AdvertSelector::Placement Load (0.3ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" IN (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (8808.3ms) Completed 200 OK in 8813ms (Views: 8812.0ms | ActiveRecord: 1.0ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 21:51:23 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (671.5ms) Completed 200 OK in 674ms (Views: 674.2ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 22:06:24 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (606.4ms) Completed 200 OK in 610ms (Views: 609.8ms | 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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 18:51:25.096125' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 18:51:25.099195', "only_once_per_session" = 't' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 21:51:25 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements Completed 500 Internal Server Error in 2003ms  (0.3ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 18:51:32', 100, '2012-10-02 00:00:00', 't', '2012-09-27 18:51:32', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 18:51:32', '2012-10-07 00:00:00', 't', '2012-09-27 18:51:32', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 18:51:32', '2012-09-27 18:51:32', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 18:51:32', '2012-09-27 18:51:32', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 18:51:32', '2012-09-27 18:51:32', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-27 18:51:32', '2012-09-27 18:51:32', '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-09-27 18:51:32', '2012-09-27 18:51:32', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 18:51:32', '2012-09-27 18:51:32', 'parade', 405688915)  (165.1ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 18:51:33.138070' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.1ms) 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.2ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-09-27 18:51:33.156575', "only_once_per_session" = 't' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 21:51:33 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelector::Placement Load (0.3ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" [AdvertSelector] AdvertSelection fetching banners and placements [AdvertSelector] AdvertSelector::Banner Load (0.6ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time > '2012-09-27 18:51:40.200638' OR end_time IS NULL) AND (start_time < '2012-09-27 19:51:40.201279' 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.4ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" IN (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.4ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (7056.9ms) Completed 200 OK in 7062ms (Views: 7059.9ms | ActiveRecord: 1.7ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 21:51:40 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (1610.5ms) Completed 200 OK in 1614ms (Views: 1613.4ms | ActiveRecord: 0.0ms)  (0.3ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 18:52:06', 100, '2012-10-02 00:00:00', 't', '2012-09-27 18:52:06', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 18:52:06', '2012-10-07 00:00:00', 't', '2012-09-27 18:52:06', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 18:52:06', '2012-09-27 18:52:06', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 18:52:06', '2012-09-27 18:52:06', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 18:52:06', '2012-09-27 18:52:06', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-27 18:52:06', '2012-09-27 18:52:06', '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-09-27 18:52:06', '2012-09-27 18:52:06', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 18:52:06', '2012-09-27 18:52:06', 'parade', 405688915)  (881.8ms) 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.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 18:52:07.542425', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.2ms) UPDATE "advert_selector_placements" SET "only_once_per_session" = 't', "updated_at" = '2012-09-27 18:52:07.560748' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 21:52:07 +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-09-27 18:52:07.574699' OR end_time IS NULL) AND (start_time < '2012-09-27 19:52:07.574890' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (8.5ms) Completed 200 OK in 13ms (Views: 12.7ms | ActiveRecord: 0.4ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 21:52:07 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (1.5ms) Completed 200 OK in 3ms (Views: 2.5ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 18:52:23', 100, '2012-10-02 00:00:00', 't', '2012-09-27 18:52:23', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 18:52:23', '2012-10-07 00:00:00', 't', '2012-09-27 18:52:23', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 18:52:23', '2012-09-27 18:52:23', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 18:52:23', '2012-09-27 18:52:23', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 18:52:23', '2012-09-27 18:52:23', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-27 18:52:23', '2012-09-27 18:52:23', '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-09-27 18:52:23', '2012-09-27 18:52:23', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 18:52:23', '2012-09-27 18:52:23', 'parade', 405688915)  (33.3ms) commit transaction  (0.3ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 18:52:23.683355' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 AdvertSelector::Placement Load (0.4ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = 405688915 LIMIT 1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_placements" SET "only_once_per_session" = 't', "updated_at" = '2012-09-27 18:52:23.711229' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 21:52:23 +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-09-27 18:52:23.726216' OR end_time IS NULL) AND (start_time < '2012-09-27 19:52:23.726417' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (8.9ms) Completed 200 OK in 14ms (Views: 13.4ms | ActiveRecord: 0.4ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 21:52:23 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelector::Placement Load (0.3ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (72430.1ms) Completed 200 OK in 72431ms (Views: 72430.9ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 18:53:46', 100, '2012-10-02 00:00:00', 't', '2012-09-27 18:53:46', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 18:53:46', '2012-10-07 00:00:00', 't', '2012-09-27 18:53:46', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 18:53:46', '2012-09-27 18:53:46', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 18:53:46', '2012-09-27 18:53:46', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 18:53:46', '2012-09-27 18:53:46', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') Fixture Delete (0.2ms) 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-09-27 18:53:46', '2012-09-27 18:53:46', '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-09-27 18:53:46', '2012-09-27 18:53:46', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 18:53:46', '2012-09-27 18:53:46', 'parade', 405688915)  (190.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.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 18:53:47.058930', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.2ms) UPDATE "advert_selector_placements" SET "only_once_per_session" = 't', "updated_at" = '2012-09-27 18:53:47.077269' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 21:53:47 +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-09-27 18:53:47.091380' OR end_time IS NULL) AND (start_time < '2012-09-27 19:53:47.091572' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (8.5ms) Completed 200 OK in 14ms (Views: 12.9ms | ActiveRecord: 0.4ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 21:54:14 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (5.3ms) Completed 200 OK in 9ms (Views: 8.7ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 18:54:18', 100, '2012-10-02 00:00:00', 't', '2012-09-27 18:54:18', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 18:54:18', '2012-10-07 00:00:00', 't', '2012-09-27 18:54:18', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 18:54:18', '2012-09-27 18:54:18', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 18:54:18', '2012-09-27 18:54:18', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 18:54:18', '2012-09-27 18:54:18', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-27 18:54:18', '2012-09-27 18:54:18', '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-09-27 18:54:18', '2012-09-27 18:54:18', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 18:54:18', '2012-09-27 18:54:18', 'parade', 405688915)  (120.1ms) 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.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 18:54:18.944835', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.1ms) 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.2ms) UPDATE "advert_selector_placements" SET "only_once_per_session" = 't', "updated_at" = '2012-09-27 18:54:18.963784' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 21:54:18 +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-09-27 18:54:18.979028' OR end_time IS NULL) AND (start_time < '2012-09-27 19:54:18.979218' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (8.5ms) Completed 200 OK in 14ms (Views: 12.8ms | ActiveRecord: 0.4ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 21:54:30 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (5.3ms) Completed 200 OK in 9ms (Views: 8.6ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 18:54:35', 100, '2012-10-02 00:00:00', 't', '2012-09-27 18:54:35', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 18:54:35', '2012-10-07 00:00:00', 't', '2012-09-27 18:54:35', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 18:54:35', '2012-09-27 18:54:35', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 18:54:35', '2012-09-27 18:54:35', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 18:54:35', '2012-09-27 18:54:35', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') Fixture Delete (0.2ms) 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-09-27 18:54:35', '2012-09-27 18:54:35', '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-09-27 18:54:35', '2012-09-27 18:54:35', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 18:54:35', '2012-09-27 18:54:35', 'parade', 405688915)  (52.3ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.5ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 18:54:35.552021' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.2ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-09-27 18:54:35.570312', "only_once_per_session" = 't' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 21:54:35 +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-09-27 18:54:35.584321' OR end_time IS NULL) AND (start_time < '2012-09-27 19:54:35.584513' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (8.1ms) Completed 200 OK in 13ms (Views: 12.5ms | ActiveRecord: 0.4ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 21:54:59 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (5.5ms) Completed 200 OK in 9ms (Views: 8.9ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 18:55:17', 100, '2012-10-02 00:00:00', 't', '2012-09-27 18:55:17', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 18:55:17', '2012-10-07 00:00:00', 't', '2012-09-27 18:55:17', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 18:55:17', '2012-09-27 18:55:17', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 18:55:17', '2012-09-27 18:55:17', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 18:55:17', '2012-09-27 18:55:17', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') Fixture Delete (0.2ms) 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-09-27 18:55:17', '2012-09-27 18:55:17', 'leaderboard,video', 718799085) Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "only_once_per_session", "id") VALUES ('Video', '2012-09-27 18:55:17', '2012-09-27 18:55:17', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 18:55:17', '2012-09-27 18:55:17', 'parade', 405688915)  (240.5ms) commit transaction  (0.0ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 18:55:18.040879' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.2ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-09-27 18:55:18.059200', "only_once_per_session" = 't' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 21:55:18 +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-09-27 18:55:18.073238' OR end_time IS NULL) AND (start_time < '2012-09-27 19:55:18.073432' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (8.3ms) Completed 200 OK in 13ms (Views: 12.6ms | ActiveRecord: 0.4ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 21:55:19 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized Rendered examples/index.html.erb within layouts/application (2.0ms) Completed 200 OK in 6ms (Views: 5.4ms | ActiveRecord: 0.0ms)  (0.4ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 18:57:24', 100, '2012-10-02 00:00:00', 't', '2012-09-27 18:57:24', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 18:57:24', '2012-10-07 00:00:00', 't', '2012-09-27 18:57:24', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 18:57:24', '2012-09-27 18:57:24', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 18:57:24', '2012-09-27 18:57:24', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 18:57:24', '2012-09-27 18:57:24', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-27 18:57:24', '2012-09-27 18:57:24', '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-09-27 18:57:24', '2012-09-27 18:57:24', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 18:57:24', '2012-09-27 18:57:24', 'parade', 405688915)  (39.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.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 18:57:24.261041', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.2ms) UPDATE "advert_selector_placements" SET "only_once_per_session" = 't', "updated_at" = '2012-09-27 18:57:24.279899' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 21:57:24 +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-09-27 18:57:24.293881' OR end_time IS NULL) AND (start_time < '2012-09-27 19:57:24.294074' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position Rendered examples/index.html.erb within layouts/application (8.1ms) Completed 200 OK in 14ms (Views: 13.0ms | ActiveRecord: 0.5ms)  (0.3ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 18:57:35', 100, '2012-10-02 00:00:00', 't', '2012-09-27 18:57:35', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 18:57:35', '2012-10-07 00:00:00', 't', '2012-09-27 18:57:35', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 18:57:35', '2012-09-27 18:57:35', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 18:57:35', '2012-09-27 18:57:35', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 18:57:35', '2012-09-27 18:57:35', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-27 18:57:35', '2012-09-27 18:57:35', '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-09-27 18:57:35', '2012-09-27 18:57:35', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 18:57:35', '2012-09-27 18:57:35', 'parade', 405688915)  (32.2ms) commit transaction  (0.2ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 18:57:35.723699', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.2ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-09-27 18:57:35.742332', "only_once_per_session" = 't' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 21:57:35 +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-09-27 18:57:35.756539' OR end_time IS NULL) AND (start_time < '2012-09-27 19:57:35.756735' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (8.6ms) Completed 200 OK in 14ms (Views: 13.0ms | ActiveRecord: 0.4ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 21:59:13 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized Rendered examples/index.html.erb within layouts/application (2.2ms) Completed 200 OK in 6ms (Views: 5.5ms | ActiveRecord: 0.0ms)  (0.4ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.3ms) 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-09-27 18:59:16', 100, '2012-10-02 00:00:00', 't', '2012-09-27 18:59:16', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 18:59:16', '2012-10-07 00:00:00', 't', '2012-09-27 18:59:16', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 18:59:16', '2012-09-27 18:59:16', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 18:59:16', '2012-09-27 18:59:16', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 18:59:16', '2012-09-27 18:59:16', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-27 18:59:16', '2012-09-27 18:59:16', '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-09-27 18:59:16', '2012-09-27 18:59:16', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 18:59:16', '2012-09-27 18:59:16', 'parade', 405688915)  (714.6ms) commit transaction  (0.2ms) begin transaction AdvertSelector::Banner Load (0.3ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 18:59:17.631205' WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.1ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 18:59:17.658034' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 21:59:17 +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-09-27 18:59:17.660553' OR end_time IS NULL) ORDER BY priority desc [AdvertSelector] AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" IN (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 10894ms (Views: 10893.4ms | ActiveRecord: 0.6ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 21:59:28 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 1312ms (Views: 1311.2ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 22:14:29 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements [AdvertSelector] AdvertSelector::Banner Load (0.5ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 19882ms (Views: 19880.6ms | ActiveRecord: 0.5ms)  (0.3ms) rollback transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.3ms) 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]]  (0.1ms) SAVEPOINT active_record_1  (0.9ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 18:59:49.782124' WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.4ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.1ms) 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.2ms) UPDATE "advert_selector_placements" SET "only_once_per_session" = 't', "updated_at" = '2012-09-27 18:59:49.791225' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 21:59:49 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements Completed 500 Internal Server Error in 3ms  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 18:59:56', 100, '2012-10-02 00:00:00', 't', '2012-09-27 18:59:56', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 18:59:56', '2012-10-07 00:00:00', 't', '2012-09-27 18:59:56', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 18:59:56', '2012-09-27 18:59:56', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 18:59:56', '2012-09-27 18:59:56', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 18:59:56', '2012-09-27 18:59:56', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') Fixture Delete (0.2ms) 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-09-27 18:59:56', '2012-09-27 18:59:56', '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-09-27 18:59:56', '2012-09-27 18:59:56', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 18:59:56', '2012-09-27 18:59:56', 'parade', 405688915)  (46.8ms) commit transaction  (0.2ms) 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]]  (0.1ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 18:59:56.610806', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 18:59:56.627810', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 21:59:56 +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-09-27 18:59:56.629779' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position Completed 200 OK in 18ms (Views: 17.0ms | 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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 18:59:56.658752', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 "only_once_per_session" = 't', "updated_at" = '2012-09-27 18:59:56.661802' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 21:59:56 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements Completed 200 OK in 2ms (Views: 1.5ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 19:00:08', 100, '2012-10-02 00:00:00', 't', '2012-09-27 19:00:08', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 19:00:08', '2012-10-07 00:00:00', 't', '2012-09-27 19:00:08', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 19:00:08', '2012-09-27 19:00:08', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 19:00:08', '2012-09-27 19:00:08', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 19:00:08', '2012-09-27 19:00:08', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') Fixture Delete (0.2ms) 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-09-27 19:00:08', '2012-09-27 19:00:08', '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-09-27 19:00:08', '2012-09-27 19:00:08', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 19:00:08', '2012-09-27 19:00:08', 'parade', 405688915)  (37.0ms) commit 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]]  (0.0ms) SAVEPOINT active_record_1  (1.1ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 19:00:08.718221' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 19:00:08.740310' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 22:00:08 +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-09-27 19:00:08.742315' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position Completed 200 OK in 18ms (Views: 17.1ms | 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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 19:00:08.771202' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.2ms) UPDATE "advert_selector_placements" SET "only_once_per_session" = 't', "updated_at" = '2012-09-27 19:00:08.774211' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 22:00:08 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements Completed 200 OK in 2ms (Views: 1.4ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 19:00:24', 100, '2012-10-02 00:00:00', 't', '2012-09-27 19:00:24', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 19:00:24', '2012-10-07 00:00:00', 't', '2012-09-27 19:00:24', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 19:00:24', '2012-09-27 19:00:24', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 19:00:24', '2012-09-27 19:00:24', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 19:00:24', '2012-09-27 19:00:24', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') Fixture Delete (0.2ms) 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-09-27 19:00:24', '2012-09-27 19:00:24', '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-09-27 19:00:24', '2012-09-27 19:00:24', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 19:00:24', '2012-09-27 19:00:24', 'parade', 405688915)  (33.5ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 19:00:24.617095', "fast_mode" = 't' WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 19:00:24.634936', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 19:00:24.640743', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 19:00:34', 100, '2012-10-02 00:00:00', 't', '2012-09-27 19:00:34', 50, 814558298, 1000, 'f', 0, '2012-09-22 00:00:00') Fixture Insert (0.0ms) 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-09-27 19:00:34', '2012-10-07 00:00:00', 't', '2012-09-27 19:00:34', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 19:00:34', '2012-09-27 19:00:34', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 19:00:34', '2012-09-27 19:00:34', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 19:00:34', '2012-09-27 19:00:34', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-27 19:00:34', '2012-09-27 19:00:34', '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-09-27 19:00:34', '2012-09-27 19:00:34', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 19:00:34', '2012-09-27 19:00:34', 'parade', 405688915)  (551.8ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 19:00:35.479490', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 19:00:35.496159', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 19:00:39', 100, '2012-10-02 00:00:00', 't', '2012-09-27 19:00:39', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 19:00:39', '2012-10-07 00:00:00', 't', '2012-09-27 19:00:39', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 19:00:39', '2012-09-27 19:00:39', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 19:00:39', '2012-09-27 19:00:39', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 19:00:39', '2012-09-27 19:00:39', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-27 19:00:39', '2012-09-27 19:00:39', '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-09-27 19:00:39', '2012-09-27 19:00:39', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 19:00:39', '2012-09-27 19:00:39', 'parade', 405688915)  (181.6ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.7ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 19:00:39.872012' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 19:00:39.888889' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 19:01:00', 100, '2012-10-02 00:00:00', 't', '2012-09-27 19:01:00', 50, 814558298, 1000, 'f', 0, '2012-09-22 00:00:00') Fixture Insert (0.0ms) 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-09-27 19:01:00', '2012-10-07 00:00:00', 't', '2012-09-27 19:01:00', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 19:01:00', '2012-09-27 19:01:00', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 19:01:00', '2012-09-27 19:01:00', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 19:01:00', '2012-09-27 19:01:00', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-27 19:01:00', '2012-09-27 19:01:00', '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-09-27 19:01:00', '2012-09-27 19:01:00', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 19:01:00', '2012-09-27 19:01:00', 'parade', 405688915)  (55.0ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 19:01:00.319168', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 19:01:00.332846' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 22:01: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-09-27 19:01:00.334814' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (13.5ms) Completed 200 OK in 19ms (Views: 17.8ms | ActiveRecord: 0.5ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 22:01:00 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (1.3ms) Completed 200 OK in 2ms (Views: 2.3ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 22:16: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 Rendered examples/index.html.erb within layouts/application (1.4ms) Completed 200 OK in 2ms (Views: 2.3ms | 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 19:01:00.372739', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 19:01:00.374838' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.2ms) UPDATE "advert_selector_placements" SET "only_once_per_session" = 't', "updated_at" = '2012-09-27 19:01:00.377575' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 22:01:00 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements Completed 500 Internal Server Error in 3ms  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 19:01:18', 100, '2012-10-02 00:00:00', 't', '2012-09-27 19:01:18', 50, 814558298, 1000, 'f', 0, '2012-09-22 00:00:00') Fixture Insert (0.0ms) 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-09-27 19:01:18', '2012-10-07 00:00:00', 't', '2012-09-27 19:01:18', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 19:01:18', '2012-09-27 19:01:18', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 19:01:18', '2012-09-27 19:01:18', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 19:01:18', '2012-09-27 19:01:18', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-27 19:01:18', '2012-09-27 19:01:18', '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-09-27 19:01:18', '2012-09-27 19:01:18', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 19:01:18', '2012-09-27 19:01:18', 'parade', 405688915)  (46.2ms) commit transaction  (0.0ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 19:01:18.725310' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 22:01:18 +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-09-27 19:01:18.738628' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (13.4ms) Completed 200 OK in 18ms (Views: 17.6ms | ActiveRecord: 0.4ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 22:01:18 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (1.5ms) Completed 200 OK in 3ms (Views: 2.4ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 22:16:18 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (1.6ms) Completed 200 OK in 3ms (Views: 2.5ms | 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 19:01:18.777074' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 19:01:18.780224', "only_once_per_session" = 't' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 22:01:18 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements Completed 500 Internal Server Error in 3ms  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 19:02:04', 100, '2012-10-02 00:00:00', 't', '2012-09-27 19:02:04', 50, 814558298, 1000, 'f', 0, '2012-09-22 00:00:00') Fixture Insert (0.0ms) 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-09-27 19:02:04', '2012-10-07 00:00:00', 't', '2012-09-27 19:02:04', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 19:02:04', '2012-09-27 19:02:04', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 19:02:04', '2012-09-27 19:02:04', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 19:02:04', '2012-09-27 19:02:04', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-27 19:02:04', '2012-09-27 19:02:04', '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-09-27 19:02:04', '2012-09-27 19:02:04', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 19:02:04', '2012-09-27 19:02:04', 'parade', 405688915)  (37.6ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 19:02:04.818158' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 22:02:04 +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-09-27 19:02:04.831526' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (13.2ms) Completed 200 OK in 18ms (Views: 17.2ms | ActiveRecord: 0.4ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 22:02:04 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (1.5ms) Completed 200 OK in 3ms (Views: 2.4ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 22:17:04 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (1.5ms) Completed 200 OK in 3ms (Views: 2.4ms | 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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 19:02:04.868909' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 19:02:04.871985', "only_once_per_session" = 't' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 22:02:04 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements Completed 500 Internal Server Error in 3ms  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 19:02:17', 100, '2012-10-02 00:00:00', 't', '2012-09-27 19:02:17', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 19:02:17', '2012-10-07 00:00:00', 't', '2012-09-27 19:02:17', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 19:02:17', '2012-09-27 19:02:17', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 19:02:17', '2012-09-27 19:02:17', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 19:02:17', '2012-09-27 19:02:17', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') Fixture Delete (0.2ms) 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-09-27 19:02:17', '2012-09-27 19:02:17', '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-09-27 19:02:17', '2012-09-27 19:02:17', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 19:02:17', '2012-09-27 19:02:17', 'parade', 405688915)  (42.9ms) commit transaction  (0.2ms) begin transaction AdvertSelector::Banner Load (0.7ms) 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]]  (0.1ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 19:02:17.711484' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 22:02:17 +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-09-27 19:02:17.726644' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (13.6ms) Completed 200 OK in 19ms (Views: 17.8ms | ActiveRecord: 0.4ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 22:02:17 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (1.5ms) Completed 200 OK in 3ms (Views: 2.4ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 22:17:17 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (1.5ms) Completed 200 OK in 3ms (Views: 2.5ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 19:02:33', 100, '2012-10-02 00:00:00', 't', '2012-09-27 19:02:33', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 19:02:33', '2012-10-07 00:00:00', 't', '2012-09-27 19:02:33', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 19:02:33', '2012-09-27 19:02:33', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 19:02:33', '2012-09-27 19:02:33', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 19:02:33', '2012-09-27 19:02:33', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-27 19:02:33', '2012-09-27 19:02:33', '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-09-27 19:02:33', '2012-09-27 19:02:33', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 19:02:33', '2012-09-27 19:02:33', 'parade', 405688915)  (43.1ms) 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.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 19:02:33.163286' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.2ms) UPDATE "advert_selector_placements" SET "only_once_per_session" = 't', "updated_at" = '2012-09-27 19:02:33.181863' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 22:02:33 +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-09-27 19:02:33.195732' OR end_time IS NULL) AND (start_time < '2012-09-27 20:02:33.195935' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (8.3ms) Completed 200 OK in 13ms (Views: 12.5ms | ActiveRecord: 0.4ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 22:02:33 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized Rendered examples/index.html.erb within layouts/application (0.5ms) Completed 200 OK in 2ms (Views: 1.4ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 19:02:37', 100, '2012-10-02 00:00:00', 't', '2012-09-27 19:02:37', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 19:02:37', '2012-10-07 00:00:00', 't', '2012-09-27 19:02:37', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 19:02:37', '2012-09-27 19:02:37', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 19:02:37', '2012-09-27 19:02:37', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 19:02:37', '2012-09-27 19:02:37', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') Fixture Delete (0.2ms) 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-09-27 19:02:37', '2012-09-27 19:02:37', '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-09-27 19:02:37', '2012-09-27 19:02:37', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 19:02:37', '2012-09-27 19:02:37', 'parade', 405688915)  (118.7ms) commit transaction  (0.2ms) 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.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 19:02:37.207917', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 22:02:37 +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-09-27 19:02:37.221151' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (13.2ms) Completed 200 OK in 18ms (Views: 17.3ms | ActiveRecord: 0.5ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 22:02:37 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (1.5ms) Completed 200 OK in 3ms (Views: 2.4ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 22:17:37 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (1.6ms) Completed 200 OK in 3ms (Views: 2.5ms | 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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 19:02:37.258843', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.2ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-09-27 19:02:37.261988', "only_once_per_session" = 't' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 22:02:37 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements Completed 500 Internal Server Error in 3ms  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 19:03:48', 100, '2012-10-02 00:00:00', 't', '2012-09-27 19:03:48', 50, 814558298, 1000, 'f', 0, '2012-09-22 00:00:00') Fixture Insert (0.0ms) 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-09-27 19:03:48', '2012-10-07 00:00:00', 't', '2012-09-27 19:03:48', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 19:03:48', '2012-09-27 19:03:48', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 19:03:48', '2012-09-27 19:03:48', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 19:03:48', '2012-09-27 19:03:48', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') Fixture Delete (0.2ms) DELETE FROM "advert_selector_placements" Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Parade', '2012-09-27 19:03:48', '2012-09-27 19:03:48', '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-09-27 19:03:48', '2012-09-27 19:03:48', 'parade', 't', 1019730477) Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 19:03:48', '2012-09-27 19:03:48', 'parade', 405688915)  (173.6ms) commit transaction  (0.1ms) begin transaction  (0.3ms) begin transaction SQLite3::SQLException: cannot start a transaction within a transaction: begin transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 19:03:57', 100, '2012-10-02 00:00:00', 't', '2012-09-27 19:03:57', 50, 814558298, 1000, 'f', 0, '2012-09-22 00:00:00') Fixture Insert (0.0ms) 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-09-27 19:03:57', '2012-10-07 00:00:00', 't', '2012-09-27 19:03:57', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 19:03:57', '2012-09-27 19:03:57', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 19:03:57', '2012-09-27 19:03:57', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 19:03:57', '2012-09-27 19:03:57', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-27 19:03:57', '2012-09-27 19:03:57', '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-09-27 19:03:57', '2012-09-27 19:03:57', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 19:03:57', '2012-09-27 19:03:57', 'parade', 405688915)  (417.4ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 19:03:58.397503', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 22:03:58 +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-09-27 19:03:58.410732' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (13.5ms) Completed 200 OK in 18ms (Views: 17.6ms | ActiveRecord: 0.4ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 22:03:58 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (1.4ms) Completed 200 OK in 2ms (Views: 2.4ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 22:18:58 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (1.5ms) Completed 200 OK in 3ms (Views: 2.4ms | ActiveRecord: 0.0ms)  (0.1ms) begin transaction SQLite3::SQLException: cannot start a transaction within a transaction: begin transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 19:06:11', 100, '2012-10-02 00:00:00', 't', '2012-09-27 19:06:11', 50, 814558298, 1000, 'f', 0, '2012-09-22 00:00:00') Fixture Insert (0.0ms) 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-09-27 19:06:11', '2012-10-07 00:00:00', 't', '2012-09-27 19:06:11', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 19:06:11', '2012-09-27 19:06:11', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 19:06:11', '2012-09-27 19:06:11', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 19:06:11', '2012-09-27 19:06:11', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-27 19:06:11', '2012-09-27 19:06:11', '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-09-27 19:06:11', '2012-09-27 19:06:11', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 19:06:11', '2012-09-27 19:06:11', 'parade', 405688915)  (44.5ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 19:06:11.693050', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 22:06:11 +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-09-27 19:06:11.706445' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (13.6ms) Completed 200 OK in 19ms (Views: 17.8ms | ActiveRecord: 0.4ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 22:06:11 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (1.5ms) Completed 200 OK in 3ms (Views: 2.4ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 22:21:11 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (1.6ms) Completed 200 OK in 3ms (Views: 2.5ms | 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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 19:06:11.744903', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 "only_once_per_session" = 't', "updated_at" = '2012-09-27 19:06:11.747991' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 22:06:11 +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-09-27 19:06:11.752056' OR end_time IS NULL) AND (start_time < '2012-09-27 20:06:11.752245' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 6ms (Views: 5.2ms | ActiveRecord: 0.3ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 22:06:11 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized Completed 200 OK in 1ms (Views: 1.3ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 19:06:18', 100, '2012-10-02 00:00:00', 't', '2012-09-27 19:06:18', 50, 814558298, 1000, 'f', 0, '2012-09-22 00:00:00') Fixture Insert (0.0ms) 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-09-27 19:06:18', '2012-10-07 00:00:00', 't', '2012-09-27 19:06:18', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 19:06:18', '2012-09-27 19:06:18', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 19:06:18', '2012-09-27 19:06:18', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 19:06:18', '2012-09-27 19:06:18', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-27 19:06:18', '2012-09-27 19:06:18', '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-09-27 19:06:18', '2012-09-27 19:06:18', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 19:06:18', '2012-09-27 19:06:18', 'parade', 405688915)  (37.4ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.7ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 19:06:18.513296' WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 22:06:18 +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-09-27 19:06:18.526752' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (13.2ms) Completed 200 OK in 18ms (Views: 17.3ms | ActiveRecord: 0.4ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 22:06:18 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (1.4ms) Completed 200 OK in 3ms (Views: 2.4ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 22:21:18 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (1.5ms) Completed 200 OK in 3ms (Views: 2.4ms | 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 19:06:18.565207' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 19:06:18.568296', "only_once_per_session" = 't' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 22:06:18 +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-09-27 19:06:18.572226' OR end_time IS NULL) AND (start_time < '2012-09-27 20:06:18.572400' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 6ms (Views: 5.1ms | ActiveRecord: 0.3ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 22:06:18 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized Completed 200 OK in 1ms (Views: 1.3ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 19:07:01', 100, '2012-10-02 00:00:00', 't', '2012-09-27 19:07:01', 50, 814558298, 1000, 'f', 0, '2012-09-22 00:00:00') Fixture Insert (0.0ms) 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-09-27 19:07:01', '2012-10-07 00:00:00', 't', '2012-09-27 19:07:01', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 19:07:01', '2012-09-27 19:07:01', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 19:07:01', '2012-09-27 19:07:01', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 19:07:01', '2012-09-27 19:07:01', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-27 19:07:01', '2012-09-27 19:07:01', '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-09-27 19:07:01', '2012-09-27 19:07:01', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 19:07:01', '2012-09-27 19:07:01', 'parade', 405688915)  (308.5ms) commit transaction  (0.0ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 19:07:02.240507' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 19:07:02.258051' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 19:07:08', 100, '2012-10-02 00:00:00', 't', '2012-09-27 19:07:08', 50, 814558298, 1000, 'f', 0, '2012-09-22 00:00:00') Fixture Insert (0.0ms) 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-09-27 19:07:08', '2012-10-07 00:00:00', 't', '2012-09-27 19:07:08', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 19:07:08', '2012-09-27 19:07:08', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 19:07:08', '2012-09-27 19:07:08', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 19:07:08', '2012-09-27 19:07:08', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') Fixture Delete (0.2ms) 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-09-27 19:07:08', '2012-09-27 19:07:08', '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-09-27 19:07:08', '2012-09-27 19:07:08', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 19:07:08', '2012-09-27 19:07:08', 'parade', 405688915)  (37.9ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 19:07:08.371259' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 19:07:08.385254', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 22:07:08 +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-09-27 19:07:08.387192' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (13.5ms) Completed 200 OK in 18ms (Views: 17.7ms | ActiveRecord: 0.4ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 22:07:08 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (1.4ms) Completed 200 OK in 3ms (Views: 2.4ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 22:22:08 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (1.5ms) Completed 200 OK in 3ms (Views: 2.5ms | 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 19:07:08.426046' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 19:07:08.428110', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 "only_once_per_session" = 't', "updated_at" = '2012-09-27 19:07:08.430812' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 22:07:08 +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-09-27 19:07:08.434969' OR end_time IS NULL) AND (start_time < '2012-09-27 20:07:08.435151' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 5ms (Views: 5.0ms | ActiveRecord: 0.3ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 22:07:08 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized Completed 200 OK in 1ms (Views: 1.3ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 19:07:27', 100, '2012-10-02 00:00:00', 't', '2012-09-27 19:07:27', 50, 814558298, 1000, 'f', 0, '2012-09-22 00:00:00') Fixture Insert (0.0ms) 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-09-27 19:07:27', '2012-10-07 00:00:00', 't', '2012-09-27 19:07:27', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 19:07:27', '2012-09-27 19:07:27', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 19:07:27', '2012-09-27 19:07:27', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 19:07:27', '2012-09-27 19:07:27', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-27 19:07:27', '2012-09-27 19:07:27', '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-09-27 19:07:27', '2012-09-27 19:07:27', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 19:07:27', '2012-09-27 19:07:27', 'parade', 405688915)  (48.1ms) commit transaction  (0.2ms) 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.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]]  (0.1ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 19:07:27.123292', "fast_mode" = 't' WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "confirmed" = 'f', "updated_at" = '2012-09-27 19:07:27.145915' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 19:07:27.148940' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 22:07:27 +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-09-27 19:07:27.170055' OR end_time IS NULL) AND (start_time < '2012-09-27 20:07:27.170359' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (19.1ms) Completed 200 OK in 27ms (Views: 25.9ms | ActiveRecord: 0.6ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 22:07:27 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (1.7ms) Completed 200 OK in 3ms (Views: 2.8ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 22:07:27 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (1.7ms) Completed 200 OK in 3ms (Views: 2.8ms | 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]]  (0.1ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 19:07:27.202265', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 19:07:27.204819' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 22:07:27 +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-09-27 19:07:27.206485' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 6ms (Views: 5.4ms | ActiveRecord: 0.4ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 22:07:27 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 3ms (Views: 3.3ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 22:22:27 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 2ms (Views: 2.3ms | 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]]  (0.1ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 19:07:27.228624', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 19:07:27.230862' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 19:07:27.233583', "only_once_per_session" = 't' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 22:07:27 +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-09-27 19:07:27.237643' OR end_time IS NULL) AND (start_time < '2012-09-27 20:07:27.237831' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 7ms (Views: 6.4ms | ActiveRecord: 0.6ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 22:07:27 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized Completed 200 OK in 1ms (Views: 1.3ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 19:07:37', 100, '2012-10-02 00:00:00', 't', '2012-09-27 19:07:37', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 19:07:37', '2012-10-07 00:00:00', 't', '2012-09-27 19:07:37', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 19:07:37', '2012-09-27 19:07:37', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 19:07:37', '2012-09-27 19:07:37', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 19:07:37', '2012-09-27 19:07:37', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-27 19:07:37', '2012-09-27 19:07:37', '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-09-27 19:07:37', '2012-09-27 19:07:37', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 19:07:37', '2012-09-27 19:07:37', 'parade', 405688915)  (285.7ms) commit transaction  (0.0ms) begin transaction AdvertSelector::Banner Load (0.3ms) 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]]  (0.1ms) SAVEPOINT active_record_1  (0.5ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 19:07:37.600020' WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "confirmed" = 'f', "updated_at" = '2012-09-27 19:07:37.625127' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 19:07:37.628195' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 22:07:37 +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-09-27 19:07:37.646126' OR end_time IS NULL) AND (start_time < '2012-09-27 20:07:37.646350' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (15.3ms) Completed 200 OK in 21ms (Views: 20.1ms | ActiveRecord: 0.5ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 22:07:37 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (1.5ms) Completed 200 OK in 3ms (Views: 2.4ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 22:07:37 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (1.4ms) Completed 200 OK in 3ms (Views: 2.4ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 19:07:42', 100, '2012-10-02 00:00:00', 't', '2012-09-27 19:07:42', 50, 814558298, 1000, 'f', 0, '2012-09-22 00:00:00') Fixture Insert (0.0ms) 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-09-27 19:07:42', '2012-10-07 00:00:00', 't', '2012-09-27 19:07:42', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 19:07:42', '2012-09-27 19:07:42', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 19:07:42', '2012-09-27 19:07:42', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 19:07:42', '2012-09-27 19:07:42', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') Fixture Delete (0.2ms) 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-09-27 19:07:42', '2012-09-27 19:07:42', '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-09-27 19:07:42', '2012-09-27 19:07:42', 'parade', 't', 1019730477) Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 19:07:42', '2012-09-27 19:07:42', 'parade', 405688915)  (207.8ms) commit transaction  (0.0ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 19:07:43.071650', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 19:07:43.090504', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 19:07:43.092602', "frequency" = 2 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 22:07:43 +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-09-27 19:07:43.109785' OR end_time IS NULL) AND (start_time < '2012-09-27 20:07:43.110334' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (360557.4ms) Completed 200 OK in 360564ms (Views: 360563.2ms | ActiveRecord: 0.5ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 22:13:43 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (690.3ms) Completed 200 OK in 694ms (Views: 693.3ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 22:13:44 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (559.0ms) Completed 200 OK in 562ms (Views: 561.8ms | ActiveRecord: 0.0ms)  (0.5ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.3ms) 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-09-27 19:13:47', 100, '2012-10-02 00:00:00', 't', '2012-09-27 19:13:47', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 19:13:47', '2012-10-07 00:00:00', 't', '2012-09-27 19:13:47', 100, 394627963, 1000, 't', 0, '2012-09-27 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", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 19:13:47', '2012-09-27 19:13:47', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 19:13:47', '2012-09-27 19:13:47', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 19:13:47', '2012-09-27 19:13:47', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') Fixture Delete (0.2ms) DELETE FROM "advert_selector_placements" Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Parade', '2012-09-27 19:13:47', '2012-09-27 19:13:47', '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-09-27 19:13:47', '2012-09-27 19:13:47', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 19:13:47', '2012-09-27 19:13:47', 'parade', 405688915)  (46.2ms) commit transaction  (0.0ms) begin transaction AdvertSelector::Banner Load (0.3ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 19:13:47.589692' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "confirmed" = 'f', "updated_at" = '2012-09-27 19:13:47.605274' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 19:13:47.607698' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 22:13:47 +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-09-27 19:13:47.622334' OR end_time IS NULL) AND (start_time < '2012-09-27 20:13:47.622559' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (149443.7ms) Completed 200 OK in 149451ms (Views: 149450.4ms | ActiveRecord: 0.5ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 22:16:17 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (54693.7ms) Completed 200 OK in 54697ms (Views: 54696.4ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 22:17:11 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized Rendered examples/index.html.erb within layouts/application (1.6ms) Completed 200 OK in 5ms (Views: 4.7ms | ActiveRecord: 0.0ms)  (0.2ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 19:17:42', 100, '2012-10-02 00:00:00', 't', '2012-09-27 19:17:42', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 19:17:42', '2012-10-07 00:00:00', 't', '2012-09-27 19:17:42', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 19:17:42', '2012-09-27 19:17:42', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 19:17:42', '2012-09-27 19:17:42', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 19:17:42', '2012-09-27 19:17:42', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-27 19:17:42', '2012-09-27 19:17:42', '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-09-27 19:17:42', '2012-09-27 19:17:42', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 19:17:42', '2012-09-27 19:17:42', 'parade', 405688915)  (40.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.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 19:17:42.175373', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 19:17:42.188879', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 19:17:42.190892', "frequency" = 2 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 22:17:42 +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-09-27 19:17:42.203538' OR end_time IS NULL) AND (start_time < '2012-09-27 20:17:42.203731' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (14.2ms) Completed 200 OK in 19ms (Views: 18.3ms | ActiveRecord: 0.4ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 22:21:52 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (5.6ms) Completed 200 OK in 9ms (Views: 8.9ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 22:22:07 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (5.6ms) Completed 200 OK in 9ms (Views: 9.0ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 22:22:07 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (1.6ms) Completed 200 OK in 3ms (Views: 2.6ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 19:22:59', 100, '2012-10-02 00:00:00', 't', '2012-09-27 19:22:59', 50, 814558298, 1000, 'f', 0, '2012-09-22 00:00:00') Fixture Insert (0.0ms) 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-09-27 19:22:59', '2012-10-07 00:00:00', 't', '2012-09-27 19:22:59', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 19:22:59', '2012-09-27 19:22:59', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 19:22:59', '2012-09-27 19:22:59', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 19:22:59', '2012-09-27 19:22:59', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-27 19:22:59', '2012-09-27 19:22:59', '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-09-27 19:22:59', '2012-09-27 19:22:59', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 19:22:59', '2012-09-27 19:22:59', 'parade', 405688915)  (112.7ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 19:22:59.743693' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 19:22:59.757792', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 19:22:59.759867' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 22:22:59 +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-09-27 19:22:59.772549' OR end_time IS NULL) AND (start_time < '2012-09-27 20:22:59.772737' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (14.4ms) Completed 200 OK in 19ms (Views: 18.7ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 19:23:15', 100, '2012-10-02 00:00:00', 't', '2012-09-27 19:23:15', 50, 814558298, 1000, 'f', 0, '2012-09-22 00:00:00') Fixture Insert (0.0ms) 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-09-27 19:23:15', '2012-10-07 00:00:00', 't', '2012-09-27 19:23:15', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 19:23:15', '2012-09-27 19:23:15', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 19:23:15', '2012-09-27 19:23:15', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 19:23:15', '2012-09-27 19:23:15', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-27 19:23:15', '2012-09-27 19:23:15', '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-09-27 19:23:15', '2012-09-27 19:23:15', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 19:23:15', '2012-09-27 19:23:15', 'parade', 405688915)  (150.0ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 19:23:15.956257', "fast_mode" = 't' WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 19:23:15.972519', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 19:23:15.974607', "frequency" = 2 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 22:23:15 +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-09-27 19:23:15.987561' OR end_time IS NULL) AND (start_time < '2012-09-27 20:23:15.987756' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.5ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (21.2ms) Completed 200 OK in 28ms (Views: 26.8ms | ActiveRecord: 0.8ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 22:23:16 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized Rendered examples/index.html.erb within layouts/application (2.1ms) Completed 500 Internal Server Error in 3ms  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 19:23:34', 100, '2012-10-02 00:00:00', 't', '2012-09-27 19:23:34', 50, 814558298, 1000, 'f', 0, '2012-09-22 00:00:00') Fixture Insert (0.0ms) 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-09-27 19:23:34', '2012-10-07 00:00:00', 't', '2012-09-27 19:23:34', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 19:23:34', '2012-09-27 19:23:34', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 19:23:34', '2012-09-27 19:23:34', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 19:23:34', '2012-09-27 19:23:34', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-27 19:23:34', '2012-09-27 19:23:34', '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-09-27 19:23:34', '2012-09-27 19:23:34', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 19:23:34', '2012-09-27 19:23:34', 'parade', 405688915)  (306.5ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 19:23:34.468456' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 19:23:34.482273' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 19:23:34.484273' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 22:23:34 +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-09-27 19:23:34.496906' OR end_time IS NULL) AND (start_time < '2012-09-27 20:23:34.497099' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (14.6ms) Completed 200 OK in 20ms (Views: 18.8ms | ActiveRecord: 0.5ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 22:23:34 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (1.4ms) Completed 200 OK in 3ms (Views: 2.4ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 22:23:34 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized Rendered examples/index.html.erb within layouts/application (0.5ms) Completed 200 OK in 1ms (Views: 1.3ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 19:23:53', 100, '2012-10-02 00:00:00', 't', '2012-09-27 19:23:53', 50, 814558298, 1000, 'f', 0, '2012-09-22 00:00:00') Fixture Insert (0.0ms) 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-09-27 19:23:53', '2012-10-07 00:00:00', 't', '2012-09-27 19:23:53', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 19:23:53', '2012-09-27 19:23:53', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 19:23:53', '2012-09-27 19:23:53', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 19:23:53', '2012-09-27 19:23:53', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-27 19:23:53', '2012-09-27 19:23:53', '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-09-27 19:23:53', '2012-09-27 19:23:53', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 19:23:53', '2012-09-27 19:23:53', 'parade', 405688915)  (45.0ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 19:23:53.442034', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 19:23:53.455853' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 19:23:53.457821' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 22:23:53 +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-09-27 19:23:53.470749' OR end_time IS NULL) AND (start_time < '2012-09-27 20:23:53.470942' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (14.1ms) Completed 200 OK in 19ms (Views: 18.5ms | ActiveRecord: 0.5ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 22:23:59 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (4.8ms) Completed 200 OK in 9ms (Views: 8.1ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 22:24:41 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized Rendered examples/index.html.erb within layouts/application (1.8ms) Completed 200 OK in 6ms (Views: 5.1ms | ActiveRecord: 0.0ms)  (0.4ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 19:25:01', 100, '2012-10-02 00:00:00', 't', '2012-09-27 19:25:01', 50, 814558298, 1000, 'f', 0, '2012-09-22 00:00:00') Fixture Insert (0.0ms) 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-09-27 19:25:01', '2012-10-07 00:00:00', 't', '2012-09-27 19:25:01', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 19:25:01', '2012-09-27 19:25:01', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 19:25:01', '2012-09-27 19:25:01', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 19:25:01', '2012-09-27 19:25:01', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-27 19:25:01', '2012-09-27 19:25:01', '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-09-27 19:25:01', '2012-09-27 19:25:01', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 19:25:01', '2012-09-27 19:25:01', 'parade', 405688915)  (44.9ms) commit transaction  (0.2ms) begin transaction AdvertSelector::Banner Load (0.3ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 19:25:01.690195' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 19:25:01.704259', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 19:25:01.706308' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 22:25:01 +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-09-27 19:25:01.719001' OR end_time IS NULL) AND (start_time < '2012-09-27 20:25:01.719194' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (14.3ms) Completed 200 OK in 19ms (Views: 18.5ms | ActiveRecord: 0.4ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 22:25:05 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (5.0ms) Completed 200 OK in 9ms (Views: 8.3ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 22:51:36 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements [AdvertSelector] AdvertSelector::Banner Load (0.5ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time > '2012-09-27 19:51:36.077529' OR end_time IS NULL) AND (start_time < '2012-09-27 20:51:36.078154' 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.3ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" IN (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position Rendered examples/index.html.erb within layouts/application (10.5ms) Completed 200 OK in 13ms (Views: 11.2ms | ActiveRecord: 0.9ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 19:52:47', 100, '2012-10-02 00:00:00', 't', '2012-09-27 19:52:47', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 19:52:47', '2012-10-07 00:00:00', 't', '2012-09-27 19:52:47', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 19:52:47', '2012-09-27 19:52:47', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 19:52:47', '2012-09-27 19:52:47', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 19:52:47', '2012-09-27 19:52:47', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') Fixture Delete (0.1ms) DELETE FROM "advert_selector_placements" Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Parade', '2012-09-27 19:52:47', '2012-09-27 19:52:47', '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-09-27 19:52:47', '2012-09-27 19:52:47', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 19:52:47', '2012-09-27 19:52:47', 'parade', 405688915)  (55.8ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 19:52:48.032529' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 19:52:48.045762', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 19:52:48.047738', "frequency" = 2 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 22:52:48 +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-09-27 19:52:48.060487' OR end_time IS NULL) AND (start_time < '2012-09-27 20:52:48.060679' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position Rendered examples/index.html.erb within layouts/application (22.4ms) Completed 500 Internal Server Error in 27ms  (0.2ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 19:53:21', 100, '2012-10-02 00:00:00', 't', '2012-09-27 19:53:21', 50, 814558298, 1000, 'f', 0, '2012-09-22 00:00:00') Fixture Insert (0.0ms) 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-09-27 19:53:21', '2012-10-07 00:00:00', 't', '2012-09-27 19:53:21', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 19:53:21', '2012-09-27 19:53:21', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 19:53:21', '2012-09-27 19:53:21', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 19:53:21', '2012-09-27 19:53:21', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-27 19:53:21', '2012-09-27 19:53:21', '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-09-27 19:53:21', '2012-09-27 19:53:21', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 19:53:21', '2012-09-27 19:53:21', 'parade', 405688915)  (46.4ms) 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.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 19:53:21.621300' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 19:53:21.634448', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 19:53:21.636417' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 22:53:21 +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-09-27 19:53:21.648932' OR end_time IS NULL) AND (start_time < '2012-09-27 20:53:21.649128' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (13.7ms) Completed 200 OK in 19ms (Views: 17.9ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 19:53:37', 100, '2012-10-02 00:00:00', 't', '2012-09-27 19:53:37', 50, 814558298, 1000, 'f', 0, '2012-09-22 00:00:00') Fixture Insert (0.0ms) 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-09-27 19:53:37', '2012-10-07 00:00:00', 't', '2012-09-27 19:53:37', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 19:53:37', '2012-09-27 19:53:37', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 19:53:37', '2012-09-27 19:53:37', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 19:53:37', '2012-09-27 19:53:37', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-27 19:53:37', '2012-09-27 19:53:37', '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-09-27 19:53:37', '2012-09-27 19:53:37', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 19:53:37', '2012-09-27 19:53:37', 'parade', 405688915)  (48.9ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.7ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 19:53:37.316429', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 19:53:37.330413', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 19:53:37.332625', "frequency" = 2 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 22:53:37 +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-09-27 19:53:37.345823' OR end_time IS NULL) AND (start_time < '2012-09-27 20:53:37.346021' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (14.5ms) Completed 200 OK in 19ms (Views: 18.7ms | ActiveRecord: 0.4ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 22:53:37 +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-09-30 19:53:37.368551' OR end_time IS NULL) AND (start_time < '2012-09-30 20:53:37.368741' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (4.6ms) Completed 200 OK in 6ms (Views: 5.2ms | ActiveRecord: 0.3ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 22:54:34 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized Rendered examples/index.html.erb within layouts/application (1.8ms) Completed 200 OK in 6ms (Views: 5.1ms | ActiveRecord: 0.0ms)  (0.4ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.3ms) 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-09-27 19:54:37', 100, '2012-10-02 00:00:00', 't', '2012-09-27 19:54:37', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 19:54:37', '2012-10-07 00:00:00', 't', '2012-09-27 19:54:37', 100, 394627963, 1000, 't', 0, '2012-09-27 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", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 19:54:37', '2012-09-27 19:54:37', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 19:54:37', '2012-09-27 19:54:37', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 19:54:37', '2012-09-27 19:54:37', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') Fixture Delete (0.3ms) DELETE FROM "advert_selector_placements" Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Parade', '2012-09-27 19:54:37', '2012-09-27 19:54:37', '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-09-27 19:54:37', '2012-09-27 19:54:37', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 19:54:37', '2012-09-27 19:54:37', 'parade', 405688915)  (51.3ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.3ms) 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]]  (0.1ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 19:54:37.523105' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 19:54:37.537356', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 19:54:37.539405' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 22:54:37 +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-09-27 19:54:37.552809' OR end_time IS NULL) AND (start_time < '2012-09-27 20:54:37.553019' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (14.9ms) Completed 200 OK in 20ms (Views: 19.7ms | ActiveRecord: 0.4ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 22:54:37 +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-09-30 19:54:37.575920' OR end_time IS NULL) AND (start_time < '2012-09-30 20:54:37.576097' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (7.3ms) Completed 200 OK in 9ms (Views: 8.1ms | ActiveRecord: 0.6ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 22:54:37 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized Rendered examples/index.html.erb within layouts/application (0.8ms) Completed 200 OK in 3ms (Views: 2.4ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 22:54:37 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized Rendered examples/index.html.erb within layouts/application (0.6ms) Completed 200 OK in 2ms (Views: 1.7ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 19:54:55', 100, '2012-10-02 00:00:00', 't', '2012-09-27 19:54:55', 50, 814558298, 1000, 'f', 0, '2012-09-22 00:00:00') Fixture Insert (0.0ms) 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-09-27 19:54:55', '2012-10-07 00:00:00', 't', '2012-09-27 19:54:55', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 19:54:55', '2012-09-27 19:54:55', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 19:54:55', '2012-09-27 19:54:55', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 19:54:55', '2012-09-27 19:54:55', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') Fixture Delete (0.2ms) 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-09-27 19:54:55', '2012-09-27 19:54:55', '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-09-27 19:54:55', '2012-09-27 19:54:55', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 19:54:55', '2012-09-27 19:54:55', 'parade', 405688915)  (41.4ms) commit transaction  (0.0ms) begin transaction AdvertSelector::Banner Load (0.5ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 19:54:55.362950' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 19:54:55.376786' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 19:54:55.378793' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 22:54:55 +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-09-27 19:54:55.391347' OR end_time IS NULL) AND (start_time < '2012-09-27 20:54:55.391538' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (14.2ms) Completed 200 OK in 19ms (Views: 18.4ms | ActiveRecord: 0.4ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 22:54:55 +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-09-30 19:54:55.413465' OR end_time IS NULL) AND (start_time < '2012-09-30 20:54:55.413660' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (4.4ms) Completed 200 OK in 6ms (Views: 5.1ms | ActiveRecord: 0.3ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 22:54:55 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized Rendered examples/index.html.erb within layouts/application (0.5ms) Completed 200 OK in 2ms (Views: 1.4ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 22:55:39 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized Rendered examples/index.html.erb within layouts/application (2.0ms) Completed 200 OK in 6ms (Views: 5.5ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.3ms) 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-09-27 19:55:41', 100, '2012-10-02 00:00:00', 't', '2012-09-27 19:55:41', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 19:55:41', '2012-10-07 00:00:00', 't', '2012-09-27 19:55:41', 100, 394627963, 1000, 't', 0, '2012-09-27 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", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 19:55:41', '2012-09-27 19:55:41', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 19:55:41', '2012-09-27 19:55:41', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 19:55:41', '2012-09-27 19:55:41', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') Fixture Delete (0.2ms) DELETE FROM "advert_selector_placements" Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Parade', '2012-09-27 19:55:41', '2012-09-27 19:55:41', 'leaderboard,video', 718799085) Fixture Insert (0.2ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "only_once_per_session", "id") VALUES ('Video', '2012-09-27 19:55:41', '2012-09-27 19:55:41', 'parade', 't', 1019730477) Fixture Insert (0.2ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 19:55:41', '2012-09-27 19:55:41', 'parade', 405688915)  (41.9ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.3ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 19:55:41.955402', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 19:55:41.973395', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 19:55:41.977300', "frequency" = 2 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 22:55:41 +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-09-27 19:55:41.992983' OR end_time IS NULL) AND (start_time < '2012-09-27 20:55:41.993180' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (14.4ms) Completed 200 OK in 19ms (Views: 18.7ms | ActiveRecord: 0.4ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 22:55:42 +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-09-30 19:55:42.015700' OR end_time IS NULL) AND (start_time < '2012-09-30 20:55:42.015875' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (4.5ms) Completed 200 OK in 6ms (Views: 5.2ms | ActiveRecord: 0.3ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 22:55:42 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized Rendered examples/index.html.erb within layouts/application (0.5ms) Completed 200 OK in 2ms (Views: 1.4ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 22:55:42 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized Rendered examples/index.html.erb within layouts/application (0.4ms) Completed 200 OK in 1ms (Views: 1.3ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 19:55:52', 100, '2012-10-02 00:00:00', 't', '2012-09-27 19:55:52', 50, 814558298, 1000, 'f', 0, '2012-09-22 00:00:00') Fixture Insert (0.0ms) 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-09-27 19:55:52', '2012-10-07 00:00:00', 't', '2012-09-27 19:55:52', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 19:55:52', '2012-09-27 19:55:52', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 19:55:52', '2012-09-27 19:55:52', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 19:55:52', '2012-09-27 19:55:52', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-27 19:55:52', '2012-09-27 19:55:52', '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-09-27 19:55:52', '2012-09-27 19:55:52', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 19:55:52', '2012-09-27 19:55:52', 'parade', 405688915)  (38.4ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 19:55:52.963896' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 19:55:52.977823' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 19:55:52.979750' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 22:55:52 +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-09-27 19:55:52.992520' OR end_time IS NULL) AND (start_time < '2012-09-27 20:55:52.992721' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (14.6ms) Completed 200 OK in 20ms (Views: 18.8ms | ActiveRecord: 0.4ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 22:55:53 +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-09-30 19:55:53.014891' OR end_time IS NULL) AND (start_time < '2012-09-30 20:55:53.015060' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (4.6ms) Completed 200 OK in 6ms (Views: 5.2ms | ActiveRecord: 0.3ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 22:55:53 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized Rendered examples/index.html.erb within layouts/application (0.5ms) Completed 200 OK in 2ms (Views: 1.4ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 22:56:13 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized Rendered examples/index.html.erb within layouts/application (1.8ms) Completed 200 OK in 6ms (Views: 5.2ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 22:56:52 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized Rendered examples/index.html.erb within layouts/application (1.7ms) Completed 200 OK in 4ms (Views: 3.7ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 22:56:56 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized Rendered examples/index.html.erb within layouts/application (1.7ms) Completed 200 OK in 6ms (Views: 5.2ms | ActiveRecord: 0.0ms)  (0.4ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 19:57:12', 100, '2012-10-02 00:00:00', 't', '2012-09-27 19:57:12', 50, 814558298, 1000, 'f', 0, '2012-09-22 00:00:00') Fixture Insert (0.0ms) 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-09-27 19:57:12', '2012-10-07 00:00:00', 't', '2012-09-27 19:57:12', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 19:57:12', '2012-09-27 19:57:12', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 19:57:12', '2012-09-27 19:57:12', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 19:57:12', '2012-09-27 19:57:12', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') Fixture Delete (0.2ms) 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-09-27 19:57:12', '2012-09-27 19:57:12', '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-09-27 19:57:12', '2012-09-27 19:57:12', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 19:57:12', '2012-09-27 19:57:12', 'parade', 405688915)  (448.3ms) commit transaction  (0.0ms) 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]]  (0.1ms) SAVEPOINT active_record_1  (0.5ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 19:57:13.370854', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 19:57:13.392951', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 19:57:13.395857', "frequency" = 2 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 22:57:13 +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-09-27 19:57:13.409660' OR end_time IS NULL) AND (start_time < '2012-09-27 20:57:13.409871' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (14.5ms) Completed 200 OK in 20ms (Views: 18.9ms | ActiveRecord: 0.4ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 22:57:13 +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-09-30 19:57:13.431975' OR end_time IS NULL) AND (start_time < '2012-09-30 20:57:13.432159' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (4.5ms) Completed 200 OK in 6ms (Views: 5.1ms | ActiveRecord: 0.4ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 22:57:13 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized Rendered examples/index.html.erb within layouts/application (0.5ms) Completed 200 OK in 2ms (Views: 1.5ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 19:57:44', 100, '2012-10-02 00:00:00', 't', '2012-09-27 19:57:44', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 19:57:44', '2012-10-07 00:00:00', 't', '2012-09-27 19:57:44', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 19:57:44', '2012-09-27 19:57:44', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 19:57:44', '2012-09-27 19:57:44', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 19:57:44', '2012-09-27 19:57:44', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-27 19:57:44', '2012-09-27 19:57:44', '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-09-27 19:57:44', '2012-09-27 19:57:44', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 19:57:44', '2012-09-27 19:57:44', 'parade', 405688915)  (45.2ms) commit transaction  (0.2ms) 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]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items"   (0.1ms) SAVEPOINT active_record_1 AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.8ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 19:57:44 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 2], ["updated_at", Thu, 27 Sep 2012 19:57:44 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 10) SQL (0.2ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 19:57:44 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 19:57:44 UTC +00:00]] SQL (0.2ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.2ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 19:57:44 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 19:57:44 UTC +00:00]] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position > 3)  (0.0ms) RELEASE SAVEPOINT active_record_1 AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position LIMIT 1 AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position DESC LIMIT 1  (0.2ms) rollback transaction  (0.1ms) 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]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-27 19:57:44.741406' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-27 19:57:44.742308' OR end_time IS NULL) AND (start_time < '2012-09-27 20:57:44.742450' 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-09-27 19:57:44.743422' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-09-27 19:57:44.744192' OR end_time IS NULL) AND (start_time < '2011-09-27 20:57:44.744326' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count)  (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]]  (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]]  (0.1ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_banners" SET "running_view_count" = 0, "updated_at" = '2012-09-27 19:57:44.764347' WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.5ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.2ms) RELEASE SAVEPOINT active_record_1 AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]]  (0.1ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "running_view_count" = 1001, "updated_at" = '2012-09-27 19:57:44.785132' WHERE "advert_selector_banners"."id" = 814558298  (0.1ms) RELEASE SAVEPOINT active_record_1 AdvertSelector::Banner Load (0.2ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_banners" SET "confirmed" = 'f', "updated_at" = '2012-09-27 19:57:44.796151' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "confirmed" = 't', "updated_at" = '2012-09-27 19:57:44.798850' 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]]  (0.0ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_banners" SET "start_time" = '2012-09-26 21:00:00.000000', "target_view_count" = 100, "end_time" = '2012-10-07 00:00:00.000000', "updated_at" = '2012-09-27 19:57:44.806512' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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" = 0, "updated_at" = '2012-09-27 19:57:44.809059' 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.1ms) 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", 814558298]] AdvertSelector::Banner Load (0.3ms) 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", 814558298]] AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]]  (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]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners"  Processing by AdvertSelector::BannersController#create as HTML Parameters: {"banner"=>{"comment"=>"Pepsi banner", "name"=>"Pepsi", "end_time"=>"2012-10-07 00:00:00 UTC", "placement_id"=>"405688915", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-09-27 00:00:00 UTC"}}  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) 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", Thu, 27 Sep 2012 19:57:44 UTC +00:00], ["end_time", Sun, 07 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", Thu, 27 Sep 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Thu, 27 Sep 2012 19:57:44 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558299 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/banners/814558299 Completed 302 Found in 6ms (ActiveRecord: 0.8ms)  (0.0ms) SELECT COUNT(*) FROM "advert_selector_banners"  (0.1ms) rollback transaction  (0.1ms) 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]]  (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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position SQL (0.2ms) 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position > 2) SQL (0.1ms) 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.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]] 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/banners/_form.html.erb (55.7ms) 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" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 165ms (Views: 163.4ms | ActiveRecord: 0.9ms)  (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]] Processing by AdvertSelector::BannersController#index as HTML AdvertSelector::Banner Load (0.3ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners"  AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 19ms (Views: 16.6ms | ActiveRecord: 0.7ms)  (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]] 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 (19.2ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 26ms (Views: 25.2ms | ActiveRecord: 0.5ms)  (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]] 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.1ms) 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]] Processing by AdvertSelector::BannersController#update as HTML Parameters: {"banner"=>{"comment"=>"Pepsi banner"}, "id"=>"394627963"} AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", "394627963"]]  (0.1ms) SAVEPOINT active_record_1 AdvertSelector::HelperItem Load (0.3ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/banners/394627963 Completed 302 Found in 7ms (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::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.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items"   (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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 19:57:45 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", nil], ["position", 1], ["updated_at", Thu, 27 Sep 2012 19:57:45 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 19:57:45 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 19:57:45 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position >= 1) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 19:57:45 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", "some_limit_helper_here"], ["position", 1], ["updated_at", Thu, 27 Sep 2012 19:57:45 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-09-27 19:57:45.117677' WHERE "advert_selector_helper_items"."id" = 960656442  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1) SQL (0.0ms) 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position > 2)  (0.1ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-09-27 19:57:45.119608', "position" = 11 WHERE "advert_selector_helper_items"."id" = 960656441  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 11)  (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]]  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement'  (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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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::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::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 "conflicting_placements_array" = 'not_found,video', "updated_at" = '2012-09-27 19:57:45.132718' WHERE "advert_selector_placements"."id" = 718799085 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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 "conflicting_placements_array" = '', "updated_at" = '2012-09-27 19:57:45.134872' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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.1ms) 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::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::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::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::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.5ms) INSERT INTO "advert_selector_placements" ("conflicting_placements_array", "created_at", "name", "only_once_per_session", "updated_at") VALUES (?, ?, ?, ?, ?) [["conflicting_placements_array", nil], ["created_at", Thu, 27 Sep 2012 19:57:45 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Thu, 27 Sep 2012 19:57:45 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 1019730478 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/1019730478 Completed 302 Found in 4ms (ActiveRecord: 0.6ms)  (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::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 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position SQL (0.3ms) 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 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::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.1ms) 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  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/placements/_form.html.erb (15.2ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 23ms (Views: 22.0ms | 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::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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 9ms (Views: 7.9ms | ActiveRecord: 0.4ms)  (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::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 (13.1ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 20ms (Views: 19.0ms | ActiveRecord: 0.4ms)  (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::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 0ms (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::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 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/405688915 Completed 302 Found in 3ms (ActiveRecord: 0.2ms)  (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]]  (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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 19:57:45.263840' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 19:57:45.265872' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 19:57:45.267478', "frequency" = 2 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 22:57:45 +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-09-27 19:57:45.274675' OR end_time IS NULL) AND (start_time < '2012-09-27 20:57:45.274863' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 9ms (Views: 8.6ms | ActiveRecord: 0.4ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 22:57:45 +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-09-30 19:57:45.289330' OR end_time IS NULL) AND (start_time < '2012-09-30 20:57:45.289508' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 5ms (Views: 4.9ms | ActiveRecord: 0.3ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 22:57:45 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized Completed 200 OK in 1ms (Views: 1.2ms | 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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-30 19:57:45.302074' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 19:57:45.304091' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 22:57:45 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements [AdvertSelector] AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time > '2012-09-30 19:57:45.305675' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position Completed 200 OK in 4ms (Views: 3.3ms | ActiveRecord: 0.3ms)  (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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-30 19:57:45.316127' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 19:57:45.318145' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 "only_once_per_session" = 't', "updated_at" = '2012-09-30 19:57:45.320336' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 22:57:45 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements [AdvertSelector] AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time > '2012-09-30 19:57:45.323674' OR end_time IS NULL) AND (start_time < '2012-09-30 20:57:45.323847' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position Completed 200 OK in 4ms (Views: 3.8ms | ActiveRecord: 0.3ms)  (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]] 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-09-30 19:57:45.335043' OR end_time IS NULL) AND (start_time < '2012-09-30 20:57:45.335226' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position Completed 200 OK in 4ms (Views: 4.0ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 19:57:57', 100, '2012-10-02 00:00:00', 't', '2012-09-27 19:57:57', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 19:57:57', '2012-10-07 00:00:00', 't', '2012-09-27 19:57:57', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 19:57:57', '2012-09-27 19:57:57', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 19:57:57', '2012-09-27 19:57:57', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 19:57:57', '2012-09-27 19:57:57', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-27 19:57:57', '2012-09-27 19:57:57', '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-09-27 19:57:57', '2012-09-27 19:57:57', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 19:57:57', '2012-09-27 19:57:57', 'parade', 405688915)  (47.9ms) commit 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 19:57:57.489959' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 19:57:57.503975' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) UPDATE "advert_selector_banners" SET "frequency" = 2, "updated_at" = '2012-09-27 19:57:57.505970' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 22:57:57 +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-09-27 19:57:57.518731' OR end_time IS NULL) AND (start_time < '2012-09-27 20:57:57.518927' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (14.4ms) Completed 200 OK in 19ms (Views: 18.6ms | ActiveRecord: 0.4ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 22:57:57 +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-09-30 19:57:57.540745' OR end_time IS NULL) AND (start_time < '2012-09-30 20:57:57.540926' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (4.6ms) Completed 200 OK in 6ms (Views: 5.2ms | ActiveRecord: 0.4ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 22:57:57 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized Rendered examples/index.html.erb within layouts/application (0.5ms) Completed 200 OK in 2ms (Views: 1.4ms | 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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-30 19:57:57.553476' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 19:57:57.555566' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 22:57:57 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements [AdvertSelector] AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time > '2012-09-30 19:57:57.557192' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position Completed 200 OK in 4ms (Views: 3.5ms | ActiveRecord: 0.3ms)  (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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-30 19:57:57.567343' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 19:57:57.569423' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 19:57:57.572184', "only_once_per_session" = 't' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 22:57:57 +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-09-30 19:57:57.576293' OR end_time IS NULL) AND (start_time < '2012-09-30 20:57:57.576468' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position Completed 200 OK in 5ms (Views: 4.1ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 19:58:20', 100, '2012-10-02 00:00:00', 't', '2012-09-27 19:58:20', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 19:58:20', '2012-10-07 00:00:00', 't', '2012-09-27 19:58:20', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 19:58:20', '2012-09-27 19:58:20', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 19:58:20', '2012-09-27 19:58:20', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 19:58:20', '2012-09-27 19:58:20', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-27 19:58:20', '2012-09-27 19:58:20', '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-09-27 19:58:20', '2012-09-27 19:58:20', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 19:58:20', '2012-09-27 19:58:20', 'parade', 405688915)  (73.0ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 19:58:20.382445', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 19:58:20.396334', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) UPDATE "advert_selector_banners" SET "frequency" = 2, "updated_at" = '2012-09-27 19:58:20.398327' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 22:58:20 +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-09-27 19:58:20.411240' OR end_time IS NULL) AND (start_time < '2012-09-27 20:58:20.411436' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (14.5ms) Completed 200 OK in 20ms (Views: 18.8ms | ActiveRecord: 0.5ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 22:58:20 +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-09-30 19:58:20.433671' OR end_time IS NULL) AND (start_time < '2012-09-30 20:58:20.433862' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (4.5ms) Completed 200 OK in 6ms (Views: 5.1ms | ActiveRecord: 0.3ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 22:58:20 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized Rendered examples/index.html.erb within layouts/application (0.5ms) Completed 200 OK in 2ms (Views: 1.4ms | 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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 19:58:20.446261', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 19:58:20.448335', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 22:58:20 +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-09-30 19:58:20.449986' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position Completed 200 OK in 4ms (Views: 3.5ms | ActiveRecord: 0.3ms)  (0.4ms) rollback transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.3ms) 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]]  (0.1ms) SAVEPOINT active_record_1  (1.4ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 19:58:31.611185', "fast_mode" = 't' WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.6ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 19:58:31.622589', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.3ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-09-30 19:58:31.627408', "only_once_per_session" = 't' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.4ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 22:58:31 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements [AdvertSelector] AdvertSelector::Banner Load (0.4ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time > '2012-09-30 19:58:31.642420' OR end_time IS NULL) AND (start_time < '2012-09-30 20:58:31.643362' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position Completed 200 OK in 12ms (Views: 11.0ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.3ms) 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-09-27 19:58:53', 100, '2012-10-02 00:00:00', 't', '2012-09-27 19:58:53', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 19:58:53', '2012-10-07 00:00:00', 't', '2012-09-27 19:58:53', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 19:58:53', '2012-09-27 19:58:53', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 19:58:53', '2012-09-27 19:58:53', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 19:58:53', '2012-09-27 19:58:53', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') Fixture Delete (0.2ms) 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-09-27 19:58:54', '2012-09-27 19:58:54', '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-09-27 19:58:54', '2012-09-27 19:58:54', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 19:58:54', '2012-09-27 19:58:54', 'parade', 405688915)  (48.4ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 19:58:54.068067', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 19:58:54.082574', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 19:58:54.085156' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 22:58:54 +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-09-27 19:58:54.098125' OR end_time IS NULL) AND (start_time < '2012-09-27 20:58:54.098321' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (14.3ms) Completed 200 OK in 19ms (Views: 18.5ms | ActiveRecord: 0.4ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 22:58:54 +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-09-30 19:58:54.120155' OR end_time IS NULL) AND (start_time < '2012-09-30 20:58:54.120334' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (4.6ms) Completed 200 OK in 6ms (Views: 5.2ms | ActiveRecord: 0.4ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 22:58:54 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (1.5ms) Completed 200 OK in 3ms (Views: 2.5ms | 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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 19:58:54.134576', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 19:58:54.136627', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 22:58:54 +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-09-30 19:58:54.138311' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 5ms (Views: 4.8ms | ActiveRecord: 0.3ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 22:58:55 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 3ms (Views: 2.7ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 23:13:55 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 3ms (Views: 2.6ms | ActiveRecord: 0.0ms)  (0.3ms) rollback transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.3ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]] AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]]  (0.1ms) SAVEPOINT active_record_1  (1.0ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 19:58:55.383626', "fast_mode" = 't' WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.4ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 19:58:55.391488', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.2ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-09-30 19:58:55.396185', "only_once_per_session" = 't' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 22:58:55 +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-09-30 19:58:55.400476' OR end_time IS NULL) AND (start_time < '2012-09-30 20:58:55.400672' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 9ms (Views: 8.0ms | ActiveRecord: 0.5ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 22:58:55 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized Completed 200 OK in 2ms (Views: 1.4ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 19:59:03', 100, '2012-10-02 00:00:00', 't', '2012-09-27 19:59:03', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 19:59:03', '2012-10-07 00:00:00', 't', '2012-09-27 19:59:03', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 19:59:03', '2012-09-27 19:59:03', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 19:59:03', '2012-09-27 19:59:03', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 19:59:03', '2012-09-27 19:59:03', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-27 19:59:03', '2012-09-27 19:59:03', '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-09-27 19:59:03', '2012-09-27 19:59:03', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 19:59:03', '2012-09-27 19:59:03', 'parade', 405688915)  (445.4ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 19:59:03.918584' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 19:59:03.932679', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 19:59:03.934646', "frequency" = 2 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 22:59:03 +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-09-27 19:59:03.947405' OR end_time IS NULL) AND (start_time < '2012-09-27 20:59:03.947594' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (14.6ms) Completed 200 OK in 20ms (Views: 18.8ms | ActiveRecord: 0.4ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 22:59:03 +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-09-30 19:59:03.969775' OR end_time IS NULL) AND (start_time < '2012-09-30 20:59:03.969950' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (4.5ms) Completed 200 OK in 6ms (Views: 5.2ms | ActiveRecord: 0.4ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 22:59:03 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (1.5ms) Completed 200 OK in 3ms (Views: 2.5ms | 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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-30 19:59:03.984365' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 19:59:03.986547', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 22:59:03 +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-09-30 19:59:03.988167' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 5ms (Views: 4.7ms | ActiveRecord: 0.3ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 22:59:03 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 3ms (Views: 2.4ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 23:14:04 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 3ms (Views: 2.5ms | 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-30 19:59:04.008685' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 19:59:04.010807', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.2ms) UPDATE "advert_selector_placements" SET "only_once_per_session" = 't', "updated_at" = '2012-09-30 19:59:04.013537' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 22:59:04 +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-09-30 19:59:04.017698' OR end_time IS NULL) AND (start_time < '2012-09-30 20:59:04.017877' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 6ms (Views: 5.2ms | ActiveRecord: 0.3ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 22:59:04 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized Completed 200 OK in 1ms (Views: 1.3ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 19:59:10', 100, '2012-10-02 00:00:00', 't', '2012-09-27 19:59:10', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 19:59:10', '2012-10-07 00:00:00', 't', '2012-09-27 19:59:10', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 19:59:10', '2012-09-27 19:59:10', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 19:59:10', '2012-09-27 19:59:10', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 19:59:10', '2012-09-27 19:59:10', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-27 19:59:10', '2012-09-27 19:59:10', '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-09-27 19:59:10', '2012-09-27 19:59:10', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 19:59:10', '2012-09-27 19:59:10', 'parade', 405688915)  (61.0ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.7ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 19:59:10.256227', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 19:59:10.270286', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 19:59:10.272317', "frequency" = 2 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 22:59:10 +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-09-27 19:59:10.285012' OR end_time IS NULL) AND (start_time < '2012-09-27 20:59:10.285205' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (14.6ms) Completed 200 OK in 19ms (Views: 18.7ms | ActiveRecord: 0.5ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 22:59:10 +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-09-30 19:59:10.307474' OR end_time IS NULL) AND (start_time < '2012-09-30 20:59:10.307656' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.4ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (9.2ms) Completed 200 OK in 12ms (Views: 11.2ms | ActiveRecord: 0.7ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 22:59:10 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized Rendered examples/index.html.erb within layouts/application (0.5ms) Completed 200 OK in 2ms (Views: 1.4ms | 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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 19:59:10.328922', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 19:59:10.331019', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 22:59:10 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements [AdvertSelector] AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time > '2012-09-30 19:59:10.332686' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position Completed 200 OK in 4ms (Views: 3.6ms | 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 19:59:10.342927', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 19:59:10.345060', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.2ms) UPDATE "advert_selector_placements" SET "only_once_per_session" = 't', "updated_at" = '2012-09-30 19:59:10.348144' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 22:59:10 +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-09-30 19:59:10.352502' OR end_time IS NULL) AND (start_time < '2012-09-30 20:59:10.352695' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position Completed 200 OK in 5ms (Views: 4.2ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 19:59:25', 100, '2012-10-02 00:00:00', 't', '2012-09-27 19:59:25', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 19:59:25', '2012-10-07 00:00:00', 't', '2012-09-27 19:59:25', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 19:59:25', '2012-09-27 19:59:25', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 19:59:25', '2012-09-27 19:59:25', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 19:59:25', '2012-09-27 19:59:25', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') Fixture Delete (0.2ms) 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-09-27 19:59:25', '2012-09-27 19:59:25', '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-09-27 19:59:25', '2012-09-27 19:59:25', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 19:59:25', '2012-09-27 19:59:25', 'parade', 405688915)  (43.5ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 19:59:25.653201' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 19:59:25.667595' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 19:59:25.669636', "frequency" = 2 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 22:59:25 +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-09-27 19:59:25.682598' OR end_time IS NULL) AND (start_time < '2012-09-27 20:59:25.682789' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (14.5ms) Completed 200 OK in 20ms (Views: 18.8ms | ActiveRecord: 0.4ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 22:59:25 +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-09-30 19:59:25.705084' OR end_time IS NULL) AND (start_time < '2012-09-30 20:59:25.705262' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (4.5ms) Completed 200 OK in 6ms (Views: 5.2ms | ActiveRecord: 0.3ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 22:59:25 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (1.5ms) Completed 200 OK in 3ms (Views: 2.4ms | 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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-30 19:59:25.719435' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 19:59:25.721476' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 22:59:25 +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-09-30 19:59:25.723115' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 5ms (Views: 4.7ms | ActiveRecord: 0.3ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 22:59:25 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 3ms (Views: 2.4ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 23:14:25 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 3ms (Views: 2.5ms | 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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-30 19:59:25.743545' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 19:59:25.745633' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 19:59:25.748369', "only_once_per_session" = 't' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 22:59:25 +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-09-30 19:59:25.752481' OR end_time IS NULL) AND (start_time < '2012-09-30 20:59:25.752655' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 6ms (Views: 5.2ms | ActiveRecord: 0.3ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 22:59:25 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized Completed 200 OK in 1ms (Views: 1.3ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 19:59:35', 100, '2012-10-02 00:00:00', 't', '2012-09-27 19:59:35', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 19:59:35', '2012-10-07 00:00:00', 't', '2012-09-27 19:59:35', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 19:59:35', '2012-09-27 19:59:35', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 19:59:35', '2012-09-27 19:59:35', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 19:59:35', '2012-09-27 19:59:35', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') Fixture Delete (0.2ms) 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-09-27 19:59:35', '2012-09-27 19:59:35', '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-09-27 19:59:35', '2012-09-27 19:59:35', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 19:59:35', '2012-09-27 19:59:35', 'parade', 405688915)  (45.8ms) commit transaction  (0.0ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.8ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 19:59:35.573371', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 19:59:35.608082', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 19:59:35.610179', "frequency" = 2 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 22:59:35 +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-09-27 19:59:35.623608' OR end_time IS NULL) AND (start_time < '2012-09-27 20:59:35.623812' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (15.3ms) Completed 200 OK in 21ms (Views: 19.8ms | ActiveRecord: 0.5ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 22:59:35 +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-09-30 19:59:35.662346' OR end_time IS NULL) AND (start_time < '2012-09-30 20:59:35.662594' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (6.4ms) Completed 200 OK in 10ms (Views: 8.2ms | ActiveRecord: 0.4ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 22:59:35 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized Rendered examples/index.html.erb within layouts/application (0.5ms) Completed 200 OK in 2ms (Views: 1.4ms | 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 19:59:35.675969', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 19:59:35.678227', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 22:59:35 +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-09-30 19:59:35.679952' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position Completed 200 OK in 4ms (Views: 3.7ms | ActiveRecord: 0.3ms)  (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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 19:59:35.690576', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 19:59:35.692768', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.2ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-09-30 19:59:35.695928', "only_once_per_session" = 't' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 22:59:35 +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-09-30 19:59:35.700477' OR end_time IS NULL) AND (start_time < '2012-09-30 20:59:35.700667' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position Completed 200 OK in 5ms (Views: 4.1ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 20:00:13', 100, '2012-10-02 00:00:00', 't', '2012-09-27 20:00:13', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 20:00:13', '2012-10-07 00:00:00', 't', '2012-09-27 20:00:13', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 20:00:13', '2012-09-27 20:00:13', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 20:00:13', '2012-09-27 20:00:13', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 20:00:13', '2012-09-27 20:00:13', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-27 20:00:13', '2012-09-27 20:00:13', '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-09-27 20:00:13', '2012-09-27 20:00:13', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 20:00:13', '2012-09-27 20:00:13', 'parade', 405688915)  (40.5ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:00:13.961418', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 20:00:13.975377' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:00:13.977350', "frequency" = 2 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:00:13 +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-09-27 20:00:13.990065' OR end_time IS NULL) AND (start_time < '2012-09-27 21:00:13.990263' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (14.6ms) Completed 200 OK in 20ms (Views: 18.8ms | ActiveRecord: 0.5ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 23:00:14 +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-09-30 20:00:14.012439' OR end_time IS NULL) AND (start_time < '2012-09-30 21:00:14.012619' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (4.6ms) Completed 200 OK in 6ms (Views: 5.2ms | ActiveRecord: 0.4ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 23:00:14 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized Rendered examples/index.html.erb within layouts/application (0.5ms) Completed 200 OK in 2ms (Views: 1.4ms | 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 20:00:14.025253', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 20:00:14.027475' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:00:24 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements [AdvertSelector] AdvertSelector::Banner Load (0.6ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time > '2012-09-30 20:00:24.765358' OR end_time IS NULL) ORDER BY priority desc [AdvertSelector] AdvertSelector::Placement Load (0.3ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" IN (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.4ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position Completed 200 OK in 12ms (Views: 10.0ms | ActiveRecord: 1.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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 20:00:24.787816', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 20:00:24.789951' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 20:00:24.792925', "only_once_per_session" = 't' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:00:24 +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-09-30 20:00:24.797162' OR end_time IS NULL) AND (start_time < '2012-09-30 21:00:24.797340' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position Completed 200 OK in 5ms (Views: 4.3ms | ActiveRecord: 0.3ms)  (0.2ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 20:02:06', 100, '2012-10-02 00:00:00', 't', '2012-09-27 20:02:06', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 20:02:06', '2012-10-07 00:00:00', 't', '2012-09-27 20:02:06', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 20:02:06', '2012-09-27 20:02:06', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 20:02:06', '2012-09-27 20:02:06', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 20:02:06', '2012-09-27 20:02:06', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-27 20:02:06', '2012-09-27 20:02:06', '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-09-27 20:02:06', '2012-09-27 20:02:06', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 20:02:06', '2012-09-27 20:02:06', 'parade', 405688915)  (42.1ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.7ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 20:02:06.116102' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 20:02:06.130070' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) UPDATE "advert_selector_banners" SET "frequency" = 2, "updated_at" = '2012-09-27 20:02:06.132116' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:02:06 +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-09-27 20:02:06.144621' OR end_time IS NULL) AND (start_time < '2012-09-27 21:02:06.144811' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (14.7ms) Completed 200 OK in 20ms (Views: 18.9ms | 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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 20:02:06.163296' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 20:02:06.165306' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:02:06 +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-09-27 20:02:06.166933' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 5ms (Views: 4.4ms | ActiveRecord: 0.3ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 23:02:06 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 2ms (Views: 2.2ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 23:17:06 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 2ms (Views: 2.3ms | 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 20:02:06.185658' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 20:02:06.187902' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 "only_once_per_session" = 't', "updated_at" = '2012-09-27 20:02:06.190649' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:02:06 +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-09-27 20:02:06.194757' OR end_time IS NULL) AND (start_time < '2012-09-27 21:02:06.194924' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 5ms (Views: 4.9ms | ActiveRecord: 0.3ms) Started GET "/" for 127.0.0.1 at Thu Sep 27 23:02:06 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized Completed 200 OK in 1ms (Views: 1.3ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 20:02:34', 100, '2012-10-02 00:00:00', 't', '2012-09-27 20:02:34', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 20:02:34', '2012-10-07 00:00:00', 't', '2012-09-27 20:02:34', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 20:02:34', '2012-09-27 20:02:34', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 20:02:34', '2012-09-27 20:02:34', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 20:02:34', '2012-09-27 20:02:34', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-27 20:02:34', '2012-09-27 20:02:34', '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-09-27 20:02:34', '2012-09-27 20:02:34', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 20:02:34', '2012-09-27 20:02:34', 'parade', 405688915)  (43.6ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 20:02:34.929380' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:02:34.943483', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:02:34.945570', "frequency" = 2 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:02:34 +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-09-27 20:02:34.958626' OR end_time IS NULL) AND (start_time < '2012-09-27 21:02:34.958821' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (15.0ms) Completed 200 OK in 20ms (Views: 19.3ms | ActiveRecord: 0.5ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 23:02:34 +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-09-30 20:02:34.981524' OR end_time IS NULL) AND (start_time < '2012-09-30 21:02:34.981763' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (4.7ms) Completed 200 OK in 6ms (Views: 5.4ms | ActiveRecord: 0.4ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 23:02:34 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized Rendered examples/index.html.erb within layouts/application (0.5ms) Completed 200 OK in 2ms (Views: 1.4ms | 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-30 20:02:34.994631' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 20:02:34.996735', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:02:34 +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-09-30 20:02:34.998409' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 5ms (Views: 4.5ms | ActiveRecord: 0.3ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 23:02:35 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 2ms (Views: 2.2ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 23:17:35 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 2ms (Views: 2.2ms | 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-30 20:02:35.017033' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 20:02:35.019247', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 20:02:35.022223', "only_once_per_session" = 't' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:02:35 +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-09-30 20:02:35.026482' OR end_time IS NULL) AND (start_time < '2012-09-30 21:02:35.026662' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 6ms (Views: 5.1ms | ActiveRecord: 0.4ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 23:02:35 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized Completed 200 OK in 1ms (Views: 1.3ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.8ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.3ms) 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-09-27 20:02:42', 100, '2012-10-02 00:00:00', 't', '2012-09-27 20:02:42', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 20:02:42', '2012-10-07 00:00:00', 't', '2012-09-27 20:02:42', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 20:02:42', '2012-09-27 20:02:42', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 20:02:42', '2012-09-27 20:02:42', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 20:02:42', '2012-09-27 20:02:42', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') Fixture Delete (0.3ms) DELETE FROM "advert_selector_placements" Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Parade', '2012-09-27 20:02:42', '2012-09-27 20:02:42', '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-09-27 20:02:42', '2012-09-27 20:02:42', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 20:02:42', '2012-09-27 20:02:42', 'parade', 405688915)  (155.6ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.3ms) 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]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items"   (0.1ms) SAVEPOINT active_record_1 AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 814558298) ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 20:02:42 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 2], ["updated_at", Thu, 27 Sep 2012 20:02:42 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 814558298 AND position >= 10) SQL (0.2ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 20:02:42 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 20:02:42 UTC +00:00]] SQL (0.2ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 814558298 AND position >= 0) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 20:02:42 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 20:02:42 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-27 20:02:42.504592' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-27 20:02:42.505463' OR end_time IS NULL) AND (start_time < '2012-09-27 21:02:42.505595' 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-09-27 20:02:42.506602' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-09-27 20:02:42.507467' OR end_time IS NULL) AND (start_time < '2011-09-27 21:02:42.507594' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count)  (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]]  (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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:02:42.516948', "running_view_count" = 0 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:02:42.523540', "running_view_count" = 1001 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 AdvertSelector::Banner Load (0.1ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:02:42.529219', "confirmed" = 'f' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:02:42.531461', "confirmed" = 't' 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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "end_time" = '2012-10-07 00:00:00.000000', "target_view_count" = 100, "updated_at" = '2012-09-27 20:02:42.537820', "start_time" = '2012-09-26 21:00:00.000000' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:02:42.539787', "running_view_count" = 0 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.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", 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]]  (0.0ms) SELECT COUNT(*) FROM "advert_selector_banners"  Processing by AdvertSelector::BannersController#create as HTML Parameters: {"banner"=>{"comment"=>"Pepsi banner", "name"=>"Pepsi", "end_time"=>"2012-10-07 00:00:00 UTC", "placement_id"=>"405688915", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-09-27 00:00:00 UTC"}}  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) 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", Thu, 27 Sep 2012 20:02:42 UTC +00:00], ["end_time", Sun, 07 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", Thu, 27 Sep 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Thu, 27 Sep 2012 20:02:42 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558299 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.1ms) 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]]  (0.0ms) SELECT COUNT(*) FROM "advert_selector_banners"  Processing by AdvertSelector::BannersController#destroy 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"]]  (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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position SQL (0.2ms) 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 394627963 AND position > 2) SQL (0.1ms) 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.6ms)  (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]] 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/banners/_form.html.erb (45.0ms) 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" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 146ms (Views: 144.3ms | ActiveRecord: 0.9ms)  (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]] Processing by AdvertSelector::BannersController#index as HTML AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners"  AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 9ms (Views: 8.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]] 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.8ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 25ms (Views: 24.7ms | 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]] Processing by AdvertSelector::BannersController#show as HTML Parameters: {"id"=>"394627963"} Redirected to http://test.host/advert_selector/banners/394627963/edit Completed 302 Found in 0ms (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]] 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.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::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.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items"   (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"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 718799085) ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.4ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 20:02:42 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", nil], ["position", 1], ["updated_at", Thu, 27 Sep 2012 20:02:42 UTC +00:00]] SQL (0.0ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 718799085 AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 20:02:42 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 20:02:42 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 718799085 AND position >= 1) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 20:02:42 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", "some_limit_helper_here"], ["position", 1], ["updated_at", Thu, 27 Sep 2012 20:02:42 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-09-27 20:02:42.801607' WHERE "advert_selector_helper_items"."id" = 960656442  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 718799085 AND position = 1) SQL (0.0ms) 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"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 718799085 AND position > 2)  (0.1ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "position" = 11, "updated_at" = '2012-09-27 20:02:42.803416' WHERE "advert_selector_helper_items"."id" = 960656441  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 718799085 AND position = 11)  (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]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement'  (0.1ms) 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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::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::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 "conflicting_placements_array" = 'not_found,video', "updated_at" = '2012-09-27 20:02:42.815748' WHERE "advert_selector_placements"."id" = 718799085 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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 "conflicting_placements_array" = '', "updated_at" = '2012-09-27 20:02:42.817900' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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::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::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::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::Placement Load (0.0ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.1ms) 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.5ms) INSERT INTO "advert_selector_placements" ("conflicting_placements_array", "created_at", "name", "only_once_per_session", "updated_at") VALUES (?, ?, ?, ?, ?) [["conflicting_placements_array", nil], ["created_at", Thu, 27 Sep 2012 20:02:42 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Thu, 27 Sep 2012 20:02:42 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 1019730478 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/1019730478 Completed 302 Found in 4ms (ActiveRecord: 0.6ms)  (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::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 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position SQL (0.3ms) 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 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::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  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/placements/_form.html.erb (15.0ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 23ms (Views: 21.7ms | 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::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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 9ms (Views: 7.7ms | ActiveRecord: 0.4ms)  (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::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 (12.7ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 19ms (Views: 18.3ms | ActiveRecord: 0.4ms)  (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::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 0ms (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::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 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/405688915 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]]  (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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:02:42.946759', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:02:42.948717', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:02:42.950333', "frequency" = 2 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:02:42 +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-09-27 20:02:42.957240' OR end_time IS NULL) AND (start_time < '2012-09-27 21:02:42.957431' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 9ms (Views: 8.3ms | ActiveRecord: 0.4ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 23:02:42 +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-09-30 20:02:42.971838' OR end_time IS NULL) AND (start_time < '2012-09-30 21:02:42.972017' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 6ms (Views: 5.0ms | ActiveRecord: 0.4ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 23:02:42 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized Completed 200 OK in 1ms (Views: 1.2ms | 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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 20:02:42.984760', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 20:02:42.986812', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:02:42 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements [AdvertSelector] AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time > '2012-09-30 20:02:42.988393' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 5ms (Views: 4.3ms | ActiveRecord: 0.3ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 23:02:42 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 2ms (Views: 2.1ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 23:17:42 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 2ms (Views: 2.3ms | 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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 20:02:43.007041', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 20:02:43.009104', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 "only_once_per_session" = 't', "updated_at" = '2012-09-30 20:02:43.011371' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:02:43 +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-09-30 20:02:43.014781' OR end_time IS NULL) AND (start_time < '2012-09-30 21:02:43.014947' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 5ms (Views: 4.8ms | ActiveRecord: 0.3ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 23:02:43 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized Completed 200 OK in 1ms (Views: 1.2ms | 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]] 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-09-30 20:02:43.029932' OR end_time IS NULL) AND (start_time < '2012-09-30 21:02:43.030101' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 6ms (Views: 5.3ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 20:07:22', 100, '2012-10-02 00:00:00', 't', '2012-09-27 20:07:22', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 20:07:22', '2012-10-07 00:00:00', 't', '2012-09-27 20:07:22', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 20:07:22', '2012-09-27 20:07:22', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 20:07:22', '2012-09-27 20:07:22', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 20:07:22', '2012-09-27 20:07:22', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-27 20:07:22', '2012-09-27 20:07:22', '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-09-27 20:07:22', '2012-09-27 20:07:22', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 20:07:22', '2012-09-27 20:07:22', 'parade', 405688915)  (390.9ms) 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]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items"   (0.1ms) SAVEPOINT active_record_1 AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 20:07:23 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 2], ["updated_at", Thu, 27 Sep 2012 20:07:23 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 20:07:23 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 20:07:23 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 20:07:23 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 20:07:23 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-27 20:07:23.410343' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-27 20:07:23.411140' OR end_time IS NULL) AND (start_time < '2012-09-27 21:07:23.411261' 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-09-27 20:07:23.412090' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-09-27 20:07:23.412789' OR end_time IS NULL) AND (start_time < '2011-09-27 21:07:23.412907' 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]]  (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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "running_view_count" = 0, "updated_at" = '2012-09-27 20:07:23.421387' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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" = 1001, "updated_at" = '2012-09-27 20:07:23.427611' 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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "confirmed" = 'f', "updated_at" = '2012-09-27 20:07:23.432547' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 20:07:23.434540' 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.3ms) 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]]  (0.1ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "start_time" = '2012-09-26 21:00:00.000000', "end_time" = '2012-10-07 00:00:00.000000', "target_view_count" = 100, "updated_at" = '2012-09-27 20:07:23.449300' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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" = 0, "updated_at" = '2012-09-27 20:07:23.451955' 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]]  (0.0ms) 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-07 00:00:00 UTC", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-09-27 00:00:00 UTC"}}  (0.0ms) 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", Thu, 27 Sep 2012 20:07:23 UTC +00:00], ["end_time", Sun, 07 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", Thu, 27 Sep 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Thu, 27 Sep 2012 20:07:23 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558299 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.1ms) 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]]  (0.0ms) SELECT COUNT(*) FROM "advert_selector_banners"  Processing by AdvertSelector::BannersController#destroy 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"]]  (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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position SQL (0.2ms) 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position > 2) SQL (0.1ms) 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.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]] 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/banners/_form.html.erb (45.2ms) 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" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 147ms (Views: 145.3ms | 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]] Processing by AdvertSelector::BannersController#index as HTML AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners"  AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 9ms (Views: 8.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]] 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.7ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 25ms (Views: 24.6ms | 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]] Processing by AdvertSelector::BannersController#show as HTML Parameters: {"id"=>"394627963"} Redirected to http://test.host/advert_selector/banners/394627963/edit Completed 302 Found in 0ms (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]] 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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::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.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items"   (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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.4ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 20:07:23 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", nil], ["position", 1], ["updated_at", Thu, 27 Sep 2012 20:07:23 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 20:07:23 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 20:07:23 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position >= 1) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 20:07:23 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", "some_limit_helper_here"], ["position", 1], ["updated_at", Thu, 27 Sep 2012 20:07:23 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-09-27 20:07:23.713197' WHERE "advert_selector_helper_items"."id" = 960656442  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1) SQL (0.0ms) 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position > 2)  (0.1ms) UPDATE "advert_selector_helper_items" SET "position" = 11, "content_for" = 'f', "updated_at" = '2012-09-27 20:07:23.715005' WHERE "advert_selector_helper_items"."id" = 960656441  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 11)  (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]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement'  (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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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::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::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-09-27 20:07:23.727297', "conflicting_placements_array" = 'not_found,video' WHERE "advert_selector_placements"."id" = 718799085 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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-09-27 20:07:23.729502', "conflicting_placements_array" = '' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE (LOWER(name) = 'parade') LIMIT 1 AdvertSelector::Placement Load (0.0ms) 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::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::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::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::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.5ms) INSERT INTO "advert_selector_placements" ("conflicting_placements_array", "created_at", "name", "only_once_per_session", "updated_at") VALUES (?, ?, ?, ?, ?) [["conflicting_placements_array", nil], ["created_at", Thu, 27 Sep 2012 20:07:23 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Thu, 27 Sep 2012 20:07:23 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 1019730478 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/1019730478 Completed 302 Found in 4ms (ActiveRecord: 0.6ms)  (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::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 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position SQL (0.3ms) 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 3ms (ActiveRecord: 0.4ms)  (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::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  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/placements/_form.html.erb (15.1ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 23ms (Views: 21.9ms | 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::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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 9ms (Views: 7.6ms | 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::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 (12.7ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 19ms (Views: 18.4ms | ActiveRecord: 0.4ms)  (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::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 0ms (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::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 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/405688915 Completed 302 Found in 3ms (ActiveRecord: 0.2ms)  (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]]  (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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 20:07:23.856376' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 20:07:23.858427' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:07:23.860031', "frequency" = 2 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:07:23 +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-09-27 20:07:23.866940' OR end_time IS NULL) AND (start_time < '2012-09-27 21:07:23.867130' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 10ms (Views: 9.0ms | ActiveRecord: 0.4ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 23:07:23 +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-09-30 20:07:23.882407' OR end_time IS NULL) AND (start_time < '2012-09-30 21:07:23.882581' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 6ms (Views: 5.4ms | ActiveRecord: 0.4ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 23:07:23 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized Completed 200 OK in 1ms (Views: 1.2ms | 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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-30 20:07:23.895775' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 20:07:23.897811' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:07:23 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements [AdvertSelector] AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time > '2012-09-30 20:07:23.899399' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 5ms (Views: 4.7ms | ActiveRecord: 0.4ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 23:07:23 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 2ms (Views: 2.2ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 23:22:23 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 2ms (Views: 2.2ms | 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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-30 20:07:23.918765' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 20:07:23.920790' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 "only_once_per_session" = 't', "updated_at" = '2012-09-30 20:07:23.923046' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:07:23 +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-09-30 20:07:23.926443' OR end_time IS NULL) AND (start_time < '2012-09-30 21:07:23.926617' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 6ms (Views: 5.4ms | ActiveRecord: 0.4ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 23:07:23 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized Completed 200 OK in 1ms (Views: 1.2ms | 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]] 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-09-30 20:07:23.942170' OR end_time IS NULL) AND (start_time < '2012-09-30 21:07:23.942360' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 6ms (Views: 5.6ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 20:11:57', 100, '2012-10-02 00:00:00', 't', '2012-09-27 20:11:57', 50, 814558298, 1000, 'f', 0, '2012-09-22 00:00:00') Fixture Insert (0.0ms) 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-09-27 20:11:57', '2012-10-07 00:00:00', 't', '2012-09-27 20:11:57', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 20:11:57', '2012-09-27 20:11:57', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 20:11:57', '2012-09-27 20:11:57', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "master_type") VALUES ('leaderboard_testing', 1, '2012-09-27 20:11:57', '2012-09-27 20:11:57', 405688915, 510529479, 'AdvertSelector::Placement') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 20:11:57', '2012-09-27 20:11:57', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') Fixture Delete (0.2ms) 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-09-27 20:11:57', '2012-09-27 20:11:57', '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-09-27 20:11:57', '2012-09-27 20:11:57', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 20:11:57', '2012-09-27 20:11:57', 'parade', 405688915)  (251.8ms) 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]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items"  (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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 20:11:57 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 2], ["updated_at", Thu, 27 Sep 2012 20:11:57 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 20:11:57 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 20:11:57 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 20:11:57 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 20:11:57 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-27 20:11:57.799349' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-27 20:11:57.800105' OR end_time IS NULL) AND (start_time < '2012-09-27 21:11:57.800218' 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-09-27 20:11:57.801090' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-09-27 20:11:57.801804' OR end_time IS NULL) AND (start_time < '2011-09-27 21:11:57.801914' 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]]  (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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:11:57.810083', "running_view_count" = 0 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 "updated_at" = '2012-09-27 20:11:57.815465', "running_view_count" = 1001 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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:11:57.820428', "confirmed" = 'f' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:11:57.822416', "confirmed" = 't' 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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:11:57.828848', "end_time" = '2012-10-07 00:00:00.000000', "target_view_count" = 100, "start_time" = '2012-09-26 21:00:00.000000' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:11:57.830985', "running_view_count" = 0 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]]  (0.0ms) SELECT COUNT(*) FROM "advert_selector_banners" Processing by AdvertSelector::BannersController#create as HTML Parameters: {"banner"=>{"comment"=>"Pepsi banner", "name"=>"Pepsi", "end_time"=>"2012-10-07 00:00:00 UTC", "placement_id"=>"405688915", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-09-27 00:00:00 UTC"}}  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) 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", Thu, 27 Sep 2012 20:11:57 UTC +00:00], ["end_time", Sun, 07 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", Thu, 27 Sep 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Thu, 27 Sep 2012 20:11:57 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558299 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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]]  (0.0ms) SELECT COUNT(*) FROM "advert_selector_banners" Processing by AdvertSelector::BannersController#destroy 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"]]  (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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position SQL (0.2ms) 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.0ms) UPDATE "advert_selector_helper_items" SET position = (position - 1) WHERE ("advert_selector_helper_items"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position > 2) SQL (0.1ms) 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.6ms)  (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]] 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/banners/_form.html.erb (45.3ms) 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" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 146ms (Views: 144.6ms | 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]] Processing by AdvertSelector::BannersController#index as HTML AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 9ms (Views: 7.6ms | ActiveRecord: 0.5ms)  (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]] 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.3ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 25ms (Views: 24.2ms | ActiveRecord: 0.4ms)  (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]] Processing by AdvertSelector::BannersController#show as HTML Parameters: {"id"=>"394627963"} Redirected to http://test.host/advert_selector/banners/394627963/edit Completed 302 Found in 0ms (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]] 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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::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.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items"  (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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.4ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 20:11:58 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", nil], ["position", 1], ["updated_at", Thu, 27 Sep 2012 20:11:58 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 20:11:58 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 20:11:58 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position >= 1) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 20:11:58 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", "some_limit_helper_here"], ["position", 1], ["updated_at", Thu, 27 Sep 2012 20:11:58 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-09-27 20:11:58.088797' WHERE "advert_selector_helper_items"."id" = 960656442  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1) SQL (0.0ms) 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position > 2)  (0.0ms) UPDATE "advert_selector_helper_items" SET "position" = 11, "content_for" = 'f', "updated_at" = '2012-09-27 20:11:58.090614' WHERE "advert_selector_helper_items"."id" = 960656441  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 11)  (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]]  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement'  (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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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::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::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 "conflicting_placements_array" = 'not_found,video', "updated_at" = '2012-09-27 20:11:58.102960' WHERE "advert_selector_placements"."id" = 718799085 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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 "conflicting_placements_array" = '', "updated_at" = '2012-09-27 20:11:58.105015' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-09-27 20:11:58.106384' WHERE "advert_selector_helper_items"."id" = 510529479  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1) 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::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.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::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.1ms) 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::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::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.5ms) INSERT INTO "advert_selector_placements" ("conflicting_placements_array", "created_at", "name", "only_once_per_session", "updated_at") VALUES (?, ?, ?, ?, ?) [["conflicting_placements_array", nil], ["created_at", Thu, 27 Sep 2012 20:11:58 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Thu, 27 Sep 2012 20:11:58 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 1019730478 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/1019730478 Completed 302 Found in 4ms (ActiveRecord: 0.6ms)  (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::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 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position SQL (0.2ms) DELETE FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."id" = ? [["id", 510529479]] SQL (0.0ms) UPDATE "advert_selector_helper_items" SET position = (position - 1) WHERE ("advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position > 1) SQL (0.1ms) 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 4ms (ActiveRecord: 0.6ms)  (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::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  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/placements/_form.html.erb (15.7ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 24ms (Views: 22.2ms | ActiveRecord: 0.7ms)  (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::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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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.0ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = 405688915 LIMIT 1 Completed 200 OK in 8ms (Views: 7.5ms | 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::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 (14.5ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 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 Completed 200 OK in 22ms (Views: 21.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::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 0ms (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::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 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.2ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-09-27 20:11:58.239201' WHERE "advert_selector_helper_items"."id" = 510529479  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1)  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/405688915 Completed 302 Found in 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]]  (0.0ms) rollback transaction  (0.0ms) begin transaction 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", 394627963]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:11:58.248894', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:11:58.250831', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:11:58 +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-09-27 20:11:58.258401' OR end_time IS NULL) AND (start_time < '2012-09-27 21:11:58.258604' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position Completed 200 OK in 9ms (Views: 7.9ms | 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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:11:58.270014', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:11:58.271939', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:11:58.273402', "frequency" = 2 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:11:58 +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-09-27 20:11:58.276493' OR end_time IS NULL) AND (start_time < '2012-09-27 21:11:58.276664' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position Completed 200 OK in 5ms (Views: 4.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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:11:58.285263', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:11:58.287123', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:11:58 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements [AdvertSelector] AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time > '2012-09-27 20:11:58.288548' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position Completed 200 OK in 4ms (Views: 3.9ms | 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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:11:58.299294', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:11:58.301139', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 "only_once_per_session" = 't', "updated_at" = '2012-09-27 20:11:58.303301' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-09-27 20:11:58.304495' WHERE "advert_selector_helper_items"."id" = 510529479  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1)  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:11:58 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements [AdvertSelector] AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time > '2012-09-27 20:11:58.307629' OR end_time IS NULL) AND (start_time < '2012-09-27 21:11:58.307794' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position Completed 200 OK in 5ms (Views: 4.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]] 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-09-27 20:11:58.319080' OR end_time IS NULL) AND (start_time < '2012-09-27 21:11:58.319245' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position Completed 200 OK in 5ms (Views: 4.6ms | ActiveRecord: 0.4ms)  (0.0ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 20:12:08', 100, '2012-10-02 00:00:00', 't', '2012-09-27 20:12:08', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 20:12:08', '2012-10-07 00:00:00', 't', '2012-09-27 20:12:08', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 20:12:08', '2012-09-27 20:12:08', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 20:12:08', '2012-09-27 20:12:08', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "master_type") VALUES ('leaderboard_testing', 1, '2012-09-27 20:12:08', '2012-09-27 20:12:08', 405688915, 510529479, 'AdvertSelector::Placement') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 20:12:08', '2012-09-27 20:12:08', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-27 20:12:08', '2012-09-27 20:12:08', 'leaderboard,video', 718799085) Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "only_once_per_session", "id") VALUES ('Video', '2012-09-27 20:12:08', '2012-09-27 20:12:08', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 20:12:08', '2012-09-27 20:12:08', 'parade', 405688915)  (50.4ms) commit transaction  (0.2ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 20:12:08.476946' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "confirmed" = 'f', "updated_at" = '2012-09-27 20:12:08.490924' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:12:08 +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-09-27 20:12:08.505502' OR end_time IS NULL) AND (start_time < '2012-09-27 21:12:08.505717' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position Rendered examples/index.html.erb within layouts/application (14.8ms) Completed 200 OK in 20ms (Views: 19.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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 20:12:08.524486' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 20:12:08.526510' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 20:12:08.528093' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:12:08 +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-09-27 20:12:08.531358' OR end_time IS NULL) AND (start_time < '2012-09-27 21:12:08.531549' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position Completed 200 OK in 5ms (Views: 4.7ms | 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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 20:12:08.540198' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 20:12:08.542164' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:12:08 +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-09-27 20:12:08.543789' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position Completed 200 OK in 5ms (Views: 4.3ms | 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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 20:12:08.554579' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 20:12:08.556635' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 "only_once_per_session" = 't', "updated_at" = '2012-09-27 20:12:08.559440' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "updated_at" = '2012-09-27 20:12:08.561234', "content_for" = 'f' WHERE "advert_selector_helper_items"."id" = 510529479  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1)  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:12:08 +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-09-27 20:12:08.564719' OR end_time IS NULL) AND (start_time < '2012-09-27 21:12:08.564894' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position Completed 200 OK in 5ms (Views: 4.6ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 20:12:16', 100, '2012-10-02 00:00:00', 't', '2012-09-27 20:12:16', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 20:12:16', '2012-10-07 00:00:00', 't', '2012-09-27 20:12:16', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 20:12:16', '2012-09-27 20:12:16', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 20:12:16', '2012-09-27 20:12:16', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 20:12:16', '2012-09-27 20:12:16', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-27 20:12:16', '2012-09-27 20:12:16', '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-09-27 20:12:16', '2012-09-27 20:12:16', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 20:12:16', '2012-09-27 20:12:16', 'parade', 405688915)  (48.0ms) commit transaction  (0.2ms) 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]]  (0.1ms) SAVEPOINT active_record_1  (0.6ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 20:12:16.912287' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 20:12:16.931964' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:12:16 +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-09-27 20:12:16.946020' OR end_time IS NULL) AND (start_time < '2012-09-27 21:12:16.946223' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (15.1ms) Completed 200 OK in 20ms (Views: 19.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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 20:12:16.964918' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 20:12:16.966917' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 20:12:16.968613' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:12:16 +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-09-27 20:12:16.971914' OR end_time IS NULL) AND (start_time < '2012-09-27 21:12:16.972103' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 6ms (Views: 5.6ms | ActiveRecord: 0.4ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 23:12:16 +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-09-30 20:12:16.984795' OR end_time IS NULL) AND (start_time < '2012-09-30 21:12:16.984962' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 6ms (Views: 5.7ms | ActiveRecord: 0.5ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 23:12:16 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized Completed 200 OK in 1ms (Views: 1.3ms | 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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-30 20:12:16.998110' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 20:12:17.000162' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:12:17 +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-09-30 20:12:17.001762' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 6ms (Views: 5.4ms | ActiveRecord: 0.4ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 23:12:17 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 2ms (Views: 2.1ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 23:27:17 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 2ms (Views: 2.2ms | ActiveRecord: 0.0ms)  (0.2ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-30 20:12:17.021273' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 20:12:17.023371' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 20:12:17.026081', "only_once_per_session" = 't' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:12:17 +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-09-30 20:12:17.029654' OR end_time IS NULL) AND (start_time < '2012-09-30 21:12:17.029836' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 6ms (Views: 5.5ms | ActiveRecord: 0.4ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 23:12:17 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized Completed 200 OK in 2ms (Views: 1.4ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 20:12:41', 100, '2012-10-02 00:00:00', 't', '2012-09-27 20:12:41', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 20:12:41', '2012-10-07 00:00:00', 't', '2012-09-27 20:12:41', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 20:12:41', '2012-09-27 20:12:41', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 20:12:41', '2012-09-27 20:12:41', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 20:12:41', '2012-09-27 20:12:41', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-27 20:12:41', '2012-09-27 20:12:41', '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-09-27 20:12:41', '2012-09-27 20:12:41', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 20:12:41', '2012-09-27 20:12:41', 'parade', 405688915)  (34.5ms) commit transaction  (0.0ms) begin transaction AdvertSelector::Banner Load (0.7ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:12:41.585910', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:12:41.600422', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:12:41.602467', "frequency" = 2 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:12:41 +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-09-27 20:12:41.615352' OR end_time IS NULL) AND (start_time < '2012-09-27 21:12:41.615539' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (16.0ms) Completed 200 OK in 21ms (Views: 20.2ms | ActiveRecord: 0.5ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 23:12:41 +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-09-30 20:12:41.639281' OR end_time IS NULL) AND (start_time < '2012-09-30 21:12:41.639458' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (5.3ms) Completed 200 OK in 6ms (Views: 5.9ms | ActiveRecord: 0.4ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 23:12:41 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized Rendered examples/index.html.erb within layouts/application (0.5ms) Completed 200 OK in 2ms (Views: 1.4ms | 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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 20:12:41.652775', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 20:12:41.654848', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:12:41 +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-09-30 20:12:41.656484' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 6ms (Views: 5.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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 20:12:41.668393', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 20:12:41.670470', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.2ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-09-30 20:12:41.673221', "only_once_per_session" = 't' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:12:41 +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-09-30 20:12:41.676839' OR end_time IS NULL) AND (start_time < '2012-09-30 21:12:41.677016' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 6ms (Views: 5.9ms | ActiveRecord: 0.4ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 23:12:41 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized Completed 200 OK in 1ms (Views: 1.3ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 20:12:56', 100, '2012-10-02 00:00:00', 't', '2012-09-27 20:12:56', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 20:12:56', '2012-10-07 00:00:00', 't', '2012-09-27 20:12:56', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 20:12:56', '2012-09-27 20:12:56', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 20:12:56', '2012-09-27 20:12:56', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 20:12:56', '2012-09-27 20:12:56', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-27 20:12:56', '2012-09-27 20:12:56', '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-09-27 20:12:56', '2012-09-27 20:12:56', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 20:12:56', '2012-09-27 20:12:56', 'parade', 405688915)  (45.5ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 20:12:56.120265' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "confirmed" = 'f', "updated_at" = '2012-09-27 20:12:56.135088' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:12:56 +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-09-27 20:12:56.149265' OR end_time IS NULL) AND (start_time < '2012-09-27 21:12:56.149459' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (15.8ms) Completed 200 OK in 21ms (Views: 20.0ms | 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 20:12:56.169377' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 20:12:56.171405' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 20:12:56.173031' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:12:56 +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-09-27 20:12:56.176362' OR end_time IS NULL) AND (start_time < '2012-09-27 21:12:56.176550' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 6ms (Views: 5.7ms | ActiveRecord: 0.4ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 23:12:56 +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-09-30 20:12:56.189493' OR end_time IS NULL) AND (start_time < '2012-09-30 21:12:56.189679' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 6ms (Views: 5.7ms | ActiveRecord: 0.4ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 23:12:56 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized Completed 200 OK in 2ms (Views: 1.4ms | 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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-30 20:12:56.202718' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 20:12:56.204772' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:12:56 +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-09-30 20:12:56.206432' OR end_time IS NULL) ORDER BY priority desc [AdvertSelector] AdvertSelector::Placement Load (0.3ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" IN (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.4ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.3ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 15ms (Views: 13.2ms | ActiveRecord: 1.2ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 23:12:56 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 3ms (Views: 2.4ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 23:27:56 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 3ms (Views: 2.8ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-30 20:12:56.236894' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 20:12:56.239451' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.2ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-09-30 20:12:56.242979', "only_once_per_session" = 't' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:12:56 +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-09-30 20:12:56.247414' OR end_time IS NULL) AND (start_time < '2012-09-30 21:12:56.247619' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 7ms (Views: 6.5ms | ActiveRecord: 0.5ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 23:12:56 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized Completed 200 OK in 2ms (Views: 1.5ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 20:13:06', 100, '2012-10-02 00:00:00', 't', '2012-09-27 20:13:06', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 20:13:06', '2012-10-07 00:00:00', 't', '2012-09-27 20:13:06', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 20:13:06', '2012-09-27 20:13:06', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 20:13:06', '2012-09-27 20:13:06', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 20:13:06', '2012-09-27 20:13:06', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-27 20:13:06', '2012-09-27 20:13:06', '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-09-27 20:13:06', '2012-09-27 20:13:06', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 20:13:06', '2012-09-27 20:13:06', 'parade', 405688915)  (43.6ms) 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]]  (0.1ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 20:13:06.761785' WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:13:06.778254', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:13:06 +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-09-27 20:13:06.792439' OR end_time IS NULL) AND (start_time < '2012-09-27 21:13:06.792634' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (15.8ms) Completed 200 OK in 21ms (Views: 20.0ms | 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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 20:13:06.812674' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:13:06.814704', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:13:06.816316', "frequency" = 2 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:13:06 +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-09-27 20:13:06.819703' OR end_time IS NULL) AND (start_time < '2012-09-27 21:13:06.819889' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 6ms (Views: 5.6ms | ActiveRecord: 0.4ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 23:13:06 +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-09-30 20:13:06.832591' OR end_time IS NULL) AND (start_time < '2012-09-30 21:13:06.832756' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 6ms (Views: 5.8ms | ActiveRecord: 0.4ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 23:13:06 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized Completed 200 OK in 2ms (Views: 1.4ms | 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-30 20:13:06.845737' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 20:13:06.847833', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:13:06 +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-09-30 20:13:06.849498' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 6ms (Views: 5.0ms | ActiveRecord: 0.4ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 23:13:06 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 2ms (Views: 2.1ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 23:28:06 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 2ms (Views: 2.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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-30 20:13:06.868582' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 20:13:06.870684', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 "only_once_per_session" = 't', "updated_at" = '2012-09-30 20:13:06.873390' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:13:06 +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-09-30 20:13:06.876992' OR end_time IS NULL) AND (start_time < '2012-09-30 21:13:06.877168' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 6ms (Views: 5.7ms | ActiveRecord: 0.4ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 23:13:06 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized Completed 200 OK in 1ms (Views: 1.3ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 20:13:14', 100, '2012-10-02 00:00:00', 't', '2012-09-27 20:13:14', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 20:13:14', '2012-10-07 00:00:00', 't', '2012-09-27 20:13:14', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 20:13:14', '2012-09-27 20:13:14', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 20:13:14', '2012-09-27 20:13:14', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "master_type") VALUES ('leaderboard_testing', 1, '2012-09-27 20:13:14', '2012-09-27 20:13:14', 405688915, 510529479, 'AdvertSelector::Placement') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 20:13:14', '2012-09-27 20:13:14', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-27 20:13:14', '2012-09-27 20:13:14', '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-09-27 20:13:14', '2012-09-27 20:13:14', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 20:13:14', '2012-09-27 20:13:14', 'parade', 405688915)  (331.4ms) commit transaction  (0.2ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 20:13:15.089552' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 20:13:15.103637' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:13:15 +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-09-27 20:13:15.117548' OR end_time IS NULL) AND (start_time < '2012-09-27 21:13:15.117754' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (16.0ms) Completed 200 OK in 21ms (Views: 20.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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 20:13:15.137268' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 20:13:15.139383' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 20:13:15.140991' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:13:15 +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-09-27 20:13:15.144268' OR end_time IS NULL) AND (start_time < '2012-09-27 21:13:15.144448' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 6ms (Views: 5.8ms | ActiveRecord: 0.4ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 23:13:15 +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-09-30 20:13:15.157258' OR end_time IS NULL) AND (start_time < '2012-09-30 21:13:15.157440' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 6ms (Views: 5.8ms | ActiveRecord: 0.4ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 23:13:15 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized Completed 200 OK in 2ms (Views: 1.3ms | 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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-30 20:13:15.170560' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 20:13:15.172600' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:13:15 +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-09-30 20:13:15.174228' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 6ms (Views: 5.1ms | ActiveRecord: 0.4ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 23:13:15 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 2ms (Views: 2.2ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 23:28:15 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 2ms (Views: 2.3ms | 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-30 20:13:15.193707' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 20:13:15.196383' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.2ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-09-30 20:13:15.199936', "only_once_per_session" = 't' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.2ms) UPDATE "advert_selector_helper_items" SET "updated_at" = '2012-09-30 20:13:15.202296', "content_for" = 'f' WHERE "advert_selector_helper_items"."id" = 510529479  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 405688915 AND position = 1)  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:13:15 +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-09-30 20:13:15.206168' OR end_time IS NULL) AND (start_time < '2012-09-30 21:13:15.206362' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 6ms (Views: 5.8ms | ActiveRecord: 0.4ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 23:13:15 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized Completed 200 OK in 1ms (Views: 1.3ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 20:15:30', 100, '2012-10-02 00:00:00', 't', '2012-09-27 20:15:30', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 20:15:30', '2012-10-07 00:00:00', 't', '2012-09-27 20:15:30', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 20:15:30', '2012-09-27 20:15:30', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 20:15:30', '2012-09-27 20:15:30', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "master_type") VALUES ('leaderboard_testing', 1, '2012-09-27 20:15:30', '2012-09-27 20:15:30', 405688915, 510529479, 'AdvertSelector::Placement') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 20:15:30', '2012-09-27 20:15:30', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-27 20:15:30', '2012-09-27 20:15: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-09-27 20:15:30', '2012-09-27 20:15: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-09-27 20:15:30', '2012-09-27 20:15:30', 'parade', 405688915)  (44.7ms) commit transaction  (0.2ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 20:15:30.499125' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 20:15:30.512654' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:15:30 +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-09-27 20:15:30.526644' OR end_time IS NULL) AND (start_time < '2012-09-27 21:15:30.526838' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (15.3ms) Completed 200 OK in 20ms (Views: 19.6ms | ActiveRecord: 0.6ms)  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.3ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 20:15:30 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "always_false"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 20:15:30 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:15:30 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (1.4ms) Completed 200 OK in 3ms (Views: 2.4ms | 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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 20:15:30.553373' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 20:15:30.555395' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) UPDATE "advert_selector_banners" SET "frequency" = 2, "updated_at" = '2012-09-27 20:15:30.557000' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:15:30 +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-09-27 20:15:30.559844' OR end_time IS NULL) AND (start_time < '2012-09-27 21:15:30.560015' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 6ms (Views: 5.9ms | ActiveRecord: 0.4ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 23:15:30 +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-09-30 20:15:30.572901' OR end_time IS NULL) AND (start_time < '2012-09-30 21:15:30.573078' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 6ms (Views: 5.8ms | ActiveRecord: 0.4ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 23:15:30 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized Completed 200 OK in 1ms (Views: 1.3ms | 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-30 20:15:30.586077' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 20:15:30.588223' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:15:30 +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-09-30 20:15:30.589893' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 6ms (Views: 5.2ms | ActiveRecord: 0.5ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 23:15:30 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 2ms (Views: 2.2ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 23:30:30 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 2ms (Views: 2.2ms | 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-30 20:15:30.609367' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 20:15:30.611430' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 20:15:30.614224', "only_once_per_session" = 't' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-09-30 20:15:30.615784' WHERE "advert_selector_helper_items"."id" = 510529479  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1)  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:15:30 +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-09-30 20:15:30.619526' OR end_time IS NULL) AND (start_time < '2012-09-30 21:15:30.619705' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 6ms (Views: 5.6ms | ActiveRecord: 0.4ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 23:15:30 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized Completed 200 OK in 2ms (Views: 1.4ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 20:15:55', 100, '2012-10-02 00:00:00', 't', '2012-09-27 20:15:55', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 20:15:55', '2012-10-07 00:00:00', 't', '2012-09-27 20:15:55', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 20:15:55', '2012-09-27 20:15:55', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 20:15:55', '2012-09-27 20:15:55', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "master_type") VALUES ('leaderboard_testing', 1, '2012-09-27 20:15:55', '2012-09-27 20:15:55', 405688915, 510529479, 'AdvertSelector::Placement') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 20:15:55', '2012-09-27 20:15:55', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-27 20:15:55', '2012-09-27 20:15:55', '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-09-27 20:15:55', '2012-09-27 20:15:55', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 20:15:55', '2012-09-27 20:15:55', 'parade', 405688915)  (38.0ms) commit transaction  (0.2ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 20:15:55.807587' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:15:55.821153', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:15:55 +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-09-27 20:15:55.834891' OR end_time IS NULL) AND (start_time < '2012-09-27 21:15:55.835089' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (15.3ms) Completed 200 OK in 20ms (Views: 19.5ms | ActiveRecord: 0.6ms)  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.3ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 20:15:55 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "always_false"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 20:15:55 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:15:55 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (1.4ms) Completed 200 OK in 3ms (Views: 2.4ms | 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]]  (0.0ms) SAVEPOINT active_record_1  (0.9ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 20:15:55.861455' WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.3ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:15:55.867926', "confirmed" = 'f' WHERE "advert_selector_banners"."id" = 394627963 AdvertSelector::HelperItem Load (0.3ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "frequency" = 2, "updated_at" = '2012-09-27 20:15:55.874017' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:15:55 +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-09-27 20:15:55.876871' OR end_time IS NULL) AND (start_time < '2012-09-27 21:15:55.877049' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 6ms (Views: 5.7ms | ActiveRecord: 0.4ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 23:15:55 +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-09-30 20:15:55.889937' OR end_time IS NULL) AND (start_time < '2012-09-30 21:15:55.890116' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 6ms (Views: 5.8ms | ActiveRecord: 0.4ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 23:15:55 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized Completed 200 OK in 1ms (Views: 1.3ms | 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-30 20:15:55.903347' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 20:15:55.905524', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:15:55 +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-09-30 20:15:55.907184' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 6ms (Views: 5.1ms | ActiveRecord: 0.4ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 23:15:55 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 2ms (Views: 2.3ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 23:30:55 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 2ms (Views: 2.3ms | 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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-30 20:15:55.926670' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 20:15:55.928692', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.2ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-09-30 20:15:55.931434', "only_once_per_session" = 't' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-09-30 20:15:55.933022' WHERE "advert_selector_helper_items"."id" = 510529479  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1)  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:15:55 +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-09-30 20:15:55.936548' OR end_time IS NULL) AND (start_time < '2012-09-30 21:15:55.936722' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 6ms (Views: 5.6ms | ActiveRecord: 0.4ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 23:15:55 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized Completed 200 OK in 1ms (Views: 1.3ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 20:16:07', 100, '2012-10-02 00:00:00', 't', '2012-09-27 20:16:07', 50, 814558298, 1000, 'f', 0, '2012-09-22 00:00:00') Fixture Insert (0.3ms) 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-09-27 20:16:07', '2012-10-07 00:00:00', 't', '2012-09-27 20:16:07', 100, 394627963, 1000, 't', 0, '2012-09-27 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", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 20:16:07', '2012-09-27 20:16:07', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 20:16:07', '2012-09-27 20:16:07', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "master_type") VALUES ('leaderboard_testing', 1, '2012-09-27 20:16:07', '2012-09-27 20:16:07', 405688915, 510529479, 'AdvertSelector::Placement') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 20:16:07', '2012-09-27 20:16:07', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') Fixture Delete (0.2ms) 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-09-27 20:16:07', '2012-09-27 20:16:07', '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-09-27 20:16:07', '2012-09-27 20:16:07', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 20:16:07', '2012-09-27 20:16:07', 'parade', 405688915)  (35.7ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 20:16:07.617325' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 20:16:07.631045' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:16:07 +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-09-27 20:16:07.645514' OR end_time IS NULL) AND (start_time < '2012-09-27 21:16:07.645715' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (15.4ms) Completed 200 OK in 20ms (Views: 19.6ms | ActiveRecord: 0.5ms)  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.3ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 20:16:07 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "always_false"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 20:16:07 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:16:07 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (1.6ms) Completed 200 OK in 3ms (Views: 2.7ms | ActiveRecord: 0.0ms) AdvertSelector::HelperItem Load (0.5ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.1ms) rollback transaction  (0.2ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]]  (0.1ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 20:16:47.490706' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "confirmed" = 'f', "updated_at" = '2012-09-27 20:16:47.493285' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "frequency" = 2, "updated_at" = '2012-09-27 20:16:47.497618' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:16:47 +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-09-27 20:16:47.501415' OR end_time IS NULL) AND (start_time < '2012-09-27 21:16:47.501626' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 9ms (Views: 8.7ms | ActiveRecord: 0.6ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 23:16:47 +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-09-30 20:16:47.518255' OR end_time IS NULL) AND (start_time < '2012-09-30 21:16:47.518440' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 9ms (Views: 8.3ms | ActiveRecord: 0.6ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 23:16:47 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized Completed 200 OK in 2ms (Views: 1.7ms | ActiveRecord: 0.0ms)  (0.2ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Banner Load (0.4ms) 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]]  (0.1ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-30 20:16:47.542052' WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 20:16:47.545004' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:16:47 +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-09-30 20:16:47.547226' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 8ms (Views: 6.7ms | ActiveRecord: 0.6ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 23:16:47 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 3ms (Views: 2.6ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 23:31:47 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 3ms (Views: 3.2ms | ActiveRecord: 0.0ms)  (0.2ms) rollback transaction  (0.1ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]]  (0.1ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-30 20:16:47.573886' WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "confirmed" = 'f', "updated_at" = '2012-09-30 20:16:47.577730' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.1ms) RELEASE SAVEPOINT active_record_1 AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = 405688915 LIMIT 1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_placements" SET "only_once_per_session" = 't', "updated_at" = '2012-09-30 20:16:47.583466' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.3ms) UPDATE "advert_selector_helper_items" SET "updated_at" = '2012-09-30 20:16:47.586749', "content_for" = 'f' WHERE "advert_selector_helper_items"."id" = 510529479  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1)  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:16:47 +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-09-30 20:16:47.593025' OR end_time IS NULL) AND (start_time < '2012-09-30 21:16:47.593345' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 12ms (Views: 10.5ms | ActiveRecord: 0.9ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 23:16:47 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized Completed 200 OK in 3ms (Views: 2.2ms | ActiveRecord: 0.0ms)  (0.2ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 20:16:49', 100, '2012-10-02 00:00:00', 't', '2012-09-27 20:16:49', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 20:16:49', '2012-10-07 00:00:00', 't', '2012-09-27 20:16:49', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 20:16:49', '2012-09-27 20:16:49', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 20:16:49', '2012-09-27 20:16:49', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "master_type") VALUES ('leaderboard_testing', 1, '2012-09-27 20:16:49', '2012-09-27 20:16:49', 405688915, 510529479, 'AdvertSelector::Placement') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 20:16:49', '2012-09-27 20:16:49', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-27 20:16:49', '2012-09-27 20:16:49', '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-09-27 20:16:49', '2012-09-27 20:16:49', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 20:16:49', '2012-09-27 20:16:49', 'parade', 405688915)  (127.0ms) 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.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:16:50.082349', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:16:50.095750', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:16:50 +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-09-27 20:16:50.109443' OR end_time IS NULL) AND (start_time < '2012-09-27 21:16:50.109633' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (15.2ms) Completed 200 OK in 20ms (Views: 19.3ms | ActiveRecord: 0.5ms)  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.3ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 20:16:50 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "always_false"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 20:16:50 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:16:50 +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-09-27 20:16:50.130455' OR end_time IS NULL) AND (start_time < '2012-09-27 21:16:50.130623' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position Rendered examples/index.html.erb within layouts/application (4.1ms) Completed 200 OK in 5ms (Views: 4.6ms | 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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:16:50.138994', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:16:50.140955', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:16:50.142576', "frequency" = 2 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:16:50 +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-09-27 20:16:50.145417' OR end_time IS NULL) AND (start_time < '2012-09-27 21:16:50.145587' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 9ms (Views: 8.4ms | ActiveRecord: 0.4ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 23:16:50 +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-09-30 20:16:50.167315' OR end_time IS NULL) AND (start_time < '2012-09-30 21:16:50.167486' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 6ms (Views: 5.7ms | ActiveRecord: 0.5ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 23:16:50 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized Completed 200 OK in 1ms (Views: 1.3ms | 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 20:16:50.180398', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 20:16:50.182476', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:16:50 +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-09-30 20:16:50.184218' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 6ms (Views: 5.0ms | ActiveRecord: 0.4ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 23:16:50 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 2ms (Views: 2.3ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 23:31:50 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 2ms (Views: 2.3ms | 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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 20:16:50.203801', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 20:16:50.205862', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 "only_once_per_session" = 't', "updated_at" = '2012-09-30 20:16:50.208570' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.2ms) UPDATE "advert_selector_helper_items" SET "updated_at" = '2012-09-30 20:16:50.210178', "content_for" = 'f' WHERE "advert_selector_helper_items"."id" = 510529479  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1)  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:16:50 +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-09-30 20:16:50.213714' OR end_time IS NULL) AND (start_time < '2012-09-30 21:16:50.213882' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 6ms (Views: 5.6ms | ActiveRecord: 0.4ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 23:16:50 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized Completed 200 OK in 1ms (Views: 1.3ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 20:16:56', 100, '2012-10-02 00:00:00', 't', '2012-09-27 20:16:56', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 20:16:56', '2012-10-07 00:00:00', 't', '2012-09-27 20:16:56', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 20:16:56', '2012-09-27 20:16:56', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 20:16:56', '2012-09-27 20:16:56', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "master_type") VALUES ('leaderboard_testing', 1, '2012-09-27 20:16:56', '2012-09-27 20:16:56', 405688915, 510529479, 'AdvertSelector::Placement') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 20:16:56', '2012-09-27 20:16:56', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') Fixture Delete (0.2ms) 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-09-27 20:16:56', '2012-09-27 20:16:56', '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-09-27 20:16:56', '2012-09-27 20:16:56', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 20:16:56', '2012-09-27 20:16:56', 'parade', 405688915)  (37.4ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 20:16:56.359279' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 20:16:56.372625' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:16:56 +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-09-27 20:16:56.386359' OR end_time IS NULL) AND (start_time < '2012-09-27 21:16:56.386557' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (15.4ms) Completed 200 OK in 20ms (Views: 19.5ms | ActiveRecord: 0.5ms)  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.3ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 20:16:56 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "always_false"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 20:16:56 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:16:56 +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-09-27 20:16:56.407289' OR end_time IS NULL) AND (start_time < '2012-09-27 21:16:56.407448' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position Rendered examples/index.html.erb within layouts/application (4.0ms) Completed 200 OK in 5ms (Views: 4.5ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.5ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1  (0.4ms) rollback transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.3ms) 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]]  (0.1ms) SAVEPOINT active_record_1  (1.0ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 20:18:54.393544' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 20:18:54.399070' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:18:54.400879', "frequency" = 2 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:18:54 +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-09-27 20:18:54.403870' OR end_time IS NULL) AND (start_time < '2012-09-27 21:18:54.404041' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 6ms (Views: 5.8ms | ActiveRecord: 0.4ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 23:18:54 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements [AdvertSelector] AdvertSelector::Banner Load (0.5ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time > '2012-09-30 20:18:54.417165' OR end_time IS NULL) AND (start_time < '2012-09-30 21:18:54.417390' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 11ms (Views: 9.3ms | ActiveRecord: 1.0ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 23:18:54 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized Completed 200 OK in 2ms (Views: 1.3ms | ActiveRecord: 0.0ms)  (0.2ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-30 20:18:54.434651' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 20:18:54.436801' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:18:54 +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-09-30 20:18:54.438430' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 6ms (Views: 5.2ms | ActiveRecord: 0.4ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 23:18:54 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 3ms (Views: 2.4ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 23:33:54 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 2ms (Views: 2.3ms | 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-30 20:18:54.458298' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 20:18:54.460444' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.2ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-09-30 20:18:54.463221', "only_once_per_session" = 't' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.2ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-09-30 20:18:54.464802' WHERE "advert_selector_helper_items"."id" = 510529479  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1)  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:18:54 +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-09-30 20:18:54.468415' OR end_time IS NULL) AND (start_time < '2012-09-30 21:18:54.468589' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 8ms (Views: 6.9ms | ActiveRecord: 0.5ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 23:18:54 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized Completed 200 OK in 2ms (Views: 1.7ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.3ms) 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-09-27 20:19:01', 100, '2012-10-02 00:00:00', 't', '2012-09-27 20:19:01', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 20:19:01', '2012-10-07 00:00:00', 't', '2012-09-27 20:19:01', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 20:19:01', '2012-09-27 20:19:01', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 20:19:01', '2012-09-27 20:19:01', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "master_type") VALUES ('leaderboard_testing', 1, '2012-09-27 20:19:01', '2012-09-27 20:19:01', 405688915, 510529479, 'AdvertSelector::Placement') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 20:19:01', '2012-09-27 20:19:01', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') Fixture Delete (1.1ms) DELETE FROM "advert_selector_placements" Fixture Insert (0.4ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Parade', '2012-09-27 20:19:01', '2012-09-27 20:19:01', 'leaderboard,video', 718799085) Fixture Insert (0.3ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "only_once_per_session", "id") VALUES ('Video', '2012-09-27 20:19:01', '2012-09-27 20:19:01', 'parade', 't', 1019730477) Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 20:19:01', '2012-09-27 20:19:01', 'parade', 405688915)  (49.6ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.7ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 20:19:01.988883' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:19:02.003166', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:19:02 +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-09-27 20:19:02.020361' OR end_time IS NULL) AND (start_time < '2012-09-27 21:19:02.020588' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (17.3ms) Completed 200 OK in 23ms (Views: 22.4ms | ActiveRecord: 0.6ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.3ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 20:19:02 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "always_false"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 20:19:02 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:19:02 +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-09-27 20:19:02.043612' OR end_time IS NULL) AND (start_time < '2012-09-27 21:19:02.043795' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position Rendered examples/index.html.erb within layouts/application (4.1ms) Completed 200 OK in 5ms (Views: 4.7ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 20:19:02.052938' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:19:02.055334', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:19:02.057255', "frequency" = 2 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:19:02 +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-09-27 20:19:02.060136' OR end_time IS NULL) AND (start_time < '2012-09-27 21:19:02.060307' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 6ms (Views: 5.8ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:19:02 +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-09-30 20:19:02.074463' OR end_time IS NULL) AND (start_time < '2012-09-30 21:19:02.074643' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 7ms (Views: 6.0ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:19:02 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-30 20:19:02.090151' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 20:19:02.092276', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:19:02 +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-09-30 20:19:02.094110' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 6ms (Views: 5.1ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:19:02 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 3ms (Views: 2.4ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 23:34:02 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 3ms (Views: 2.7ms | 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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-30 20:19:02.115736' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 20:19:02.117872', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.2ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-09-30 20:19:02.121210', "only_once_per_session" = 't' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.2ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-09-30 20:19:02.123281' WHERE "advert_selector_helper_items"."id" = 510529479  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1)  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:19:02 +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-09-30 20:19:02.127624' OR end_time IS NULL) AND (start_time < '2012-09-30 21:19:02.127834' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 7ms (Views: 6.3ms | ActiveRecord: 0.5ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:19:02 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized Completed 200 OK in 2ms (Views: 1.8ms | ActiveRecord: 0.0ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 20:20:36', 100, '2012-10-02 00:00:00', 't', '2012-09-27 20:20:36', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 20:20:36', '2012-10-07 00:00:00', 't', '2012-09-27 20:20:36', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 20:20:36', '2012-09-27 20:20:36', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 20:20:36', '2012-09-27 20:20:36', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "master_type") VALUES ('leaderboard_testing', 1, '2012-09-27 20:20:36', '2012-09-27 20:20:36', 405688915, 510529479, 'AdvertSelector::Placement') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 20:20:36', '2012-09-27 20:20:36', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-27 20:20:36', '2012-09-27 20:20:36', '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-09-27 20:20:36', '2012-09-27 20:20:36', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 20:20:36', '2012-09-27 20:20:36', 'parade', 405688915)  (51.0ms) commit transaction  (0.2ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 20:20:36.126441' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:20:36.140271', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:20:36 +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-09-27 20:20:36.154244' OR end_time IS NULL) AND (start_time < '2012-09-27 21:20:36.154441' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (15.5ms) Completed 200 OK in 21ms (Views: 19.7ms | ActiveRecord: 0.5ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.3ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 20:20:36 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "always_false"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 20:20:36 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:20:36 +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-09-27 20:20:36.175972' OR end_time IS NULL) AND (start_time < '2012-09-27 21:20:36.176147' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position Rendered examples/index.html.erb within layouts/application (4.0ms) Completed 200 OK in 5ms (Views: 4.6ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 20:20:36.185158' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:20:36.187229', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.2ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 20:20:36 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "raise_error"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 20:20:36 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:20:36 +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-09-27 20:20:36.192753' OR end_time IS NULL) AND (start_time < '2012-09-27 21:20:36.192937' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position Completed 500 Internal Server Error in 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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 20:20:36.201815' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:20:36.203831', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 20:20:36.205526' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:20:36 +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-09-27 20:20:36.208452' OR end_time IS NULL) AND (start_time < '2012-09-27 21:20:36.208634' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 7ms (Views: 6.1ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:20:36 +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-09-30 20:20:36.223370' OR end_time IS NULL) AND (start_time < '2012-09-30 21:20:36.223562' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 6ms (Views: 5.9ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:20:36 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized Completed 200 OK in 2ms (Views: 1.4ms | ActiveRecord: 0.0ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-30 20:20:36.238503' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 20:20:36.240603', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:20:36 +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-09-30 20:20:36.242418' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 6ms (Views: 5.1ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:20:36 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 3ms (Views: 2.4ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 23:35:36 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 2ms (Views: 2.3ms | 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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-30 20:20:36.263151' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 20:20:36.265237', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 "only_once_per_session" = 't', "updated_at" = '2012-09-30 20:20:36.268028' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-09-30 20:20:36.269635' WHERE "advert_selector_helper_items"."id" = 510529479  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1)  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:20:36 +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-09-30 20:20:36.273742' OR end_time IS NULL) AND (start_time < '2012-09-30 21:20:36.273929' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 6ms (Views: 5.7ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:20:36 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized Completed 200 OK in 2ms (Views: 1.3ms | ActiveRecord: 0.0ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 20:21:08', 100, '2012-10-02 00:00:00', 't', '2012-09-27 20:21:08', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 20:21:08', '2012-10-07 00:00:00', 't', '2012-09-27 20:21:08', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 20:21:08', '2012-09-27 20:21:08', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 20:21:08', '2012-09-27 20:21:08', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "master_type") VALUES ('leaderboard_testing', 1, '2012-09-27 20:21:08', '2012-09-27 20:21:08', 405688915, 510529479, 'AdvertSelector::Placement') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 20:21:08', '2012-09-27 20:21:08', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') Fixture Delete (0.2ms) 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-09-27 20:21:08', '2012-09-27 20:21:08', 'leaderboard,video', 718799085) Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "only_once_per_session", "id") VALUES ('Video', '2012-09-27 20:21:08', '2012-09-27 20:21:08', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 20:21:08', '2012-09-27 20:21:08', 'parade', 405688915)  (55.4ms) commit transaction  (0.2ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:21:08.696571', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:21:08.710389', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:21:08 +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-09-27 20:21:08.724314' OR end_time IS NULL) AND (start_time < '2012-09-27 21:21:08.724517' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (15.8ms) Completed 200 OK in 21ms (Views: 20.0ms | ActiveRecord: 0.5ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.3ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 20:21:08 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "always_false"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 20:21:08 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:21:08 +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-09-27 20:21:08.746424' OR end_time IS NULL) AND (start_time < '2012-09-27 21:21:08.746605' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position Rendered examples/index.html.erb within layouts/application (4.1ms) Completed 200 OK in 5ms (Views: 4.6ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:21:08.755698', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:21:08.757710', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.2ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 20:21:08 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "raise_error"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 20:21:08 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:21:08 +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-09-27 20:21:08.763314' OR end_time IS NULL) AND (start_time < '2012-09-27 21:21:08.763492' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position Completed 500 Internal Server Error in 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]]  (0.1ms) SAVEPOINT active_record_1  (0.9ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:21:08.775523', "fast_mode" = 't' WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.3ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:21:08.782697', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:21:08.786868', "frequency" = 2 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:21:08 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements [AdvertSelector] AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time > '2012-09-27 20:21:08.789717' OR end_time IS NULL) AND (start_time < '2012-09-27 21:21:08.789898' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 6ms (Views: 5.7ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:21:08 +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-09-30 20:21:08.803818' OR end_time IS NULL) AND (start_time < '2012-09-30 21:21:08.803997' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 6ms (Views: 5.7ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:21:08 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized Completed 200 OK in 2ms (Views: 1.3ms | ActiveRecord: 0.0ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 20:21:08.818688', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 20:21:08.820749', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:21:08 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements [AdvertSelector] AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time > '2012-09-30 20:21:08.822425' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 6ms (Views: 5.1ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:21:08 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 2ms (Views: 2.3ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 23:36:08 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 2ms (Views: 2.2ms | 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 20:21:08.842710', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 20:21:08.845205', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 "only_once_per_session" = 't', "updated_at" = '2012-09-30 20:21:08.848076' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.2ms) UPDATE "advert_selector_helper_items" SET "updated_at" = '2012-09-30 20:21:08.849603', "content_for" = 'f' WHERE "advert_selector_helper_items"."id" = 510529479  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1)  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:21:08 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements [AdvertSelector] AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time > '2012-09-30 20:21:08.853142' OR end_time IS NULL) AND (start_time < '2012-09-30 21:21:08.853308' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 6ms (Views: 5.6ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:21:08 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 20:21:18', 100, '2012-10-02 00:00:00', 't', '2012-09-27 20:21:18', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 20:21:18', '2012-10-07 00:00:00', 't', '2012-09-27 20:21:18', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 20:21:18', '2012-09-27 20:21:18', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 20:21:18', '2012-09-27 20:21:18', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "master_type") VALUES ('leaderboard_testing', 1, '2012-09-27 20:21:18', '2012-09-27 20:21:18', 405688915, 510529479, 'AdvertSelector::Placement') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 20:21:18', '2012-09-27 20:21:18', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-27 20:21:18', '2012-09-27 20:21:18', '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-09-27 20:21:18', '2012-09-27 20:21:18', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 20:21:18', '2012-09-27 20:21:18', 'parade', 405688915)  (44.1ms) commit transaction  (0.2ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 20:21:19.003072' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:21:19.016911', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:21:19 +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-09-27 20:21:19.030870' OR end_time IS NULL) AND (start_time < '2012-09-27 21:21:19.031066' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Rendered examples/index.html.erb within layouts/application (16.5ms) Completed 200 OK in 22ms (Views: 20.7ms | ActiveRecord: 0.6ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.3ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 20:21:19 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "always_false"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 20:21:19 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:21:19 +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-09-27 20:21:19.053954' OR end_time IS NULL) AND (start_time < '2012-09-27 21:21:19.054133' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position Rendered examples/index.html.erb within layouts/application (4.1ms) Completed 200 OK in 5ms (Views: 4.7ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 20:21:19.063174' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:21:19.065163', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.2ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 20:21:19 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "raise_error"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 20:21:19 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:21:19 +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-09-27 20:21:19.070710' OR end_time IS NULL) AND (start_time < '2012-09-27 21:21:19.070874' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position Completed 200 OK in 5ms (Views: 4.7ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 20:21:19.079730' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:21:19.081697', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:21:19.083358', "frequency" = 2 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:21:19 +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-09-27 20:21:19.086185' OR end_time IS NULL) AND (start_time < '2012-09-27 21:21:19.086348' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 6ms (Views: 5.9ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:21:19 +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-09-30 20:21:19.100505' OR end_time IS NULL) AND (start_time < '2012-09-30 21:21:19.100671' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 6ms (Views: 5.7ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:21:19 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized Completed 200 OK in 1ms (Views: 1.3ms | ActiveRecord: 0.0ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-30 20:21:19.115650' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 20:21:19.117723', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:21:19 +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-09-30 20:21:19.119472' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:21:19 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 3ms (Views: 2.3ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 23:36:19 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 2ms (Views: 2.3ms | 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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-30 20:21:19.139857' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 20:21:19.141908', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.2ms) UPDATE "advert_selector_placements" SET "only_once_per_session" = 't', "updated_at" = '2012-09-30 20:21:19.144609' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "updated_at" = '2012-09-30 20:21:19.146215', "content_for" = 'f' WHERE "advert_selector_helper_items"."id" = 510529479  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1)  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:21:19 +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-09-30 20:21:19.149807' OR end_time IS NULL) AND (start_time < '2012-09-30 21:21:19.150004' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard Completed 200 OK in 6ms (Views: 5.7ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:21:19 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 20:22:06', 100, '2012-10-02 00:00:00', 't', '2012-09-27 20:22:06', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 20:22:06', '2012-10-07 00:00:00', 't', '2012-09-27 20:22:06', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 20:22:06', '2012-09-27 20:22:06', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 20:22:06', '2012-09-27 20:22:06', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "master_type") VALUES ('leaderboard_testing', 1, '2012-09-27 20:22:06', '2012-09-27 20:22:06', 405688915, 510529479, 'AdvertSelector::Placement') Fixture Insert (0.2ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 20:22:06', '2012-09-27 20:22:06', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-27 20:22:06', '2012-09-27 20:22:06', '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-09-27 20:22:06', '2012-09-27 20:22:06', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 20:22:06', '2012-09-27 20:22:06', 'parade', 405688915)  (40.1ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.5ms) 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:22:06.077664', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:22:06.091397', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:22:06 +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-09-27 20:22:06.105119' OR end_time IS NULL) AND (start_time < '2012-09-27 21:22:06.105317' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Rendered examples/index.html.erb within layouts/application (15.5ms) Completed 200 OK in 20ms (Views: 19.6ms | ActiveRecord: 0.5ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.3ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 20:22:06 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "always_false"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 20:22:06 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:22:06 +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-09-27 20:22:06.126852' OR end_time IS NULL) AND (start_time < '2012-09-27 21:22:06.127026' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] AdvertSelection finished Rendered examples/index.html.erb within layouts/application (4.0ms) Completed 200 OK in 5ms (Views: 4.6ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:22:06.135955', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:22:06.137958', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.2ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 20:22:06 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "raise_error"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 20:22:06 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:22:06 +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-09-27 20:22:06.143436' OR end_time IS NULL) AND (start_time < '2012-09-27 21:22:06.143610' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] AdvertSelection finished Completed 200 OK in 5ms (Views: 4.8ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:22:06.152653', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:22:06.154768', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:22:06.156364', "frequency" = 2 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:22:06 +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-09-27 20:22:06.159212' OR end_time IS NULL) AND (start_time < '2012-09-27 21:22:06.159379' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.8ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:22:06 +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-09-30 20:22:06.173353' OR end_time IS NULL) AND (start_time < '2012-09-30 21:22:06.173519' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.7ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:22:06 +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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 20:22:06.188179', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 20:22:06.190227', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:22:06 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements [AdvertSelector] AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time > '2012-09-30 20:22:06.192001' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:22:06 +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.4ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 23:37:06 +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 2ms (Views: 2.3ms | 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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 20:22:06.212435', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 20:22:06.214491', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.2ms) UPDATE "advert_selector_placements" SET "only_once_per_session" = 't', "updated_at" = '2012-09-30 20:22:06.217256' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "updated_at" = '2012-09-30 20:22:06.218953', "content_for" = 'f' WHERE "advert_selector_helper_items"."id" = 510529479  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1)  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:22:06 +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-09-30 20:22:06.222771' OR end_time IS NULL) AND (start_time < '2012-09-30 21:22:06.222962' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.8ms | ActiveRecord: 0.5ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:22:06 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 2ms (Views: 1.5ms | ActiveRecord: 0.0ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 20:27:59', 100, '2012-10-02 00:00:00', 't', '2012-09-27 20:27:59', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 20:27:59', '2012-10-07 00:00:00', 't', '2012-09-27 20:27:59', 100, 394627963, 1000, 't', 0, '2012-09-27 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-09-27 20:27:59', '2012-10-07 00:00:00', 'f', '2012-09-27 20:27:59', 1000, 207249520, 1000, 't', 1, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 20:27:59', '2012-09-27 20:27:59', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 20:27:59', '2012-09-27 20:27:59', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "master_type") VALUES ('leaderboard_testing', 1, '2012-09-27 20:27:59', '2012-09-27 20:27:59', 405688915, 510529479, 'AdvertSelector::Placement') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_parade', 1, '2012-09-27 20:27:59', '2012-09-27 20:27:59', 207249520, 281932184, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 20:27:59', '2012-09-27 20:27:59', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-27 20:27:59', '2012-09-27 20:27:59', '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-09-27 20:27:59', '2012-09-27 20:27:59', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 20:27:59', '2012-09-27 20:27:59', 'parade', 405688915)  (36.9ms) 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.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 20:27:59.313640' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 20:27:59.327118' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:27:59 +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-09-27 20:27:59.340887' OR end_time IS NULL) AND (start_time < '2012-09-27 21:27:59.341080' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Rendered examples/index.html.erb within layouts/application (15.6ms) Completed 200 OK in 21ms (Views: 19.7ms | ActiveRecord: 0.6ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.3ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 20:27:59 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "always_false"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 20:27:59 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:27:59 +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-09-27 20:27:59.362966' OR end_time IS NULL) AND (start_time < '2012-09-27 21:27:59.363136' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] AdvertSelection finished Rendered examples/index.html.erb within layouts/application (4.2ms) Completed 200 OK in 5ms (Views: 4.8ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 20:27:59.373565' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 20:27:59.375626' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.2ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 20:27:59 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "raise_error"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 20:27:59 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:27:59 +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-09-27 20:27:59.381175' OR end_time IS NULL) AND (start_time < '2012-09-27 21:27:59.381352' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] AdvertSelection finished Completed 200 OK in 5ms (Views: 4.9ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.3ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]]  (0.1ms) SAVEPOINT active_record_1  (0.6ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 20:27:59.394982' WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.4ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "confirmed" = 'f', "updated_at" = '2012-09-27 20:27:59.401250' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 20:27:59.403439' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:27:59 +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-09-27 20:27:59.406290' OR end_time IS NULL) AND (start_time < '2012-09-27 21:27:59.406453' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.9ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:27:59 +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-09-30 20:27:59.420526' OR end_time IS NULL) AND (start_time < '2012-09-30 21:27:59.420688' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.9ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:27:59 +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.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 20:27:59.436374' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 20:27:59.438460' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 20:27:59.440310' 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"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:27:59 +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-09-30 20:27:59.443800' OR end_time IS NULL) AND (start_time < '2012-09-30 21:27:59.443975' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner parade_banner in placement Parade [AdvertSelector] AdvertSelection finished Completed 200 OK in 7ms (Views: 6.0ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:27:59 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 4ms (Views: 3.3ms | ActiveRecord: 0.1ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 20:27:59.462991' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 20:27:59.465030' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:27:59 +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-09-30 20:27:59.466628' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:27:59 +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.4ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 23:42:59 +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.4ms | 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.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-30 20:27:59.487863' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 20:27:59.489958' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.2ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-09-30 20:27:59.492895', "only_once_per_session" = 't' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "updated_at" = '2012-09-30 20:27:59.494567', "content_for" = 'f' WHERE "advert_selector_helper_items"."id" = 510529479  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1)  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:27:59 +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-09-30 20:27:59.498113' OR end_time IS NULL) AND (start_time < '2012-09-30 21:27:59.498296' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.8ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:27:59 +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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 20:28:51', 100, '2012-10-02 00:00:00', 't', '2012-09-27 20:28:51', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 20:28:51', '2012-10-07 00:00:00', 't', '2012-09-27 20:28:51', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Insert (0.1ms) 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-09-27 20:28:51', '2012-10-07 00:00:00', 'f', '2012-09-27 20:28:51', 1000, 207249520, 1000, 't', 1, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 20:28:51', '2012-09-27 20:28:51', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 20:28:51', '2012-09-27 20:28:51', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "master_type") VALUES ('leaderboard_testing', 1, '2012-09-27 20:28:51', '2012-09-27 20:28:51', 405688915, 510529479, 'AdvertSelector::Placement') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_parade', 1, '2012-09-27 20:28:51', '2012-09-27 20:28:51', 207249520, 281932184, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 20:28:51', '2012-09-27 20:28:51', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') Fixture Delete (0.2ms) 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-09-27 20:28:51', '2012-09-27 20:28:51', '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-09-27 20:28:51', '2012-09-27 20:28:51', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 20:28:51', '2012-09-27 20:28:51', 'parade', 405688915)  (39.5ms) 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.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:28:51.643535', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 20:28:51.657238' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:28:51 +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-09-27 20:28:51.671455' OR end_time IS NULL) AND (start_time < '2012-09-27 21:28:51.671648' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Rendered examples/index.html.erb within layouts/application (15.6ms) Completed 200 OK in 21ms (Views: 19.8ms | ActiveRecord: 0.6ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.3ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 20:28:51 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "always_false"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 20:28:51 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:28:51 +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-09-27 20:28:51.693356' OR end_time IS NULL) AND (start_time < '2012-09-27 21:28:51.693533' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] AdvertSelection finished Rendered examples/index.html.erb within layouts/application (4.2ms) Completed 200 OK in 5ms (Views: 4.8ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 "updated_at" = '2012-09-27 20:28:51.703408', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 20:28:51.705538' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.2ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 20:28:51 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "raise_error"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 20:28:51 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:28:51 +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-09-27 20:28:51.711143' OR end_time IS NULL) AND (start_time < '2012-09-27 21:28:51.711410' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.1ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 "updated_at" = '2012-09-27 20:28:51.721357', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 20:28:51.723392' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:28:51.724999', "frequency" = 2 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:28:51 +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-09-27 20:28:51.728798' OR end_time IS NULL) AND (start_time < '2012-09-27 21:28:51.729104' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 11ms (Views: 9.9ms | ActiveRecord: 0.7ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:28:51 +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-09-30 20:28:51.747362' OR end_time IS NULL) AND (start_time < '2012-09-30 21:28:51.747531' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 7ms (Views: 6.0ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:28:51 +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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 "updated_at" = '2012-09-30 20:28:51.763523', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 20:28:51.765590' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 20:28:51.767444' 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"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:28:51 +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-09-30 20:28:51.770999' OR end_time IS NULL) AND (start_time < '2012-09-30 21:28:51.771178' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner parade_banner in placement Parade [AdvertSelector] AdvertSelection finished Completed 200 OK in 7ms (Views: 6.0ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:28:51 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 4ms (Views: 3.3ms | ActiveRecord: 0.1ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 "updated_at" = '2012-09-30 20:28:51.790154', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 20:28:51.792185' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 20:28:51.794009' 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"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.1ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = '', "updated_at" = '2012-09-30 20:28:51.796636' WHERE "advert_selector_placements"."id" = 718799085 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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 "conflicting_placements_array" = '', "updated_at" = '2012-09-30 20:28:51.798550' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.2ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-09-30 20:28:51.799980' WHERE "advert_selector_helper_items"."id" = 510529479  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1) 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 "conflicting_placements_array" = '', "updated_at" = '2012-09-30 20:28:51.802467' WHERE "advert_selector_placements"."id" = 1019730477 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 1019730477 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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 Sun Sep 30 23:28:51 +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-09-30 20:28:51.806763' OR end_time IS NULL) AND (start_time < '2012-09-30 21:28:51.806952' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner parade_banner in placement Parade [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 9ms (Views: 8.5ms | ActiveRecord: 0.7ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 "updated_at" = '2012-09-30 20:28:51.821604', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 20:28:51.823699' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:28:51 +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-09-30 20:28:51.825322' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.3ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:28:51 +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 2ms (Views: 2.3ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 23:43:51 +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 2ms (Views: 2.3ms | 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.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 20:28:51.846580', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 20:28:51.848640' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 20:28:51.851152', "only_once_per_session" = 't' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-09-30 20:28:51.852551' WHERE "advert_selector_helper_items"."id" = 510529479  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1)  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:28:51 +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-09-30 20:28:51.856036' OR end_time IS NULL) AND (start_time < '2012-09-30 21:28:51.856219' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.8ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:28:51 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 2ms (Views: 1.5ms | ActiveRecord: 0.0ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 20:28:58', 100, '2012-10-02 00:00:00', 't', '2012-09-27 20:28:58', 50, 814558298, 1000, 'f', 0, '2012-09-22 00:00:00') Fixture Insert (0.0ms) 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-09-27 20:28:58', '2012-10-07 00:00:00', 't', '2012-09-27 20:28:58', 100, 394627963, 1000, 't', 0, '2012-09-27 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-09-27 20:28:58', '2012-10-07 00:00:00', 'f', '2012-09-27 20:28:58', 1000, 207249520, 1000, 't', 1, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 20:28:58', '2012-09-27 20:28:58', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 20:28:58', '2012-09-27 20:28:58', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "master_type") VALUES ('leaderboard_testing', 1, '2012-09-27 20:28:58', '2012-09-27 20:28:58', 405688915, 510529479, 'AdvertSelector::Placement') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_parade', 1, '2012-09-27 20:28:58', '2012-09-27 20:28:58', 207249520, 281932184, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 20:28:58', '2012-09-27 20:28:58', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-27 20:28:58', '2012-09-27 20:28:58', '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-09-27 20:28:58', '2012-09-27 20:28:58', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 20:28:58', '2012-09-27 20:28:58', 'parade', 405688915)  (40.4ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.7ms) 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.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 20:28:58 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 2], ["updated_at", Thu, 27 Sep 2012 20:28:58 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 20:28:58 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 20:28:58 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 20:28:58 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 20:28:58 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 20:28:58.353894' OR end_time IS NULL)  (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) 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 "updated_at" = '2012-09-27 20:28:58.364837', "running_view_count" = 0 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 "updated_at" = '2012-09-27 20:28:58.371101', "running_view_count" = 1001 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 "updated_at" = '2012-09-27 20:28:58.377411', "confirmed" = 'f' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:28:58.379453', "confirmed" = 't' 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.3ms) UPDATE "advert_selector_banners" SET "target_view_count" = 100, "end_time" = '2012-10-07 00:00:00.000000', "updated_at" = '2012-09-27 20:28:58.386965', "start_time" = '2012-09-26 21:00:00.000000' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:28:58.389030', "running_view_count" = 0 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.0ms) SELECT COUNT(*) FROM "advert_selector_banners" Processing by AdvertSelector::BannersController#create as HTML Parameters: {"banner"=>{"comment"=>"Pepsi banner", "name"=>"Pepsi", "end_time"=>"2012-10-07 00:00:00 UTC", "placement_id"=>"405688915", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-09-27 00:00:00 UTC"}}  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) 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", Thu, 27 Sep 2012 20:28:58 UTC +00:00], ["end_time", Sun, 07 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", Thu, 27 Sep 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Thu, 27 Sep 2012 20:28:58 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558299 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position SQL (0.2ms) 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position > 2) SQL (0.1ms) 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.6ms)  (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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/banners/_form.html.erb (130.0ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 146ms (Views: 144.7ms | 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.2ms) 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.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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" 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 Completed 200 OK in 14ms (Views: 12.7ms | ActiveRecord: 0.7ms)  (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 (26.0ms) AdvertSelector::Placement Load (0.4ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 38ms (Views: 36.7ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction  (0.1ms) 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.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.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.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items"  (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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.4ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 20:28:58 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", nil], ["position", 1], ["updated_at", Thu, 27 Sep 2012 20:28:58 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 20:28:58 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 20:28:58 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position >= 1) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 20:28:58 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", "some_limit_helper_here"], ["position", 1], ["updated_at", Thu, 27 Sep 2012 20:28:58 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-09-27 20:28:58.683854' WHERE "advert_selector_helper_items"."id" = 960656442  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1) SQL (0.0ms) 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position > 2)  (0.1ms) UPDATE "advert_selector_helper_items" SET "position" = 11, "content_for" = 'f', "updated_at" = '2012-09-27 20:28:58.685781' WHERE "advert_selector_helper_items"."id" = 960656441  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 11)  (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]]  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement'  (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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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]] 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.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-09-27 20:28:58.700505', "conflicting_placements_array" = 'not_found,video' WHERE "advert_selector_placements"."id" = 718799085 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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-09-27 20:28:58.702723', "conflicting_placements_array" = '' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-09-27 20:28:58.704175' WHERE "advert_selector_helper_items"."id" = 510529479  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1) 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.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) 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.5ms) INSERT INTO "advert_selector_placements" ("conflicting_placements_array", "created_at", "name", "only_once_per_session", "updated_at") VALUES (?, ?, ?, ?, ?) [["conflicting_placements_array", nil], ["created_at", Thu, 27 Sep 2012 20:28:58 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Thu, 27 Sep 2012 20:28:58 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 1019730478 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/1019730478 Completed 302 Found in 4ms (ActiveRecord: 0.6ms)  (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 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position SQL (0.2ms) DELETE FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."id" = ? [["id", 510529479]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position - 1) WHERE ("advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position > 1) SQL (0.1ms) 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 4ms (ActiveRecord: 0.7ms)  (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  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/placements/_form.html.erb (15.4ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 24ms (Views: 22.7ms | ActiveRecord: 0.7ms)  (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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 9ms (Views: 8.3ms | ActiveRecord: 0.5ms)  (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]] 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 (13.0ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 23ms (Views: 21.5ms | ActiveRecord: 0.7ms)  (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.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", "405688915"]]  (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"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.5ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-09-27 20:28:58.846783' WHERE "advert_selector_helper_items"."id" = 510529479  (0.5ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1)  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/405688915 Completed 302 Found in 9ms (ActiveRecord: 1.2ms)  (0.2ms) 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 "fast_mode" = 't', "updated_at" = '2012-09-27 20:28:58.868663' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:28:58.870923', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:28:58 +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-09-27 20:28:58.881290' OR end_time IS NULL) AND (start_time < '2012-09-27 21:28:58.881587' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 14ms (Views: 13.3ms | ActiveRecord: 0.7ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 20:28:58 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "always_false"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 20:28:58 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:28:58 +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-09-27 20:28:58.903014' OR end_time IS NULL) AND (start_time < '2012-09-27 21:28:58.903212' 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.3ms) 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] AdvertSelection finished Completed 200 OK in 9ms (Views: 7.5ms | ActiveRecord: 0.8ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1  (0.2ms) rollback transaction  (0.1ms) 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-09-27 20:28:58.919786' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:28:58.922668', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.2ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 20:28:58 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "raise_error"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 20:28:58 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:28:58 +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-09-27 20:28:58.929042' OR end_time IS NULL) AND (start_time < '2012-09-27 21:28:58.929213' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] AdvertSelection finished Completed 200 OK in 5ms (Views: 4.6ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 20:28:58.939869' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:28:58.941855', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:28:58.943431', "frequency" = 2 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:28:58 +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-09-27 20:28:58.946150' OR end_time IS NULL) AND (start_time < '2012-09-27 21:28:58.946316' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.8ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:28:58 +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-09-30 20:28:58.960491' OR end_time IS NULL) AND (start_time < '2012-09-30 21:28:58.960666' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 7ms (Views: 6.0ms | ActiveRecord: 0.5ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:28:58 +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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 20:28:58.977954' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 20:28:58.979981', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 20:28:58.981818', "confirmed" = 't' 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"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:28:58 +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-09-30 20:28:58.985254' OR end_time IS NULL) AND (start_time < '2012-09-30 21:28:58.985432' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner parade_banner in placement Parade [AdvertSelector] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.9ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:28:58 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 3ms (Views: 3.2ms | ActiveRecord: 0.1ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 20:28:59.005202' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 20:28:59.007261', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 20:28:59.009027', "confirmed" = 't' 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"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.1ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-09-30 20:28:59.011258', "conflicting_placements_array" = '' WHERE "advert_selector_placements"."id" = 718799085 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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-09-30 20:28:59.013152', "conflicting_placements_array" = '' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.2ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-09-30 20:28:59.014530' WHERE "advert_selector_helper_items"."id" = 510529479  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1) 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-09-30 20:28:59.016896', "conflicting_placements_array" = '' WHERE "advert_selector_placements"."id" = 1019730477 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 1019730477 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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 Sun Sep 30 23:28:59 +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-09-30 20:28:59.020747' OR end_time IS NULL) AND (start_time < '2012-09-30 21:28:59.020910' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner parade_banner in placement Parade [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 8ms (Views: 7.5ms | ActiveRecord: 0.6ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 20:28:59.035602' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 20:28:59.037595', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:28:59 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements [AdvertSelector] AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time > '2012-09-30 20:28:59.039178' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.3ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:28:59 +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: 4.1ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 23:43:59 +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.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-30 20:28:59.064512' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 20:28:59.066747', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.2ms) UPDATE "advert_selector_placements" SET "only_once_per_session" = 't', "updated_at" = '2012-09-30 20:28:59.069252' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-09-30 20:28:59.070815' WHERE "advert_selector_helper_items"."id" = 510529479  (0.2ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1)  (0.2ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:28:59 +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-09-30 20:28:59.078143' OR end_time IS NULL) AND (start_time < '2012-09-30 21:28:59.078413' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 10ms (Views: 9.4ms | ActiveRecord: 0.5ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:28:59 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 2ms (Views: 1.5ms | ActiveRecord: 0.0ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1  (0.1ms) rollback transaction  (0.2ms) 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]] 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-09-30 20:28:59.105185' OR end_time IS NULL) AND (start_time < '2012-09-30 21:28:59.105457' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.3ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 10ms (Views: 9.5ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 20:29:54', 100, '2012-10-02 00:00:00', 't', '2012-09-27 20:29:54', 50, 814558298, 1000, 'f', 0, '2012-09-22 00:00:00') Fixture Insert (0.0ms) 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-09-27 20:29:54', '2012-10-07 00:00:00', 't', '2012-09-27 20:29:54', 100, 394627963, 1000, 't', 0, '2012-09-27 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-09-27 20:29:54', '2012-10-07 00:00:00', 'f', '2012-09-27 20:29:54', 1000, 207249520, 1000, 't', 1, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 20:29:54', '2012-09-27 20:29:54', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 20:29:54', '2012-09-27 20:29:54', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "master_type") VALUES ('leaderboard_testing', 1, '2012-09-27 20:29:54', '2012-09-27 20:29:54', 405688915, 510529479, 'AdvertSelector::Placement') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_parade', 1, '2012-09-27 20:29:54', '2012-09-27 20:29:54', 207249520, 281932184, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 20:29:54', '2012-09-27 20:29:54', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-27 20:29:54', '2012-09-27 20:29:54', '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-09-27 20:29:54', '2012-09-27 20:29:54', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 20:29:54', '2012-09-27 20:29:54', 'parade', 405688915)  (141.0ms) 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 20:29:54 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 2], ["updated_at", Thu, 27 Sep 2012 20:29:54 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 20:29:54 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 20:29:54 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 20:29:54 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 20:29:54 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 20:29:54.671102' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-27 20:29:54.671912' OR end_time IS NULL) AND (start_time < '2012-09-27 21:29:54.672026' 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.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.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:29:54.683509', "running_view_count" = 0 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 "updated_at" = '2012-09-27 20:29:54.689733', "running_view_count" = 1001 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.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:29:54.696128', "confirmed" = 'f' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:29:54.698296', "confirmed" = 't' 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.3ms) UPDATE "advert_selector_banners" SET "start_time" = '2012-09-26 21:00:00.000000', "updated_at" = '2012-09-27 20:29:54.705898', "target_view_count" = 100, "end_time" = '2012-10-07 00:00:00.000000' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:29:54.707979', "running_view_count" = 0 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.0ms) SELECT COUNT(*) FROM "advert_selector_banners"  Processing by AdvertSelector::BannersController#create as HTML Parameters: {"banner"=>{"comment"=>"Pepsi banner", "name"=>"Pepsi", "end_time"=>"2012-10-07 00:00:00 UTC", "placement_id"=>"405688915", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-09-27 00:00:00 UTC"}}  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) 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", Thu, 27 Sep 2012 20:29:54 UTC +00:00], ["end_time", Sun, 07 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", Thu, 27 Sep 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Thu, 27 Sep 2012 20:29:54 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558299 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.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]]  (0.0ms) SELECT COUNT(*) FROM "advert_selector_banners" Processing by AdvertSelector::BannersController#destroy 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"]]  (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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position SQL (0.2ms) 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position > 2) SQL (0.1ms) 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.7ms)  (0.1ms) 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/banners/_form.html.erb (126.7ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 143ms (Views: 141.4ms | ActiveRecord: 0.8ms)  (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]] Processing by AdvertSelector::BannersController#index as HTML AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners"  AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 10ms (Views: 8.8ms | 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.4ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 26ms (Views: 24.9ms | 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 0ms (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.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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.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.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.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items"   (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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 20:29:54 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", nil], ["position", 1], ["updated_at", Thu, 27 Sep 2012 20:29:54 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 20:29:54 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 20:29:54 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position >= 1) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 20:29:54 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", "some_limit_helper_here"], ["position", 1], ["updated_at", Thu, 27 Sep 2012 20:29:54 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-09-27 20:29:54.977219' WHERE "advert_selector_helper_items"."id" = 960656442  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1) SQL (0.0ms) 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position > 2)  (0.1ms) UPDATE "advert_selector_helper_items" SET "position" = 11, "content_for" = 'f', "updated_at" = '2012-09-27 20:29:54.979083' WHERE "advert_selector_helper_items"."id" = 960656441  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 11)  (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]]  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement'  (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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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]] 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.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-09-27 20:29:54.994537', "conflicting_placements_array" = 'not_found,video' WHERE "advert_selector_placements"."id" = 718799085 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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-09-27 20:29:54.997092', "conflicting_placements_array" = '' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-09-27 20:29:54.998507' WHERE "advert_selector_helper_items"."id" = 510529479  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1) 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.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.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.5ms) INSERT INTO "advert_selector_placements" ("conflicting_placements_array", "created_at", "name", "only_once_per_session", "updated_at") VALUES (?, ?, ?, ?, ?) [["conflicting_placements_array", nil], ["created_at", Thu, 27 Sep 2012 20:29:55 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Thu, 27 Sep 2012 20:29:55 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 1019730478 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/1019730478 Completed 302 Found in 4ms (ActiveRecord: 0.7ms)  (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 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position SQL (0.3ms) DELETE FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."id" = ? [["id", 510529479]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position - 1) WHERE ("advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position > 1) SQL (0.1ms) 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 4ms (ActiveRecord: 0.7ms)  (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  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/placements/_form.html.erb (15.7ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 24ms (Views: 23.0ms | ActiveRecord: 0.7ms)  (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]] Processing by AdvertSelector::PlacementsController#index as HTML AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 9ms (Views: 8.2ms | ActiveRecord: 0.4ms)  (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.1ms) 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 (12.2ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 19ms (Views: 18.6ms | 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.1ms) 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.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", "405688915"]]  (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"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.3ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-09-27 20:29:55.136269' WHERE "advert_selector_helper_items"."id" = 510529479  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1)  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/405688915 Completed 302 Found in 5ms (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]]  (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-09-27 20:29:55.148959' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:29:55.150913', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:29:55 +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-09-27 20:29:55.158816' OR end_time IS NULL) AND (start_time < '2012-09-27 21:29:55.159004' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 10ms (Views: 9.1ms | ActiveRecord: 0.5ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.3ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 20:29:55 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "always_false"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 20:29:55 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:29:55 +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-09-27 20:29:55.172604' OR end_time IS NULL) AND (start_time < '2012-09-27 21:29:55.172770' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] AdvertSelection finished Completed 200 OK in 5ms (Views: 4.4ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 20:29:55.183288' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:29:55.185303', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.2ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 20:29:55 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "raise_error"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 20:29:55 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:29:55 +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-09-27 20:29:55.190752' OR end_time IS NULL) AND (start_time < '2012-09-27 21:29:55.190921' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] AdvertSelection finished Completed 200 OK in 5ms (Views: 4.6ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 20:29:55.201425' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:29:55.203435', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) UPDATE "advert_selector_banners" SET "frequency" = 2, "updated_at" = '2012-09-27 20:29:55.205044' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:29:55 +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-09-27 20:29:55.207731' OR end_time IS NULL) AND (start_time < '2012-09-27 21:29:55.207903' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.6ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:29:55 +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-09-30 20:29:55.221408' OR end_time IS NULL) AND (start_time < '2012-09-30 21:29:55.221578' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.7ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:29:55 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 1ms (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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 20:29:55.238097' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 20:29:55.240868', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 20:29:55.243849', "confirmed" = 't' 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"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:29:55 +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-09-30 20:29:55.249036' OR end_time IS NULL) AND (start_time < '2012-09-30 21:29:55.249311' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner parade_banner in placement Parade [AdvertSelector] AdvertSelection finished Completed 200 OK in 10ms (Views: 9.0ms | ActiveRecord: 0.6ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:29:55 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 5ms (Views: 4.9ms | ActiveRecord: 0.2ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]]  (0.1ms) SAVEPOINT active_record_1  (0.5ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-30 20:29:55.281619' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 20:29:55.284962', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 20:29:55.288434', "confirmed" = 't' 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"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 20:29:55.292466', "conflicting_placements_array" = '' WHERE "advert_selector_placements"."id" = 718799085 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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-09-30 20:29:55.295745', "conflicting_placements_array" = '' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-09-30 20:29:55.297321' WHERE "advert_selector_helper_items"."id" = 510529479  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1) 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-09-30 20:29:55.299645', "conflicting_placements_array" = '' WHERE "advert_selector_placements"."id" = 1019730477 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 1019730477 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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 Sun Sep 30 23:29:55 +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-09-30 20:29:55.303553' OR end_time IS NULL) AND (start_time < '2012-09-30 21:29:55.303724' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner parade_banner in placement Parade [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 8ms (Views: 7.3ms | ActiveRecord: 0.5ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 20:29:55.317930' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 20:29:55.319966', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:29:55 +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-09-30 20:29:55.321550' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:29:55 +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 2ms (Views: 2.3ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 23:44:55 +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 2ms (Views: 2.3ms | 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.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-30 20:29:55.343404' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 20:29:55.345453', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 20:29:55.347692', "only_once_per_session" = 't' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-09-30 20:29:55.349004' WHERE "advert_selector_helper_items"."id" = 510529479  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1)  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:29:55 +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-09-30 20:29:55.352372' OR end_time IS NULL) AND (start_time < '2012-09-30 21:29:55.352540' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 7ms (Views: 5.9ms | ActiveRecord: 0.5ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:29:55 +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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 20:29:55.371817' OR end_time IS NULL) AND (start_time < '2012-09-30 21:29:55.371986' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.7ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 20:30:10', 100, '2012-10-02 00:00:00', 't', '2012-09-27 20:30:10', 50, 814558298, 1000, 'f', 0, '2012-09-22 00:00:00') Fixture Insert (0.0ms) 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-09-27 20:30:10', '2012-10-07 00:00:00', 't', '2012-09-27 20:30:10', 100, 394627963, 1000, 't', 0, '2012-09-27 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-09-27 20:30:10', '2012-10-07 00:00:00', 'f', '2012-09-27 20:30:10', 1000, 207249520, 1000, 't', 1, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 20:30:10', '2012-09-27 20:30:10', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 20:30:10', '2012-09-27 20:30:10', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "master_type") VALUES ('leaderboard_testing', 1, '2012-09-27 20:30:10', '2012-09-27 20:30:10', 405688915, 510529479, 'AdvertSelector::Placement') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_parade', 1, '2012-09-27 20:30:10', '2012-09-27 20:30:10', 207249520, 281932184, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 20:30:10', '2012-09-27 20:30:10', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-27 20:30:10', '2012-09-27 20:30:10', '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-09-27 20:30:10', '2012-09-27 20:30:10', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 20:30:10', '2012-09-27 20:30:10', 'parade', 405688915)  (43.9ms) 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.0ms) SAVEPOINT active_record_1 AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.6ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 20:30:11 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 2], ["updated_at", Thu, 27 Sep 2012 20:30:11 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 20:30:11 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 20:30:11 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 20:30:11 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 20:30:11 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 20:30:11.087022' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-27 20:30:11.087796' OR end_time IS NULL) AND (start_time < '2012-09-27 21:30:11.087915' 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.0ms) rollback transaction  (0.0ms) begin transaction 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", 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-09-27 20:30:11.096573' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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" = 1001, "updated_at" = '2012-09-27 20:30:11.102621' 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 "updated_at" = '2012-09-27 20:30:11.107666', "confirmed" = 'f' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:30:11.109701', "confirmed" = 't' 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 "end_time" = '2012-10-07 00:00:00.000000', "start_time" = '2012-09-26 21:00:00.000000', "target_view_count" = 100, "updated_at" = '2012-09-27 20:30:11.115858' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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" = 0, "updated_at" = '2012-09-27 20:30:11.117948' 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 Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 20:31:39', 100, '2012-10-02 00:00:00', 't', '2012-09-27 20:31:39', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 20:31:39', '2012-10-07 00:00:00', 't', '2012-09-27 20:31:39', 100, 394627963, 1000, 't', 0, '2012-09-27 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-09-27 20:31:39', '2012-10-07 00:00:00', 'f', '2012-09-27 20:31:39', 1000, 207249520, 1000, 't', 1, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 20:31:39', '2012-09-27 20:31:39', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 20:31:39', '2012-09-27 20:31:39', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "master_type") VALUES ('leaderboard_testing', 1, '2012-09-27 20:31:39', '2012-09-27 20:31:39', 405688915, 510529479, 'AdvertSelector::Placement') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_parade', 1, '2012-09-27 20:31:39', '2012-09-27 20:31:39', 207249520, 281932184, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 20:31:39', '2012-09-27 20:31:39', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-27 20:31:39', '2012-09-27 20:31:39', '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-09-27 20:31:39', '2012-09-27 20:31:39', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 20:31:39', '2012-09-27 20:31:39', 'parade', 405688915)  (164.6ms) 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.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_helper_items"   (0.0ms) SAVEPOINT active_record_1 AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 20:31:39 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 2], ["updated_at", Thu, 27 Sep 2012 20:31:39 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 20:31:39 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 20:31:39 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 20:31:39 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 20:31:39 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 20:31:39.621252' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-27 20:31:39.622068' OR end_time IS NULL) AND (start_time < '2012-09-27 21:31:39.622183' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count)  (0.0ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-09-27 20:31:39.623047' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-09-27 20:31:39.623709' OR end_time IS NULL) AND (start_time < '2011-09-27 21:31:39.623819' 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.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.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:31:39.632146', "running_view_count" = 0 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 "updated_at" = '2012-09-27 20:31:39.638106', "running_view_count" = 1001 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 "updated_at" = '2012-09-27 20:31:39.642910', "confirmed" = 'f' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:31:39.644885', "confirmed" = 't' 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.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:31:39.651114', "end_time" = '2012-10-07 00:00:00.000000', "target_view_count" = 100, "start_time" = '2012-09-26 21:00:00.000000' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:31:39.653080', "running_view_count" = 0 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 Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 20:31:51', 100, '2012-10-02 00:00:00', 't', '2012-09-27 20:31:51', 50, 814558298, 1000, 'f', 0, '2012-09-22 00:00:00') Fixture Insert (0.0ms) 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-09-27 20:31:51', '2012-10-07 00:00:00', 't', '2012-09-27 20:31:51', 100, 394627963, 1000, 't', 0, '2012-09-27 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-09-27 20:31:51', '2012-10-07 00:00:00', 'f', '2012-09-27 20:31:51', 1000, 207249520, 1000, 't', 1, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 20:31:51', '2012-09-27 20:31:51', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 20:31:51', '2012-09-27 20:31:51', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "master_type") VALUES ('leaderboard_testing', 1, '2012-09-27 20:31:51', '2012-09-27 20:31:51', 405688915, 510529479, 'AdvertSelector::Placement') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_parade', 1, '2012-09-27 20:31:51', '2012-09-27 20:31:51', 207249520, 281932184, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 20:31:51', '2012-09-27 20:31:51', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') Fixture Delete (0.2ms) 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-09-27 20:31:51', '2012-09-27 20:31:51', '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-09-27 20:31:51', '2012-09-27 20:31:51', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 20:31:51', '2012-09-27 20:31:51', 'parade', 405688915)  (41.3ms) 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.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 20:31:51 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 2], ["updated_at", Thu, 27 Sep 2012 20:31:51 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 20:31:51 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 20:31:51 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 20:31:51 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 20:31:51 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 20:31:51.298644' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-27 20:31:51.299406' OR end_time IS NULL) AND (start_time < '2012-09-27 21:31:51.299532' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count)  (0.0ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-09-27 20:31:51.300394' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-09-27 20:31:51.301100' OR end_time IS NULL) AND (start_time < '2011-09-27 21:31:51.301213' 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.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.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:31:51.311660', "running_view_count" = 0 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 "updated_at" = '2012-09-27 20:31:51.317459', "running_view_count" = 1001 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.1ms) 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-09-27 20:31:51.323571' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 20:31:51.325585' 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 "end_time" = '2012-10-07 00:00:00.000000', "updated_at" = '2012-09-27 20:31:51.332814', "start_time" = '2012-09-26 21:00:00.000000', "target_view_count" = 100 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:31:51.334850', "running_view_count" = 0 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.0ms) SELECT COUNT(*) FROM "advert_selector_banners"  Processing by AdvertSelector::BannersController#create as HTML Parameters: {"banner"=>{"comment"=>"Pepsi banner", "name"=>"Pepsi", "end_time"=>"2012-10-07 00:00:00 UTC", "placement_id"=>"405688915", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-09-27 00:00:00 UTC"}}  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) 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", Thu, 27 Sep 2012 20:31:51 UTC +00:00], ["end_time", Sun, 07 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", Thu, 27 Sep 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Thu, 27 Sep 2012 20:31:51 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558299 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position SQL (0.2ms) 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position > 2) SQL (0.1ms) 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.6ms)  (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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/banners/_form.html.erb (130.2ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 146ms (Views: 144.4ms | ActiveRecord: 0.7ms)  (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]] Processing by AdvertSelector::BannersController#index as HTML AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners"  AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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.0ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = 405688915 LIMIT 1 Completed 200 OK in 10ms (Views: 8.8ms | ActiveRecord: 0.5ms)  (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]] 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.5ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 26ms (Views: 25.1ms | ActiveRecord: 0.5ms)  (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]] Processing by AdvertSelector::BannersController#show as HTML Parameters: {"id"=>"394627963"} Redirected to http://test.host/advert_selector/banners/394627963/edit Completed 302 Found in 0ms (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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.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.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.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items"   (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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.4ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 20:31:51 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", nil], ["position", 1], ["updated_at", Thu, 27 Sep 2012 20:31:51 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 20:31:51 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 20:31:51 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position >= 1) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 20:31:51 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", "some_limit_helper_here"], ["position", 1], ["updated_at", Thu, 27 Sep 2012 20:31:51 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-09-27 20:31:51.603345' WHERE "advert_selector_helper_items"."id" = 960656442  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1) SQL (0.0ms) 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position > 2)  (0.0ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "position" = 11, "updated_at" = '2012-09-27 20:31:51.605126' WHERE "advert_selector_helper_items"."id" = 960656441  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 11)  (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]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement'  (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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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]] 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.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-09-27 20:31:51.619875', "conflicting_placements_array" = 'not_found,video' WHERE "advert_selector_placements"."id" = 718799085 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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-09-27 20:31:51.622054', "conflicting_placements_array" = '' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-09-27 20:31:51.623332' WHERE "advert_selector_helper_items"."id" = 510529479  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE (LOWER(name) = 'parade') LIMIT 1 AdvertSelector::Placement Load (0.0ms) 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.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.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.5ms) INSERT INTO "advert_selector_placements" ("conflicting_placements_array", "created_at", "name", "only_once_per_session", "updated_at") VALUES (?, ?, ?, ?, ?) [["conflicting_placements_array", nil], ["created_at", Thu, 27 Sep 2012 20:31:51 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Thu, 27 Sep 2012 20:31:51 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 1019730478 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/1019730478 Completed 302 Found in 4ms (ActiveRecord: 0.6ms)  (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.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", "405688915"]]  (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"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position SQL (0.2ms) DELETE FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."id" = ? [["id", 510529479]] SQL (0.0ms) UPDATE "advert_selector_helper_items" SET position = (position - 1) WHERE ("advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position > 1) SQL (0.1ms) 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 4ms (ActiveRecord: 0.6ms)  (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  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/placements/_form.html.erb (15.5ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 24ms (Views: 22.8ms | ActiveRecord: 0.7ms)  (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::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" 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 Completed 200 OK in 10ms (Views: 8.4ms | ActiveRecord: 0.6ms)  (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]] 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 (12.4ms) 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" 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 Completed 200 OK in 21ms (Views: 20.0ms | 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#show as HTML Parameters: {"id"=>"405688915"} Redirected to http://test.host/advert_selector/placements/405688915/edit Completed 302 Found in 0ms (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 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.3ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-09-27 20:31:51.757374' WHERE "advert_selector_helper_items"."id" = 510529479  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1)  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/405688915 Completed 302 Found in 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]]  (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 "updated_at" = '2012-09-27 20:31:51.770249', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 20:31:51.772207' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:31:51 +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-09-27 20:31:51.780014' OR end_time IS NULL) AND (start_time < '2012-09-27 21:31:51.780199' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 10ms (Views: 9.0ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.2ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 20:31:51 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "always_false"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 20:31:51 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:31:51 +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-09-27 20:31:51.793656' OR end_time IS NULL) AND (start_time < '2012-09-27 21:31:51.793855' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] AdvertSelection finished Completed 200 OK in 5ms (Views: 4.6ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 "updated_at" = '2012-09-27 20:31:51.804683', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 20:31:51.806737' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.2ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 20:31:51 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "raise_error"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 20:31:51 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:31:51 +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-09-27 20:31:51.812444' OR end_time IS NULL) AND (start_time < '2012-09-27 21:31:51.812622' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] AdvertSelection finished Completed 200 OK in 5ms (Views: 4.8ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 "updated_at" = '2012-09-27 20:31:51.823385', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 20:31:51.825334' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:31:51.826927', "frequency" = 2 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:31:51 +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-09-27 20:31:51.829659' OR end_time IS NULL) AND (start_time < '2012-09-27 21:31:51.829853' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.7ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:31:51 +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-09-30 20:31:51.843783' OR end_time IS NULL) AND (start_time < '2012-09-30 21:31:51.843946' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.7ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:31:51 +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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 "updated_at" = '2012-09-30 20:31:51.860348', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 20:31:51.862411' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 20:31:51.864184' 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"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:31:51 +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-09-30 20:31:51.867553' OR end_time IS NULL) AND (start_time < '2012-09-30 21:31:51.867715' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner parade_banner in placement Parade [AdvertSelector] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.8ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:31:51 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 3ms (Views: 3.2ms | ActiveRecord: 0.1ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 "updated_at" = '2012-09-30 20:31:51.887337', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 20:31:51.889433' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 20:31:51.891389' 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"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.1ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-09-30 20:31:51.893549', "conflicting_placements_array" = '' WHERE "advert_selector_placements"."id" = 718799085 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE (LOWER(name) = 'leaderboard') LIMIT 1  (0.0ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-09-30 20:31:51.895344', "conflicting_placements_array" = '' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-09-30 20:31:51.896547' WHERE "advert_selector_helper_items"."id" = 510529479  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1) 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-09-30 20:31:51.898915', "conflicting_placements_array" = '' WHERE "advert_selector_placements"."id" = 1019730477 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 1019730477 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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 Sun Sep 30 23:31:51 +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-09-30 20:31:51.902873' OR end_time IS NULL) AND (start_time < '2012-09-30 21:31:51.903040' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner parade_banner in placement Parade [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 8ms (Views: 7.2ms | ActiveRecord: 0.5ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 "updated_at" = '2012-09-30 20:31:51.917220', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 20:31:51.920070' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:31:51 +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-09-30 20:31:51.922743' 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.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 8ms (Views: 7.4ms | ActiveRecord: 0.6ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:31:51 +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: 3.2ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 23:46:51 +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: 3.2ms | 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.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 20:31:51.951483', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 20:31:51.953455' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 20:31:51.955598', "only_once_per_session" = 't' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-09-30 20:31:51.956790' WHERE "advert_selector_helper_items"."id" = 510529479  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1)  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:31:51 +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-09-30 20:31:51.959978' OR end_time IS NULL) AND (start_time < '2012-09-30 21:31:51.960164' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.4ms | ActiveRecord: 0.5ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:31:51 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 1ms (Views: 1.3ms | ActiveRecord: 0.0ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 20:31:51.978526' OR end_time IS NULL) AND (start_time < '2012-09-30 21:31:51.978696' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.6ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 20:34:15', 100, '2012-10-02 00:00:00', 't', '2012-09-27 20:34:15', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 20:34:15', '2012-10-07 00:00:00', 't', '2012-09-27 20:34:15', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Insert (0.1ms) 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-09-27 20:34:15', '2012-10-07 00:00:00', 'f', '2012-09-27 20:34:15', 1000, 207249520, 1000, 't', 1, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 20:34:15', '2012-09-27 20:34:15', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 20:34:15', '2012-09-27 20:34:15', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "master_type") VALUES ('leaderboard_testing', 1, '2012-09-27 20:34:15', '2012-09-27 20:34:15', 405688915, 510529479, 'AdvertSelector::Placement') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_parade', 1, '2012-09-27 20:34:15', '2012-09-27 20:34:15', 207249520, 281932184, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 20:34:15', '2012-09-27 20:34:15', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') Fixture Delete (0.2ms) 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-09-27 20:34:15', '2012-09-27 20:34:15', 'leaderboard,video', 718799085) Fixture Insert (0.2ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "only_once_per_session", "id") VALUES ('Video', '2012-09-27 20:34:15', '2012-09-27 20:34:15', 'parade', 't', 1019730477) Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 20:34:15', '2012-09-27 20:34:15', 'parade', 405688915)  (41.2ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.3ms) 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.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 20:34:15 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 2], ["updated_at", Thu, 27 Sep 2012 20:34:15 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 20:34:15 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 20:34:15 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 20:34:15 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 20:34:15 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 20:34:15.535498' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-27 20:34:15.536527' OR end_time IS NULL) AND (start_time < '2012-09-27 21:34:15.536676' 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-09-27 20:34:15.537880' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-09-27 20:34:15.538707' OR end_time IS NULL) AND (start_time < '2011-09-27 21:34:15.538829' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count)  (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) 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-09-27 20:34:15.550140' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 AdvertSelector::Banner Load (0.1ms) 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" = 1001, "updated_at" = '2012-09-27 20:34:15.556775' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 AdvertSelector::Banner Load (0.1ms) 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.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:34:15.563533', "confirmed" = 'f' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:34:15.565659', "confirmed" = 't' 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 "target_view_count" = 100, "start_time" = '2012-09-26 21:00:00.000000', "updated_at" = '2012-09-27 20:34:15.573656', "end_time" = '2012-10-07 00:00:00.000000' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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" = 0, "updated_at" = '2012-09-27 20:34:15.575686' 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.0ms) SELECT COUNT(*) FROM "advert_selector_banners"  Processing by AdvertSelector::BannersController#create as HTML Parameters: {"banner"=>{"comment"=>"Pepsi banner", "name"=>"Pepsi", "end_time"=>"2012-10-07 00:00:00 UTC", "placement_id"=>"405688915", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-09-27 00:00:00 UTC"}}  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) 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", Thu, 27 Sep 2012 20:34:15 UTC +00:00], ["end_time", Sun, 07 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", Thu, 27 Sep 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Thu, 27 Sep 2012 20:34:15 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558299 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.1ms) 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.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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position > 2) SQL (0.1ms) 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.7ms)  (0.0ms) SELECT COUNT(*) FROM "advert_selector_banners"   (0.1ms) rollback transaction  (0.0ms) 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.1ms) 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.1ms) 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/banners/_form.html.erb (141.9ms) 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" 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 Completed 200 OK in 160ms (Views: 158.1ms | 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.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners"  AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.3ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 20ms (Views: 17.9ms | ActiveRecord: 0.9ms)  (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.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/banners/_form.html.erb (35.8ms) 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" 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 Completed 200 OK in 47ms (Views: 45.8ms | ActiveRecord: 0.7ms)  (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.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", "394627963"]]  (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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/banners/394627963 Completed 302 Found in 6ms (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.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.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items"   (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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.4ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 20:34:15 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", nil], ["position", 1], ["updated_at", Thu, 27 Sep 2012 20:34:15 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 20:34:15 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 20:34:15 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position >= 1) SQL (0.2ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 20:34:15 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", "some_limit_helper_here"], ["position", 1], ["updated_at", Thu, 27 Sep 2012 20:34:15 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-09-27 20:34:15.915820' WHERE "advert_selector_helper_items"."id" = 960656442  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1) SQL (0.0ms) 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position > 2)  (0.1ms) UPDATE "advert_selector_helper_items" SET "position" = 11, "content_for" = 'f', "updated_at" = '2012-09-27 20:34:15.917783' WHERE "advert_selector_helper_items"."id" = 960656441  (0.2ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 11)  (0.1ms) RELEASE SAVEPOINT active_record_1 AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 718799085]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement'  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items"  AdvertSelector::HelperItem Load (0.5ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position DESC LIMIT 1  (0.1ms) rollback transaction  (0.0ms) begin transaction AdvertSelector::Banner Load (0.3ms) 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.1ms) begin transaction AdvertSelector::Banner Load (0.4ms) 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.1ms) 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.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.2ms) SAVEPOINT active_record_1  (1.3ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = 'not_found,video', "updated_at" = '2012-09-27 20:34:15.956372' WHERE "advert_selector_placements"."id" = 718799085 AdvertSelector::HelperItem Load (0.3ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position AdvertSelector::Placement Load (0.4ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE (LOWER(name) = 'leaderboard') LIMIT 1  (0.2ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = '', "updated_at" = '2012-09-27 20:34:15.966073' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.2ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-09-27 20:34:15.968546' WHERE "advert_selector_helper_items"."id" = 510529479  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1) 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.1ms) 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.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.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.1ms) rollback transaction  (0.1ms) 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.1ms) SELECT COUNT(*) FROM "advert_selector_placements" Processing by AdvertSelector::PlacementsController#create as HTML Parameters: {"placement"=>{"name"=>"new placement"}}  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "advert_selector_placements" ("conflicting_placements_array", "created_at", "name", "only_once_per_session", "updated_at") VALUES (?, ?, ?, ?, ?) [["conflicting_placements_array", nil], ["created_at", Thu, 27 Sep 2012 20:34:16 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Thu, 27 Sep 2012 20:34:16 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 1019730478 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/1019730478 Completed 302 Found in 4ms (ActiveRecord: 0.7ms)  (0.1ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]] AdvertSelector::Placement Load (0.3ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_placements" Processing by AdvertSelector::PlacementsController#destroy as HTML Parameters: {"id"=>"405688915"} AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", "405688915"]]  (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"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position SQL (0.3ms) DELETE FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."id" = ? [["id", 510529479]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position - 1) WHERE ("advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position > 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 5ms (ActiveRecord: 0.8ms)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_placements"  (0.2ms) 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.1ms) 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  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/placements/_form.html.erb (28.0ms) AdvertSelector::Placement Load (0.3ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 AdvertSelector::Placement Load (0.4ms) 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 Completed 200 OK in 43ms (Views: 40.8ms | ActiveRecord: 1.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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (1.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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.3ms) 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 Completed 200 OK in 15ms (Views: 12.4ms | ActiveRecord: 1.9ms)  (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]] AdvertSelector::Placement Load (0.1ms) 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 (13.5ms) 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" 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 Completed 200 OK in 26ms (Views: 24.5ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.2ms) 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.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", "405688915"]]  (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"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.3ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-09-27 20:34:16.177623' WHERE "advert_selector_helper_items"."id" = 510529479  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1)  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/405688915 Completed 302 Found in 7ms (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]]  (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.4ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 20:34:16.200992' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:34:16.203434', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:34:16 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements [AdvertSelector] AdvertSelector::Banner Load (0.7ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time > '2012-09-27 20:34:16.211915' OR end_time IS NULL) AND (start_time < '2012-09-27 21:34:16.212124' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 17ms (Views: 15.2ms | ActiveRecord: 1.1ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1  (0.3ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.3ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 20:34:16 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "always_false"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 20:34:16 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:34:16 +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-09-27 20:34:16.235324' OR end_time IS NULL) AND (start_time < '2012-09-27 21:34:16.235521' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.1ms | ActiveRecord: 0.5ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.3ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]]  (0.0ms) SAVEPOINT active_record_1  (1.1ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 20:34:16.250839' WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:34:16.254609', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.7ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 20:34:16 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "raise_error"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 20:34:16 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:34:16 +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-09-27 20:34:16.265031' OR end_time IS NULL) AND (start_time < '2012-09-27 21:34:16.265237' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Error with Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 397318ms (Views: 397317.0ms | ActiveRecord: 0.5ms) AdvertSelector::HelperItem Load (0.6ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 20:40:53.597438' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:40:53.599670', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 20:40:53.601336' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:40:53 +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-09-27 20:40:53.604235' OR end_time IS NULL) AND (start_time < '2012-09-27 21:40:53.604412' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 7ms (Views: 6.0ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:40:53 +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-09-30 20:40:53.620235' OR end_time IS NULL) AND (start_time < '2012-09-30 21:40:53.620432' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 7ms (Views: 6.6ms | ActiveRecord: 0.5ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:40:53 +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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 20:40:53.638185' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 20:40:53.640236', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 20:40:53.642076', "confirmed" = 't' 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"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:40:53 +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-09-30 20:40:53.645803' OR end_time IS NULL) AND (start_time < '2012-09-30 21:40:53.645983' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner parade_banner in placement Parade [AdvertSelector] AdvertSelection finished Completed 200 OK in 7ms (Views: 6.0ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:40:53 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 4ms (Views: 3.3ms | ActiveRecord: 0.1ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.1ms) 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-09-30 20:40:53.666217' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 20:40:53.668239', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 20:40:53.670058', "confirmed" = 't' 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"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.1ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = '', "updated_at" = '2012-09-30 20:40:53.672245' WHERE "advert_selector_placements"."id" = 718799085 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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 "conflicting_placements_array" = '', "updated_at" = '2012-09-30 20:40:53.674181' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-09-30 20:40:53.675795' WHERE "advert_selector_helper_items"."id" = 510529479  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1) 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 "conflicting_placements_array" = '', "updated_at" = '2012-09-30 20:40:53.678305' WHERE "advert_selector_placements"."id" = 1019730477 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 1019730477 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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 Sun Sep 30 23:40:53 +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-09-30 20:40:53.682370' OR end_time IS NULL) AND (start_time < '2012-09-30 21:40:53.682536' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner parade_banner in placement Parade [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 8ms (Views: 7.6ms | ActiveRecord: 0.5ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 20:40:53.697306' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 20:40:53.699490', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:40:53 +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-09-30 20:40:53.701176' OR end_time IS NULL) ORDER BY priority desc [AdvertSelector] AdvertSelector::Placement Load (0.9ms) 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 7ms (Views: 5.9ms | ActiveRecord: 1.3ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:40:53 +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.6ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 23:55:53 +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.4ms | 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.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-30 20:40:53.725781' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 20:40:53.727892', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 "only_once_per_session" = 't', "updated_at" = '2012-09-30 20:40:53.730287' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-09-30 20:40:53.731669' WHERE "advert_selector_helper_items"."id" = 510529479  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1)  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:40:53 +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-09-30 20:40:53.735260' OR end_time IS NULL) AND (start_time < '2012-09-30 21:40:53.735449' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 7ms (Views: 6.0ms | ActiveRecord: 0.5ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:40:53 +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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.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]] 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-09-30 20:40:53.755878' OR end_time IS NULL) AND (start_time < '2012-09-30 21:40:53.756060' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 8ms (Views: 7.5ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 20:40:58', 100, '2012-10-02 00:00:00', 't', '2012-09-27 20:40:58', 50, 814558298, 1000, 'f', 0, '2012-09-22 00:00:00') Fixture Insert (0.0ms) 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-09-27 20:40:58', '2012-10-07 00:00:00', 't', '2012-09-27 20:40:58', 100, 394627963, 1000, 't', 0, '2012-09-27 00:00:00') Fixture Insert (0.1ms) 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-09-27 20:40:58', '2012-10-07 00:00:00', 'f', '2012-09-27 20:40:58', 1000, 207249520, 1000, 't', 1, '2012-09-27 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 20:40:58', '2012-09-27 20:40:58', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 20:40:58', '2012-09-27 20:40:58', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "master_type") VALUES ('leaderboard_testing', 1, '2012-09-27 20:40:58', '2012-09-27 20:40:58', 405688915, 510529479, 'AdvertSelector::Placement') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_parade', 1, '2012-09-27 20:40:58', '2012-09-27 20:40:58', 207249520, 281932184, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 20:40:58', '2012-09-27 20:40:58', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-27 20:40:58', '2012-09-27 20:40:58', '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-09-27 20:40:58', '2012-09-27 20:40:58', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 20:40:58', '2012-09-27 20:40:58', 'parade', 405688915)  (216.5ms) 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 20:40:58 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 2], ["updated_at", Thu, 27 Sep 2012 20:40:58 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 20:40:58 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 20:40:58 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 20:40:58 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 20:40:58 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 20:40:58.894168' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-27 20:40:58.894959' OR end_time IS NULL) AND (start_time < '2012-09-27 21:40:58.895069' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count)  (0.0ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-09-27 20:40:58.895942' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-09-27 20:40:58.896642' OR end_time IS NULL) AND (start_time < '2011-09-27 21:40:58.896749' 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.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.3ms) UPDATE "advert_selector_banners" SET "running_view_count" = 0, "updated_at" = '2012-09-27 20:40:58.907151' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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" = 1001, "updated_at" = '2012-09-27 20:40:58.913086' 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-09-27 20:40:58.919185' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 20:40:58.921206' 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 "end_time" = '2012-10-07 00:00:00.000000', "start_time" = '2012-09-26 21:00:00.000000', "target_view_count" = 100, "updated_at" = '2012-09-27 20:40:58.928833' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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" = 0, "updated_at" = '2012-09-27 20:40:58.930892' 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.0ms) SELECT COUNT(*) FROM "advert_selector_banners"  Processing by AdvertSelector::BannersController#create as HTML Parameters: {"banner"=>{"comment"=>"Pepsi banner", "name"=>"Pepsi", "end_time"=>"2012-10-07 00:00:00 UTC", "placement_id"=>"405688915", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-09-27 00:00:00 UTC"}}  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) 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", Thu, 27 Sep 2012 20:40:58 UTC +00:00], ["end_time", Sun, 07 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", Thu, 27 Sep 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Thu, 27 Sep 2012 20:40:58 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558299 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position SQL (0.2ms) 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 5ms (ActiveRecord: 0.7ms)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners"   (0.1ms) rollback transaction  (0.1ms) 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.1ms) 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/banners/_form.html.erb (127.4ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 143ms (Views: 141.7ms | ActiveRecord: 0.7ms)  (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]] Processing by AdvertSelector::BannersController#index as HTML AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners"  AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 10ms (Views: 9.0ms | ActiveRecord: 0.5ms)  (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]] 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.4ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 26ms (Views: 25.0ms | ActiveRecord: 0.5ms)  (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]] Processing by AdvertSelector::BannersController#show as HTML Parameters: {"id"=>"394627963"} Redirected to http://test.host/advert_selector/banners/394627963/edit Completed 302 Found in 0ms (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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.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.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.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items"   (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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.4ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 20:40:59 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", nil], ["position", 1], ["updated_at", Thu, 27 Sep 2012 20:40:59 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 20:40:59 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 20:40:59 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position >= 1) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 20:40:59 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", "some_limit_helper_here"], ["position", 1], ["updated_at", Thu, 27 Sep 2012 20:40:59 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-09-27 20:40:59.202637' WHERE "advert_selector_helper_items"."id" = 960656442  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1) SQL (0.0ms) 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position > 2)  (0.1ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "position" = 11, "updated_at" = '2012-09-27 20:40:59.204467' WHERE "advert_selector_helper_items"."id" = 960656441  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 11)  (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]]  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement'  (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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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]] 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.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-09-27 20:40:59.219314', "conflicting_placements_array" = 'not_found,video' WHERE "advert_selector_placements"."id" = 718799085 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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-09-27 20:40:59.221448', "conflicting_placements_array" = '' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-09-27 20:40:59.222983' WHERE "advert_selector_helper_items"."id" = 510529479  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE (LOWER(name) = 'parade') LIMIT 1 AdvertSelector::Placement Load (0.0ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."name" = 'not_found' LIMIT 1 AdvertSelector::Placement Load (0.1ms) 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.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.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", Thu, 27 Sep 2012 20:40:59 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Thu, 27 Sep 2012 20:40:59 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 1019730478 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/1019730478 Completed 302 Found in 4ms (ActiveRecord: 0.6ms)  (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 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position SQL (0.2ms) DELETE FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."id" = ? [["id", 510529479]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position - 1) WHERE ("advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position > 1) SQL (0.1ms) 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 4ms (ActiveRecord: 0.6ms)  (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.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]] 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  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/placements/_form.html.erb (15.3ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 24ms (Views: 22.5ms | ActiveRecord: 0.7ms)  (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]] Processing by AdvertSelector::PlacementsController#index as HTML AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  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" 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.0ms) 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 Completed 200 OK in 9ms (Views: 8.3ms | ActiveRecord: 0.6ms)  (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.1ms) 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 (12.5ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 20ms (Views: 19.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#show as HTML Parameters: {"id"=>"405688915"} Redirected to http://test.host/advert_selector/placements/405688915/edit Completed 302 Found in 0ms (ActiveRecord: 0.0ms)  (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]] 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 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.2ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-09-27 20:40:59.355824' WHERE "advert_selector_helper_items"."id" = 510529479  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1)  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/405688915 Completed 302 Found in 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]]  (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.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-27 20:40:59.368329' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 20:40:59.370336' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:40:59 +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-09-27 20:40:59.378154' OR end_time IS NULL) AND (start_time < '2012-09-27 21:40:59.378344' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 10ms (Views: 9.0ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.2ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 20:40:59 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "always_false"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 20:40:59 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:40:59 +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-09-27 20:40:59.391562' OR end_time IS NULL) AND (start_time < '2012-09-27 21:40:59.391718' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] AdvertSelection finished Completed 200 OK in 5ms (Views: 4.4ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 20:40:59.402239' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 20:40:59.404176' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.2ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 20:40:59 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "raise_error"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 20:40:59 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:40:59 +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-09-27 20:40:59.409493' OR end_time IS NULL) AND (start_time < '2012-09-27 21:40:59.409664' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Error with Coke in placement Leaderboard. 2012-09-27T23:40:59+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /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:32:in `send' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:32:in `advert_selector_banner_try' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:28:in `each' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:28:in `advert_selector_banner_try' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:12: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' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `__send__' /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 5ms (Views: 4.8ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 20:40:59.420481' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 20:40:59.422472' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 20:40:59.424048', "frequency" = 2 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Sep 27 23:40:59 +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-09-27 20:40:59.426883' OR end_time IS NULL) AND (start_time < '2012-09-27 21:40:59.427083' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.7ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.4ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:40:59 +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-09-30 20:40:59.448038' OR end_time IS NULL) AND (start_time < '2012-09-30 21:40:59.448614' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 9ms (Views: 8.3ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:40:59 +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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 20:40:59.465893' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 20:40:59.468028' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 20:40:59.469984' 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"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:40:59 +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-09-30 20:40:59.473851' OR end_time IS NULL) AND (start_time < '2012-09-30 21:40:59.474050' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner parade_banner in placement Parade [AdvertSelector] AdvertSelection finished Completed 200 OK in 7ms (Views: 6.3ms | ActiveRecord: 0.5ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:40:59 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 4ms (Views: 3.3ms | ActiveRecord: 0.1ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 20:40:59.494763' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 20:40:59.496828' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 20:40:59.498711' 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"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 20:40:59.500906', "conflicting_placements_array" = '' WHERE "advert_selector_placements"."id" = 718799085 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE (LOWER(name) = 'leaderboard') LIMIT 1  (0.0ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-09-30 20:40:59.502678', "conflicting_placements_array" = '' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-09-30 20:40:59.503893' WHERE "advert_selector_helper_items"."id" = 510529479  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1) 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-09-30 20:40:59.506225', "conflicting_placements_array" = '' WHERE "advert_selector_placements"."id" = 1019730477 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 1019730477 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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 Sun Sep 30 23:40:59 +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-09-30 20:40:59.510133' OR end_time IS NULL) AND (start_time < '2012-09-30 21:40:59.510309' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner parade_banner in placement Parade [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 8ms (Views: 7.5ms | ActiveRecord: 0.5ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 20:40:59.525276' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 20:40:59.527504' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:40:59 +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-09-30 20:40:59.529143' 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.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.1ms | ActiveRecord: 0.5ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:40:59 +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.4ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Sun Sep 30 23:55:59 +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 2ms (Views: 2.3ms | 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.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-30 20:40:59.551802' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 20:40:59.553877' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 20:40:59.556143', "only_once_per_session" = 't' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-09-30 20:40:59.557516' WHERE "advert_selector_helper_items"."id" = 510529479  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1)  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:40:59 +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-09-30 20:40:59.560941' OR end_time IS NULL) AND (start_time < '2012-09-30 21:40:59.561123' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.7ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Sun Sep 30 23:40:59 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 1ms (Views: 1.3ms | ActiveRecord: 0.0ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 20:40:59.580542' OR end_time IS NULL) AND (start_time < '2012-09-30 21:40:59.580735' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 7ms (Views: 6.0ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (1.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 21:38:03', 100, '2012-10-02 00:00:00', 't', '2012-09-27 21:38:03', 50, 814558298, 1000, 'f', 0, '2012-09-22 00:00:00') Fixture Insert (0.0ms) 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-09-27 21:38:03', '2012-10-07 00:00:00', 't', '2012-09-27 21:38:03', 100, 394627963, 1000, 't', 0, '2012-09-28 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-09-27 21:38:03', '2012-10-07 00:00:00', 'f', '2012-09-27 21:38:03', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 21:38:03', '2012-09-27 21:38:03', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 21:38:03', '2012-09-27 21:38:03', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "master_type") VALUES ('leaderboard_testing', 1, '2012-09-27 21:38:03', '2012-09-27 21:38:03', 405688915, 510529479, 'AdvertSelector::Placement') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_parade', 1, '2012-09-27 21:38:03', '2012-09-27 21:38:03', 207249520, 281932184, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 21:38:03', '2012-09-27 21:38:03', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-27 21:38:03', '2012-09-27 21:38:03', '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-09-27 21:38:03', '2012-09-27 21:38:03', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 21:38:03', '2012-09-27 21:38:03', 'parade', 405688915)  (41.0ms) commit transaction  (0.0ms) begin transaction AdvertSelector::Banner Load (0.3ms) 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.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 21:38:03 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 2], ["updated_at", Thu, 27 Sep 2012 21:38:03 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 21:38:03 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 21:38:03 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 21:38:03 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 21:38:03 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position DESC LIMIT 1  (0.3ms) 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) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-27 21:38:03.866260' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-27 21:38:03.867063' OR end_time IS NULL) AND (start_time < '2012-09-27 22:38:03.867177' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count)  (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.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 21:38:03.879932', "running_view_count" = 0 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 "updated_at" = '2012-09-27 21:38:03.886365', "running_view_count" = 1001 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 "updated_at" = '2012-09-27 21:38:03.893347', "confirmed" = 'f' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 21:38:03.895455', "confirmed" = 't' 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.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 21:38:03.903453', "end_time" = '2012-10-07 00:00:00.000000', "target_view_count" = 100, "start_time" = '2012-09-27 21:00:00.000000' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 21:38:03.905567', "running_view_count" = 0 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.0ms) SELECT COUNT(*) FROM "advert_selector_banners"  Processing by AdvertSelector::BannersController#create as HTML Parameters: {"banner"=>{"comment"=>"Pepsi banner", "name"=>"Pepsi", "end_time"=>"2012-10-07 00:00:00 UTC", "placement_id"=>"405688915", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-09-28 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", Thu, 27 Sep 2012 21:38:03 UTC +00:00], ["end_time", Sun, 07 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", Fri, 28 Sep 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Thu, 27 Sep 2012 21:38:03 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558299 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/banners/814558299 Completed 302 Found in 6ms (ActiveRecord: 0.8ms)  (0.1ms) 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.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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position > 2) SQL (0.1ms) 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.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]] Processing by AdvertSelector::BannersController#edit 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"]] 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/banners/_form.html.erb (166.4ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 185ms (Views: 183.0ms | 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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 11ms (Views: 9.9ms | ActiveRecord: 0.5ms)  (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]] Processing by AdvertSelector::BannersController#new as HTML AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/banners/_form.html.erb (19.5ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 28ms (Views: 27.1ms | ActiveRecord: 0.6ms)  (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]] 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.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]] 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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 8ms (Views: 7.3ms | 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.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items"  (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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.4ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 21:38:04 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", nil], ["position", 1], ["updated_at", Thu, 27 Sep 2012 21:38:04 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 21:38:04 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 21:38:04 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position >= 1) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 21:38:04 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", "some_limit_helper_here"], ["position", 1], ["updated_at", Thu, 27 Sep 2012 21:38:04 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "updated_at" = '2012-09-27 21:38:04.251748', "content_for" = 'f' WHERE "advert_selector_helper_items"."id" = 960656442  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1) SQL (0.0ms) 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position > 2)  (0.1ms) UPDATE "advert_selector_helper_items" SET "updated_at" = '2012-09-27 21:38:04.253633', "content_for" = 'f', "position" = 11 WHERE "advert_selector_helper_items"."id" = 960656441  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 11)  (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]]  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement'  (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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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]] 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.1ms) 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 "conflicting_placements_array" = 'not_found,video', "updated_at" = '2012-09-27 21:38:04.270156' WHERE "advert_selector_placements"."id" = 718799085 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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 "conflicting_placements_array" = '', "updated_at" = '2012-09-27 21:38:04.272484' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "updated_at" = '2012-09-27 21:38:04.273959', "content_for" = 'f' WHERE "advert_selector_helper_items"."id" = 510529479  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE (LOWER(name) = 'parade') LIMIT 1 AdvertSelector::Placement Load (0.0ms) 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.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.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.5ms) INSERT INTO "advert_selector_placements" ("conflicting_placements_array", "created_at", "name", "only_once_per_session", "updated_at") VALUES (?, ?, ?, ?, ?) [["conflicting_placements_array", nil], ["created_at", Thu, 27 Sep 2012 21:38:04 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Thu, 27 Sep 2012 21:38:04 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 1019730478 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/1019730478 Completed 302 Found in 4ms (ActiveRecord: 0.6ms)  (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 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position SQL (0.2ms) DELETE FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."id" = ? [["id", 510529479]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position - 1) WHERE ("advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position > 1) SQL (0.1ms) 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 4ms (ActiveRecord: 0.6ms)  (0.1ms) 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  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/placements/_form.html.erb (15.6ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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.0ms) 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 Completed 200 OK in 26ms (Views: 24.3ms | ActiveRecord: 0.7ms)  (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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 10ms (Views: 8.7ms | 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 (12.6ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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.0ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = 405688915 LIMIT 1 AdvertSelector::Placement Load (0.0ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = 405688915 LIMIT 1 Completed 200 OK in 21ms (Views: 19.9ms | 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 0ms (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.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", "405688915"]]  (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"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.2ms) UPDATE "advert_selector_helper_items" SET "updated_at" = '2012-09-27 21:38:04.419658', "content_for" = 'f' WHERE "advert_selector_helper_items"."id" = 510529479  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1)  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/405688915 Completed 302 Found in 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]]  (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 "updated_at" = '2012-09-27 21:38:04.434296', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 21:38:04.436232', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 00:38:04 +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-09-27 21:38:04.445397' OR end_time IS NULL) AND (start_time < '2012-09-27 22:38:04.445606' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 10ms (Views: 9.0ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.2ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 21:38:04 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "always_false"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 21:38:04 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 00:38:04 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements [AdvertSelector] AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time > '2012-09-27 21:38:04.458879' OR end_time IS NULL) AND (start_time < '2012-09-27 22:38:04.459045' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] AdvertSelection finished Completed 200 OK in 5ms (Views: 4.2ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 "updated_at" = '2012-09-27 21:38:04.470161', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 21:38:04.472136', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.2ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 21:38:04 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "raise_error"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 21:38:04 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 00:38:04 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements [AdvertSelector] AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time > '2012-09-27 21:38:04.477826' OR end_time IS NULL) AND (start_time < '2012-09-27 22:38:04.478036' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Error with banner Coke in placement Leaderboard. 2012-09-28T00:38:04+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /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:32:in `send' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:32:in `advert_selector_banner_try' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:28:in `each' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:28:in `advert_selector_banner_try' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:12: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' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `__send__' /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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 "updated_at" = '2012-09-27 21:38:04.490326', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 21:38:04.492383', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 21:38:04.494020', "frequency" = 2 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 00:38:04 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements [AdvertSelector] AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time > '2012-09-27 21:38:04.496780' OR end_time IS NULL) AND (start_time < '2012-09-27 22:38:04.496954' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.8ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Mon Oct 01 00:38:04 +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-09-30 21:38:04.511557' OR end_time IS NULL) AND (start_time < '2012-09-30 22:38:04.511730' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.9ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Mon Oct 01 00:38:04 +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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 "updated_at" = '2012-09-30 21:38:04.529240', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 21:38:04.531267', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 21:38:04.533016', "confirmed" = 't' 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"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Mon Oct 01 00:38:04 +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-09-30 21:38:04.536346' OR end_time IS NULL) AND (start_time < '2012-09-30 22:38:04.536525' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner parade_banner in placement Parade [AdvertSelector] AdvertSelection finished Completed 200 OK in 7ms (Views: 6.1ms | ActiveRecord: 0.5ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Mon Oct 01 00:38:04 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 4ms (Views: 3.3ms | ActiveRecord: 0.1ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 "updated_at" = '2012-09-30 21:38:04.558452', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 21:38:04.560527', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 21:38:04.562373', "confirmed" = 't' 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"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.1ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = '', "updated_at" = '2012-09-30 21:38:04.564515' WHERE "advert_selector_placements"."id" = 718799085 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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 "conflicting_placements_array" = '', "updated_at" = '2012-09-30 21:38:04.566407' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "updated_at" = '2012-09-30 21:38:04.567687', "content_for" = 'f' WHERE "advert_selector_helper_items"."id" = 510529479  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1) 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 "conflicting_placements_array" = '', "updated_at" = '2012-09-30 21:38:04.569933' WHERE "advert_selector_placements"."id" = 1019730477 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 1019730477 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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 Mon Oct 01 00:38:04 +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-09-30 21:38:04.573977' OR end_time IS NULL) AND (start_time < '2012-09-30 22:38:04.574157' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner parade_banner in placement Parade [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 8ms (Views: 7.5ms | ActiveRecord: 0.6ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 "updated_at" = '2012-09-30 21:38:04.589542', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 21:38:04.591726', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Mon Oct 01 00:38:04 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements [AdvertSelector] AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time > '2012-09-30 21:38:04.593806' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.3ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Mon Oct 01 00:38:04 +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 2ms (Views: 2.3ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Mon Oct 01 00:53:04 +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.4ms | 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.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 21:38:04.616920', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 21:38:04.618971', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 "only_once_per_session" = 't', "updated_at" = '2012-09-30 21:38:04.621329' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.2ms) UPDATE "advert_selector_helper_items" SET "updated_at" = '2012-09-30 21:38:04.622792', "content_for" = 'f' WHERE "advert_selector_helper_items"."id" = 510529479  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1)  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Mon Oct 01 00:38:04 +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-09-30 21:38:04.626330' OR end_time IS NULL) AND (start_time < '2012-09-30 22:38:04.626516' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.8ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Mon Oct 01 00:38:04 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 2ms (Views: 1.8ms | ActiveRecord: 0.0ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 21:38:04.647334' OR end_time IS NULL) AND (start_time < '2012-09-30 22:38:04.647519' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 7ms (Views: 6.3ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 21:38:53', 100, '2012-10-02 00:00:00', 't', '2012-09-27 21:38:53', 50, 814558298, 1000, 'f', 0, '2012-09-22 00:00:00') Fixture Insert (0.0ms) 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-09-27 21:38:53', '2012-10-07 00:00:00', 't', '2012-09-27 21:38:53', 100, 394627963, 1000, 't', 0, '2012-09-28 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-09-27 21:38:53', '2012-10-07 00:00:00', 'f', '2012-09-27 21:38:53', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 21:38:53', '2012-09-27 21:38:53', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 21:38:53', '2012-09-27 21:38:53', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "master_type") VALUES ('leaderboard_testing', 1, '2012-09-27 21:38:53', '2012-09-27 21:38:53', 405688915, 510529479, 'AdvertSelector::Placement') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_parade', 1, '2012-09-27 21:38:53', '2012-09-27 21:38:53', 207249520, 281932184, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 21:38:53', '2012-09-27 21:38:53', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') Fixture Delete (0.2ms) 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-09-27 21:38:53', '2012-09-27 21:38:53', '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-09-27 21:38:53', '2012-09-27 21:38:53', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 21:38:53', '2012-09-27 21:38:53', 'parade', 405688915)  (512.5ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.4ms) 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.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 21:38:54 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 2], ["updated_at", Thu, 27 Sep 2012 21:38:54 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 21:38:54 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 21:38:54 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 21:38:54 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 21:38:54 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 21:38:54.502673' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-27 21:38:54.503494' OR end_time IS NULL) AND (start_time < '2012-09-27 22:38:54.503613' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count)  (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) 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-09-27 21:38:54.516761' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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" = 1001, "updated_at" = '2012-09-27 21:38:54.523026' 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.2ms) 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-09-27 21:38:54.530211' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 21:38:54.532221' 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.3ms) UPDATE "advert_selector_banners" SET "end_time" = '2012-10-07 00:00:00.000000', "start_time" = '2012-09-27 21:00:00.000000', "updated_at" = '2012-09-27 21:38:54.540261', "target_view_count" = 100 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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" = 0, "updated_at" = '2012-09-27 21:38:54.542287' 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.0ms) SELECT COUNT(*) FROM "advert_selector_banners"  Processing by AdvertSelector::BannersController#create as HTML Parameters: {"banner"=>{"comment"=>"Pepsi banner", "name"=>"Pepsi", "end_time"=>"2012-10-07 00:00:00 UTC", "placement_id"=>"405688915", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-09-28 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", Thu, 27 Sep 2012 21:38:54 UTC +00:00], ["end_time", Sun, 07 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", Fri, 28 Sep 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Thu, 27 Sep 2012 21:38:54 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558299 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position SQL (0.2ms) 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position > 2) SQL (0.1ms) 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.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]] Processing by AdvertSelector::BannersController#edit 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"]] 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/banners/_form.html.erb (126.1ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 142ms (Views: 140.6ms | 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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 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]] 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 (19.1ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 27ms (Views: 26.0ms | 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 0ms (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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.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]] 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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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.0ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = 405688915 LIMIT 1 Completed 200 OK in 8ms (Views: 7.6ms | ActiveRecord: 0.4ms)  (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.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.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items"  (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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.4ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 21:38:54 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", nil], ["position", 1], ["updated_at", Thu, 27 Sep 2012 21:38:54 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 21:38:54 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 21:38:54 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position >= 1) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 21:38:54 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", "some_limit_helper_here"], ["position", 1], ["updated_at", Thu, 27 Sep 2012 21:38:54 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "updated_at" = '2012-09-27 21:38:54.841057', "content_for" = 'f' WHERE "advert_selector_helper_items"."id" = 960656442  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1) SQL (0.0ms) 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position > 2)  (0.1ms) UPDATE "advert_selector_helper_items" SET "updated_at" = '2012-09-27 21:38:54.842906', "content_for" = 'f', "position" = 11 WHERE "advert_selector_helper_items"."id" = 960656441  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 11)  (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]]  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement'  (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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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]] 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) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-09-27 21:38:54.859679', "conflicting_placements_array" = 'not_found,video' WHERE "advert_selector_placements"."id" = 718799085 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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-09-27 21:38:54.861795', "conflicting_placements_array" = '' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "updated_at" = '2012-09-27 21:38:54.863109', "content_for" = 'f' WHERE "advert_selector_helper_items"."id" = 510529479  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1) 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.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.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.5ms) INSERT INTO "advert_selector_placements" ("conflicting_placements_array", "created_at", "name", "only_once_per_session", "updated_at") VALUES (?, ?, ?, ?, ?) [["conflicting_placements_array", nil], ["created_at", Thu, 27 Sep 2012 21:38:54 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Thu, 27 Sep 2012 21:38:54 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 1019730478 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/1019730478 Completed 302 Found in 4ms (ActiveRecord: 0.6ms)  (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 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position SQL (0.2ms) DELETE FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."id" = ? [["id", 510529479]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position - 1) WHERE ("advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position > 1) SQL (0.1ms) 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 4ms (ActiveRecord: 0.6ms)  (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  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/placements/_form.html.erb (15.2ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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.0ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = 405688915 LIMIT 1 Completed 200 OK in 24ms (Views: 22.6ms | ActiveRecord: 0.7ms)  (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::Placement Load (0.3ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 16ms (Views: 14.4ms | ActiveRecord: 0.7ms)  (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 (12.5ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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.0ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = 405688915 LIMIT 1 Completed 200 OK in 20ms (Views: 19.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#show as HTML Parameters: {"id"=>"405688915"} Redirected to http://test.host/advert_selector/placements/405688915/edit Completed 302 Found in 0ms (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 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.3ms) UPDATE "advert_selector_helper_items" SET "updated_at" = '2012-09-27 21:38:55.011616', "content_for" = 'f' WHERE "advert_selector_helper_items"."id" = 510529479  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1)  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/405688915 Completed 302 Found in 4ms (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]]  (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.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 21:38:55.026562', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 21:38:55.028708' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 00:38:55 +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-09-27 21:38:55.043856' OR end_time IS NULL) AND (start_time < '2012-09-27 22:38:55.044485' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 16ms (Views: 15.1ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.2ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 21:38:55 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "always_false"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 21:38:55 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 00:38:55 +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-09-27 21:38:55.059065' OR end_time IS NULL) AND (start_time < '2012-09-27 22:38:55.059239' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] AdvertSelection finished Completed 200 OK in 5ms (Views: 4.3ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 "updated_at" = '2012-09-27 21:38:55.070662', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 21:38:55.072635' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.2ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 21:38:55 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "raise_error"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 21:38:55 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 00:38:55 +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-09-27 21:38:55.078087' OR end_time IS NULL) AND (start_time < '2012-09-27 22:38:55.078262' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Error with banner Coke in placement Leaderboard. 2012-09-28T00:38:55+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /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:32:in `send' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:32:in `advert_selector_banner_try' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:28:in `each' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:28:in `advert_selector_banner_try' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:12: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' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `__send__' /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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 "updated_at" = '2012-09-27 21:38:55.090521', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 21:38:55.092548' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-27 21:38:55.094163' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 00:38:55 +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-09-27 21:38:55.096938' OR end_time IS NULL) AND (start_time < '2012-09-27 22:38:55.097121' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Mon Oct 01 00:38:55 +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-09-30 21:38:55.110553' OR end_time IS NULL) AND (start_time < '2012-09-30 22:38:55.110728' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.8ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Mon Oct 01 00:38:55 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 2ms (Views: 1.3ms | ActiveRecord: 0.0ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 "updated_at" = '2012-09-30 21:38:55.128049', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 21:38:55.130115' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 21:38:55.131922' 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"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Mon Oct 01 00:38:55 +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-09-30 21:38:55.135463' OR end_time IS NULL) AND (start_time < '2012-09-30 22:38:55.135640' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner parade_banner in placement Parade [AdvertSelector] AdvertSelection finished Completed 200 OK in 7ms (Views: 5.9ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Mon Oct 01 00:38:55 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 3ms (Views: 3.2ms | ActiveRecord: 0.1ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 "updated_at" = '2012-09-30 21:38:55.156641', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 21:38:55.158908' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 21:38:55.160893' 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"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.1ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-09-30 21:38:55.163291', "conflicting_placements_array" = '' WHERE "advert_selector_placements"."id" = 718799085 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE (LOWER(name) = 'leaderboard') LIMIT 1  (0.0ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-09-30 21:38:55.165064', "conflicting_placements_array" = '' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "updated_at" = '2012-09-30 21:38:55.166353', "content_for" = 'f' WHERE "advert_selector_helper_items"."id" = 510529479  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1) 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-09-30 21:38:55.168649', "conflicting_placements_array" = '' WHERE "advert_selector_placements"."id" = 1019730477 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 1019730477 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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 Mon Oct 01 00:38:55 +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-09-30 21:38:55.172630' OR end_time IS NULL) AND (start_time < '2012-09-30 22:38:55.172809' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner parade_banner in placement Parade [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [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"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 "updated_at" = '2012-09-30 21:38:55.188156', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 21:38:55.190237' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Mon Oct 01 00:38:55 +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-09-30 21:38:55.191813' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Mon Oct 01 00:38:55 +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.4ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Mon Oct 01 00:53:55 +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 2ms (Views: 2.3ms | 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.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 21:38:55.214848', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 21:38:55.216893' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 21:38:55.219255', "only_once_per_session" = 't' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "updated_at" = '2012-09-30 21:38:55.220596', "content_for" = 'f' WHERE "advert_selector_helper_items"."id" = 510529479  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1)  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Mon Oct 01 00:38:55 +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-09-30 21:38:55.223981' OR end_time IS NULL) AND (start_time < '2012-09-30 22:38:55.224165' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.8ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Mon Oct 01 00:38:55 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 2ms (Views: 1.7ms | ActiveRecord: 0.0ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 21:38:55.244881' OR end_time IS NULL) AND (start_time < '2012-09-30 22:38:55.245069' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 7ms (Views: 6.1ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 21:39:55', 100, '2012-10-02 00:00:00', 't', '2012-09-27 21:39:55', 50, 814558298, 1000, 'f', 0, '2012-09-22 00:00:00') Fixture Insert (0.0ms) 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-09-27 21:39:55', '2012-10-07 00:00:00', 't', '2012-09-27 21:39:55', 100, 394627963, 1000, 't', 0, '2012-09-28 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-09-27 21:39:55', '2012-10-07 00:00:00', 'f', '2012-09-27 21:39:55', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 21:39:55', '2012-09-27 21:39:55', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 21:39:55', '2012-09-27 21:39:55', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "master_type") VALUES ('leaderboard_testing', 1, '2012-09-27 21:39:55', '2012-09-27 21:39:55', 405688915, 510529479, 'AdvertSelector::Placement') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_parade', 1, '2012-09-27 21:39:55', '2012-09-27 21:39:55', 207249520, 281932184, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 21:39:55', '2012-09-27 21:39:55', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-27 21:39:55', '2012-09-27 21:39:55', '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-09-27 21:39:55', '2012-09-27 21:39:55', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 21:39:55', '2012-09-27 21:39:55', 'parade', 405688915)  (47.7ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.7ms) 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.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 21:39:55 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 2], ["updated_at", Thu, 27 Sep 2012 21:39:55 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 21:39:55 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 21:39:55 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 21:39:55 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 21:39:55 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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]] AdvertSelector::Banner Load (0.4ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" AdvertSelector::Banner Load (0.4ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" LIMIT 1 AdvertSelector::Banner Load (0.4ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" LIMIT 1 AdvertSelector::Banner Load (0.4ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" LIMIT 1 AdvertSelector::Banner Load (0.4ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" LIMIT 1 AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" LIMIT 1 AdvertSelector::Banner Load (0.4ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" LIMIT 1 AdvertSelector::Banner Load (0.4ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" LIMIT 1 AdvertSelector::Banner Load (0.4ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" LIMIT 1 AdvertSelector::Banner Load (0.6ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" LIMIT 1 AdvertSelector::Banner Load (0.4ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" LIMIT 1  (0.3ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-27 21:42:52.889675' OR end_time IS NULL)  (0.3ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-27 21:42:52.893234' OR end_time IS NULL) AND (start_time < '2012-09-27 22:42:52.893692' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count)  (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.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 21:42:52.918236', "running_view_count" = 0 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 21:42:52.924738', "running_view_count" = 1001 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]]  (0.4ms) rollback transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.3ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]]  (0.1ms) SAVEPOINT active_record_1  (1.0ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 21:42:53.262409', "confirmed" = 'f' WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.3ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 21:42:53.270028', "confirmed" = 't' 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.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 21:42:53.278443', "start_time" = '2012-09-27 21:00:00.000000', "end_time" = '2012-10-07 00:00:00.000000', "target_view_count" = 100 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 21:42:53.280445', "running_view_count" = 0 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 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", 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.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", 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.0ms) SELECT COUNT(*) FROM "advert_selector_banners" Processing by AdvertSelector::BannersController#create as HTML Parameters: {"banner"=>{"comment"=>"Pepsi banner", "name"=>"Pepsi", "end_time"=>"2012-10-07 00:00:00 UTC", "placement_id"=>"405688915", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-09-28 00:00:00 UTC"}}  (0.0ms) 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", Thu, 27 Sep 2012 21:42:53 UTC +00:00], ["end_time", Sun, 07 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", Fri, 28 Sep 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Thu, 27 Sep 2012 21:42:53 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558299 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.1ms) 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.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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 5ms (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.1ms) 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/banners/_form.html.erb (43.7ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 60ms (Views: 58.2ms | ActiveRecord: 0.7ms)  (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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 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.6ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 26ms (Views: 25.5ms | ActiveRecord: 0.5ms)  (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]] 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.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]] 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.1ms) 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::Placement Load (0.3ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.4ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 16ms (Views: 15.3ms | ActiveRecord: 0.9ms)  (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.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items"   (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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.4ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 21:42:53 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", nil], ["position", 1], ["updated_at", Thu, 27 Sep 2012 21:42:53 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Thu, 27 Sep 2012 21:42:53 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Thu, 27 Sep 2012 21:42:53 UTC +00:00]] SQL (4.3ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position >= 1) SQL (0.3ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 21:42:53 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", "some_limit_helper_here"], ["position", 1], ["updated_at", Thu, 27 Sep 2012 21:42:53 UTC +00:00]] AdvertSelector::HelperItem Load (0.4ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.3ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-09-27 21:42:53.597891' WHERE "advert_selector_helper_items"."id" = 960656442  (0.2ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1) SQL (0.1ms) DELETE FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."id" = ? [["id", 960656440]] SQL (0.2ms) UPDATE "advert_selector_helper_items" SET position = (position - 1) WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position > 2)  (0.2ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-09-27 21:42:53.604091', "position" = 11 WHERE "advert_selector_helper_items"."id" = 960656441  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 11)  (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]]  (0.2ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement'  (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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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]] 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) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = 'not_found,video', "updated_at" = '2012-09-27 21:42:53.621899' WHERE "advert_selector_placements"."id" = 718799085 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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 "conflicting_placements_array" = '', "updated_at" = '2012-09-27 21:42:53.624324' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-09-27 21:42:53.625811' WHERE "advert_selector_helper_items"."id" = 510529479  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE (LOWER(name) = 'parade') LIMIT 1 AdvertSelector::Placement Load (0.0ms) 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.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.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.1ms) 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.5ms) INSERT INTO "advert_selector_placements" ("conflicting_placements_array", "created_at", "name", "only_once_per_session", "updated_at") VALUES (?, ?, ?, ?, ?) [["conflicting_placements_array", nil], ["created_at", Thu, 27 Sep 2012 21:42:53 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Thu, 27 Sep 2012 21:42:53 UTC +00:00]] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 1019730478 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/1019730478 Completed 302 Found in 4ms (ActiveRecord: 0.6ms)  (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 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position SQL (0.2ms) DELETE FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."id" = ? [["id", 510529479]] SQL (0.0ms) UPDATE "advert_selector_helper_items" SET position = (position - 1) WHERE ("advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position > 1) SQL (0.1ms) 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 4ms (ActiveRecord: 0.6ms)  (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  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/placements/_form.html.erb (15.6ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 24ms (Views: 23.0ms | ActiveRecord: 0.7ms)  (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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 10ms (Views: 8.8ms | 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 (12.7ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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.0ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = 405688915 LIMIT 1 Completed 200 OK in 20ms (Views: 19.6ms | ActiveRecord: 0.5ms)  (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]] Processing by AdvertSelector::PlacementsController#show as HTML Parameters: {"id"=>"405688915"} Redirected to http://test.host/advert_selector/placements/405688915/edit Completed 302 Found in 0ms (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 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.3ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-09-27 21:42:53.768546' WHERE "advert_selector_helper_items"."id" = 510529479  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1)  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/405688915 Completed 302 Found in 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]]  (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 "updated_at" = '2012-09-27 21:42:53.783208', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 21:42:53.785249', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 00:42:53 +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-09-27 21:42:53.793237' OR end_time IS NULL) AND (start_time < '2012-09-27 22:42:53.793439' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 10ms (Views: 9.0ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.2ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 21:42:53 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "always_false"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 21:42:53 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 00:42:53 +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-09-27 21:42:53.807071' OR end_time IS NULL) AND (start_time < '2012-09-27 22:42:53.807247' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] AdvertSelection finished Completed 200 OK in 5ms (Views: 4.3ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 "updated_at" = '2012-09-27 21:42:53.818311', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 21:42:53.820319', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.2ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Thu, 27 Sep 2012 21:42:53 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "raise_error"], ["position", 0], ["updated_at", Thu, 27 Sep 2012 21:42:53 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 00:42:53 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements [AdvertSelector] AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time > '2012-09-27 21:42:53.825804' OR end_time IS NULL) AND (start_time < '2012-09-27 22:42:53.825983' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Error with banner Coke in placement Leaderboard. 2012-09-28T00:42:53+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /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:32:in `send' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:32:in `advert_selector_banner_try' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:28:in `each' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:28:in `advert_selector_banner_try' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:12: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' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `__send__' /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.3ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 "updated_at" = '2012-09-27 21:42:53.838285', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 21:42:53.840360', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-27 21:42:53.842049', "frequency" = 2 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 00:42:53 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements [AdvertSelector] AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time > '2012-09-27 21:42:53.844742' OR end_time IS NULL) AND (start_time < '2012-09-27 22:42:53.844917' 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 (405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.5ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Mon Oct 01 00:42:53 +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-09-30 21:42:53.858309' OR end_time IS NULL) AND (start_time < '2012-09-30 22:42:53.858479' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.9ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Mon Oct 01 00:42:53 +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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 "updated_at" = '2012-09-30 21:42:53.875995', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 21:42:53.878051', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 21:42:53.879912', "confirmed" = 't' 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"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Mon Oct 01 00:42:53 +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-09-30 21:42:53.883414' OR end_time IS NULL) AND (start_time < '2012-09-30 22:42:53.883584' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner parade_banner in placement Parade [AdvertSelector] AdvertSelection finished Completed 200 OK in 7ms (Views: 6.0ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Mon Oct 01 00:42:53 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 4ms (Views: 3.7ms | ActiveRecord: 0.1ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 "updated_at" = '2012-09-30 21:42:53.905485', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 21:42:53.907622', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 21:42:53.909509', "confirmed" = 't' 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"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.1ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = '', "updated_at" = '2012-09-30 21:42:53.911866' WHERE "advert_selector_placements"."id" = 718799085 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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 "conflicting_placements_array" = '', "updated_at" = '2012-09-30 21:42:53.913708' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-09-30 21:42:53.915032' WHERE "advert_selector_helper_items"."id" = 510529479  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1) 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 "conflicting_placements_array" = '', "updated_at" = '2012-09-30 21:42:53.917369' WHERE "advert_selector_placements"."id" = 1019730477 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 1019730477 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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 Mon Oct 01 00:42:53 +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-09-30 21:42:53.921542' OR end_time IS NULL) AND (start_time < '2012-09-30 22:42:53.921746' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner parade_banner in placement Parade [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 8ms (Views: 7.7ms | ActiveRecord: 0.6ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 "updated_at" = '2012-09-30 21:42:53.937980', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 21:42:53.940069', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Mon Oct 01 00:42:53 +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-09-30 21:42:53.941804' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Mon Oct 01 00:42:53 +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.6ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Mon Oct 01 00:57:53 +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.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 21:42:53.967396', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 21:42:53.969574', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 21:42:53.971991', "only_once_per_session" = 't' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.2ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-09-30 21:42:53.973359' WHERE "advert_selector_helper_items"."id" = 510529479  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1)  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Mon Oct 01 00:42:53 +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-09-30 21:42:53.976968' OR end_time IS NULL) AND (start_time < '2012-09-30 22:42:53.977151' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 7ms (Views: 6.1ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Mon Oct 01 00:42:53 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 2ms (Views: 1.5ms | ActiveRecord: 0.0ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-30 21:42:53.998260' OR end_time IS NULL) AND (start_time < '2012-09-30 22:42:53.998444' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 7ms (Views: 6.3ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 21:43:00', 100, '2012-10-02 00:00:00', 't', '2012-09-27 21:43:00', 50, 814558298, 1000, 'f', 0, '2012-09-22 00:00:00') Fixture Insert (0.0ms) 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-09-27 21:43:00', '2012-10-07 00:00:00', 't', '2012-09-27 21:43:00', 100, 394627963, 1000, 't', 0, '2012-09-28 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-09-27 21:43:00', '2012-10-07 00:00:00', 'f', '2012-09-27 21:43:00', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 21:43:00', '2012-09-27 21:43:00', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 21:43:00', '2012-09-27 21:43:00', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "master_type") VALUES ('leaderboard_testing', 1, '2012-09-27 21:43:00', '2012-09-27 21:43:00', 405688915, 510529479, 'AdvertSelector::Placement') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_parade', 1, '2012-09-27 21:43:00', '2012-09-27 21:43:00', 207249520, 281932184, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 21:43:00', '2012-09-27 21:43:00', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') Fixture Delete (0.2ms) 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-09-27 21:43:00', '2012-09-27 21:43:00', '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-09-27 21:43:00', '2012-09-27 21:43:00', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 21:43:00', '2012-09-27 21:43:00', 'parade', 405688915)  (42.6ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.5ms) 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.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.6ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 2], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Fri, 28 Sep 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-28 09:00:00.000069' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-28 09:00:00.000881' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.001002' 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-09-28 09:00:00.001878' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-09-28 09:00:00.002592' OR end_time IS NULL) AND (start_time < '2011-09-28 10:00:00.002714' 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.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.3ms) UPDATE "advert_selector_banners" SET "running_view_count" = 0, "updated_at" = '2012-09-28 09:00:00.000876' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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" = 1001, "updated_at" = '2012-09-28 09:00:00.006772' 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-09-28 09:00:00.000409' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-28 09:00:00.002417' 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.3ms) UPDATE "advert_selector_banners" SET "target_view_count" = 100, "end_time" = '2012-10-08 00:00:00.000000', "updated_at" = '2012-09-28 09:00:00.000823', "start_time" = '2012-09-27 21:00:00.000000' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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" = 0, "updated_at" = '2012-09-28 09:00:00.003019' 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.0ms) SELECT COUNT(*) FROM "advert_selector_banners"  Processing by AdvertSelector::BannersController#create as HTML Parameters: {"banner"=>{"comment"=>"Pepsi banner", "name"=>"Pepsi", "end_time"=>"2012-10-07 00:00:00 UTC", "placement_id"=>"405688915", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-09-28 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["end_time", Sun, 07 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", Fri, 28 Sep 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Fri, 28 Sep 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"."master_id" = 814558299 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.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]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" Processing by AdvertSelector::BannersController#destroy 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"]]  (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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position SQL (0.2ms) 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position > 2) SQL (0.1ms) 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.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]] Processing by AdvertSelector::BannersController#edit 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"]] 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/banners/_form.html.erb (126.6ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 143ms (Views: 141.2ms | 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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 11ms (Views: 9.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#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.6ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 26ms (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 0ms (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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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]] 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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 8ms (Views: 7.6ms | 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.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items"  (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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.4ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", nil], ["position", 1], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position >= 1) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", "some_limit_helper_here"], ["position", 1], ["updated_at", Fri, 28 Sep 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-09-28 09:00:00.008967' WHERE "advert_selector_helper_items"."id" = 960656442  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1) SQL (0.0ms) 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position > 2)  (0.1ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "position" = 11, "updated_at" = '2012-09-28 09:00:00.010902' WHERE "advert_selector_helper_items"."id" = 960656441  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 11)  (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]]  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement'  (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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position DESC LIMIT 1  (0.3ms) rollback transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.3ms) 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]] 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.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-09-28 09:00:00.001189', "conflicting_placements_array" = 'not_found,video' WHERE "advert_selector_placements"."id" = 718799085 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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-09-28 09:00:00.003311', "conflicting_placements_array" = '' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.2ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-09-28 09:00:00.004642' WHERE "advert_selector_helper_items"."id" = 510529479  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1) 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.1ms) 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.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.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.5ms) INSERT INTO "advert_selector_placements" ("conflicting_placements_array", "created_at", "name", "only_once_per_session", "updated_at") VALUES (?, ?, ?, ?, ?) [["conflicting_placements_array", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Fri, 28 Sep 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"."master_id" = 1019730478 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/1019730478 Completed 302 Found in 4ms (ActiveRecord: 0.6ms)  (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.1ms) 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 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position SQL (0.3ms) DELETE FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."id" = ? [["id", 510529479]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position - 1) WHERE ("advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position > 1) SQL (0.1ms) 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 4ms (ActiveRecord: 0.7ms)  (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  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/placements/_form.html.erb (15.5ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 24ms (Views: 23.0ms | ActiveRecord: 0.7ms)  (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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 10ms (Views: 8.5ms | 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 (12.5ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 20ms (Views: 19.0ms | 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 0ms (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 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.3ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-09-28 09:00:00.004321' WHERE "advert_selector_helper_items"."id" = 510529479  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1)  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/405688915 Completed 302 Found in 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]]  (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 "updated_at" = '2012-09-28 09:00:00.000391', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-28 09:00:00.002432' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.006443' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.006639' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 10ms (Views: 9.1ms | ActiveRecord: 0.5ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.2ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "always_false"], ["position", 0], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.020100' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.020266' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] AdvertSelection finished Completed 200 OK in 5ms (Views: 4.5ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 "updated_at" = '2012-09-28 09:00:00.000406', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-28 09:00:00.002393' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.2ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "raise_error"], ["position", 0], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.004069' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.004260' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Error with banner Coke in placement Leaderboard. 2012-09-28T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /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:32:in `send' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:32:in `advert_selector_banner_try' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:28:in `each' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:28:in `advert_selector_banner_try' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:12: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' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `__send__' /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.8ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 "updated_at" = '2012-09-28 09:00:00.000408', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-28 09:00:00.002431' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-28 09:00:00.000315' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.003194' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.003369' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.9ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.017217' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.017388' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.7ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Mon Oct 01 12:00:00 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 1ms (Views: 1.3ms | ActiveRecord: 0.0ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 "updated_at" = '2012-10-01 09:00:00.000405', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-01 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-01 09:00:00.000446' 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"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.003826' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.004020' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner parade_banner in placement Parade [AdvertSelector] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.9ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Mon Oct 01 12:00:00 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 4ms (Views: 3.3ms | ActiveRecord: 0.1ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 "updated_at" = '2012-10-01 09:00:00.000403', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-01 09:00:00.002363' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-01 09:00:00.000433' 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"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.1ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-10-01 09:00:00.002648', "conflicting_placements_array" = '' WHERE "advert_selector_placements"."id" = 718799085 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE (LOWER(name) = 'leaderboard') LIMIT 1  (0.0ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-10-01 09:00:00.004469', "conflicting_placements_array" = '' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-10-01 09:00:00.005752' WHERE "advert_selector_helper_items"."id" = 510529479  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1) 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.0ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-10-01 09:00:00.008073', "conflicting_placements_array" = '' WHERE "advert_selector_placements"."id" = 1019730477 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 1019730477 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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 Mon Oct 01 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-01 09:00:00.011942' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.012119' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner parade_banner in placement Parade [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 8ms (Views: 7.3ms | ActiveRecord: 0.5ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 "updated_at" = '2012-10-01 09:00:00.000437', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-01 09:00:00.002466' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.000220' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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 2ms (Views: 2.3ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Mon Oct 01 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 2ms (Views: 2.3ms | 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.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-01 09:00:00.000410', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-01 09:00:00.002515' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.3ms) 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 "only_once_per_session" = 't', "updated_at" = '2012-10-01 09:00:00.000926' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.2ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-10-01 09:00:00.002299' WHERE "advert_selector_helper_items"."id" = 510529479  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1)  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.005685' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.005860' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 7ms (Views: 6.0ms | ActiveRecord: 0.5ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-01 09:00:00.002451' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.002650' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 7ms (Views: 6.1ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.3ms) 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-09-27 21:43:27', 100, '2012-10-02 00:00:00', 't', '2012-09-27 21:43:27', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 21:43:27', '2012-10-07 00:00:00', 't', '2012-09-27 21:43:27', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-27 21:43:27', '2012-10-07 00:00:00', 'f', '2012-09-27 21:43:27', 1000, 207249520, 1000, 't', 1, '2012-09-28 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", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 21:43:27', '2012-09-27 21:43:27', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 21:43:27', '2012-09-27 21:43:27', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "master_type") VALUES ('leaderboard_testing', 1, '2012-09-27 21:43:27', '2012-09-27 21:43:27', 405688915, 510529479, 'AdvertSelector::Placement') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_parade', 1, '2012-09-27 21:43:27', '2012-09-27 21:43:27', 207249520, 281932184, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 21:43:27', '2012-09-27 21:43:27', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') Fixture Delete (0.3ms) DELETE FROM "advert_selector_placements" Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Parade', '2012-09-27 21:43:27', '2012-09-27 21:43:27', 'leaderboard,video', 718799085) Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "only_once_per_session", "id") VALUES ('Video', '2012-09-27 21:43:27', '2012-09-27 21:43:27', 'parade', 't', 1019730477) Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 21:43:27', '2012-09-27 21:43:27', 'parade', 405688915)  (43.5ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.3ms) 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.1ms) 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.3ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.9ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 2], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 10) SQL (0.3ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]] SQL (0.3ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.2ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position SQL (0.2ms) 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position > 3)  (0.0ms) RELEASE SAVEPOINT active_record_1 AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position LIMIT 1 AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position DESC LIMIT 1  (0.2ms) rollback transaction  (0.1ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) 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-09-28 09:00:00.000137' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-28 09:00:00.001526' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.001681' 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-09-28 09:00:00.002833' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-09-28 09:00:00.004335' OR end_time IS NULL) AND (start_time < '2011-09-28 10:00:00.004579' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count)  (0.1ms) rollback transaction  (0.1ms) 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.1ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]]  (0.1ms) SAVEPOINT active_record_1  (0.5ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.001557', "running_view_count" = 0 WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.1ms) RELEASE SAVEPOINT active_record_1 AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]]  (0.1ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.012081', "running_view_count" = 1001 WHERE "advert_selector_banners"."id" = 814558298  (0.1ms) RELEASE SAVEPOINT active_record_1 AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]]  (0.2ms) rollback transaction  (0.1ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]]  (0.1ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.000694', "confirmed" = 'f' WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.004408', "confirmed" = 't' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 AdvertSelector::Banner Load (0.1ms) 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.3ms) UPDATE "advert_selector_banners" SET "start_time" = '2012-09-27 21:00:00.000000', "updated_at" = '2012-09-28 09:00:00.000935', "end_time" = '2012-10-08 00:00:00.000000', "target_view_count" = 100 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.003487', "running_view_count" = 0 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.1ms) 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", 814558298]] 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", 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", "end_time"=>"2012-10-07 00:00:00 UTC", "placement_id"=>"405688915", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-09-28 00:00:00 UTC"}}  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["end_time", Sun, 07 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", Fri, 28 Sep 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Fri, 28 Sep 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"."master_id" = 814558299 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/banners/814558299 Completed 302 Found in 6ms (ActiveRecord: 0.9ms)  (0.1ms) 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.1ms) 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.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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 5ms (ActiveRecord: 0.9ms)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners"   (0.1ms) rollback transaction  (0.1ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", "394627963"]] AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  (0.2ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/banners/_form.html.erb (193.6ms) AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.3ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 AdvertSelector::Placement Load (0.2ms) 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 Completed 200 OK in 223ms (Views: 220.0ms | ActiveRecord: 1.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#index as HTML AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners"  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" 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 Completed 200 OK in 13ms (Views: 11.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#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.7ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 27ms (Views: 25.8ms | 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.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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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]] 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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 8ms (Views: 7.3ms | 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.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items"  (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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", nil], ["position", 1], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position >= 1) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", "some_limit_helper_here"], ["position", 1], ["updated_at", Fri, 28 Sep 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "updated_at" = '2012-09-28 09:00:00.009282', "content_for" = 'f' WHERE "advert_selector_helper_items"."id" = 960656442  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1) SQL (0.0ms) 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position > 2)  (0.1ms) UPDATE "advert_selector_helper_items" SET "updated_at" = '2012-09-28 09:00:00.011256', "position" = 11, "content_for" = 'f' WHERE "advert_selector_helper_items"."id" = 960656441  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 11)  (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]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement'  (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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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]] 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.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = 'not_found,video', "updated_at" = '2012-09-28 09:00:00.001212' WHERE "advert_selector_placements"."id" = 718799085 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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 "conflicting_placements_array" = '', "updated_at" = '2012-09-28 09:00:00.003441' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "updated_at" = '2012-09-28 09:00:00.004860', "content_for" = 'f' WHERE "advert_selector_helper_items"."id" = 510529479  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1) 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.1ms) 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.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]] 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.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.1ms) rollback transaction  (0.1ms) 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.1ms) SELECT COUNT(*) FROM "advert_selector_placements"  Processing by AdvertSelector::PlacementsController#create as HTML Parameters: {"placement"=>{"name"=>"new placement"}}  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "advert_selector_placements" ("conflicting_placements_array", "created_at", "name", "only_once_per_session", "updated_at") VALUES (?, ?, ?, ?, ?) [["conflicting_placements_array", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Fri, 28 Sep 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"."master_id" = 1019730478 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/1019730478 Completed 302 Found in 4ms (ActiveRecord: 0.7ms)  (0.1ms) 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.1ms) SELECT COUNT(*) FROM "advert_selector_placements"  Processing by AdvertSelector::PlacementsController#destroy as HTML Parameters: {"id"=>"405688915"} AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", "405688915"]]  (0.0ms) SAVEPOINT active_record_1 AdvertSelector::HelperItem Load (0.6ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position SQL (0.3ms) DELETE FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."id" = ? [["id", 510529479]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position - 1) WHERE ("advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position > 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 8ms (ActiveRecord: 1.3ms)  (0.1ms) 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.1ms) 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  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/placements/_form.html.erb (24.7ms) 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" 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 Completed 200 OK in 37ms (Views: 35.5ms | ActiveRecord: 1.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.5ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]] AdvertSelector::Banner Load (0.2ms) 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", 405688915]] Processing by AdvertSelector::PlacementsController#index as HTML AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" 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" 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.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = 405688915 LIMIT 1 Completed 200 OK in 16ms (Views: 13.7ms | ActiveRecord: 0.7ms)  (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 (12.6ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 20ms (Views: 19.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 0ms (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.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"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.3ms) UPDATE "advert_selector_helper_items" SET "updated_at" = '2012-09-28 09:00:00.004416', "content_for" = 'f' WHERE "advert_selector_helper_items"."id" = 510529479  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1)  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/405688915 Completed 302 Found in 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]]  (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 "updated_at" = '2012-09-28 09:00:00.000397', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.002394', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.006520' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.006714' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 10ms (Views: 9.4ms | ActiveRecord: 0.5ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.2ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "always_false"], ["position", 0], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.020520' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.020700' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] AdvertSelection finished Completed 200 OK in 7ms (Views: 6.7ms | ActiveRecord: 0.6ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 "updated_at" = '2012-09-28 09:00:00.000422', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.002599', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.2ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "raise_error"], ["position", 0], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.004339' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.004537' 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.5ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.5ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Error with banner Coke in placement Leaderboard. 2012-09-28T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /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:32:in `send' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:32:in `advert_selector_banner_try' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:28:in `each' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:28:in `advert_selector_banner_try' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:12: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' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `__send__' /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 11ms (Views: 9.7ms | ActiveRecord: 1.3ms) AdvertSelector::HelperItem Load (0.5ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 "updated_at" = '2012-09-28 09:00:00.000459', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.002804', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-28 09:00:00.000288' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.003138' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.003318' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 9ms (Views: 8.2ms | ActiveRecord: 0.5ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.020816' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.021011' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 7ms (Views: 6.4ms | ActiveRecord: 0.5ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Mon Oct 01 12:00:00 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 2ms (Views: 1.7ms | ActiveRecord: 0.0ms) AdvertSelector::HelperItem Load (0.5ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1  (0.4ms) rollback transaction  (0.1ms) 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.4ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-01 09:00:00.000494', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-01 09:00:00.003690', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-01 09:00:00.000499', "confirmed" = 't' 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"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.004140' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.004318' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner parade_banner in placement Parade [AdvertSelector] AdvertSelection finished Completed 200 OK in 7ms (Views: 6.1ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Mon Oct 01 12:00:00 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 4ms (Views: 3.3ms | ActiveRecord: 0.1ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 "updated_at" = '2012-10-01 09:00:00.000450', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-01 09:00:00.002667', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-01 09:00:00.000485', "confirmed" = 't' 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"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.1ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = '', "updated_at" = '2012-10-01 09:00:00.002661' WHERE "advert_selector_placements"."id" = 718799085 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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 "conflicting_placements_array" = '', "updated_at" = '2012-10-01 09:00:00.004706' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "updated_at" = '2012-10-01 09:00:00.006154', "content_for" = 'f' WHERE "advert_selector_helper_items"."id" = 510529479  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1) 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 "conflicting_placements_array" = '', "updated_at" = '2012-10-01 09:00:00.008547' WHERE "advert_selector_placements"."id" = 1019730477 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 1019730477 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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 Mon Oct 01 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-01 09:00:00.012610' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.012810' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner parade_banner in placement Parade [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 9ms (Views: 7.8ms | ActiveRecord: 0.6ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.1ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-01 09:00:00.000488', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-01 09:00:00.002665', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.000239' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.3ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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.4ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Mon Oct 01 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.4ms | 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.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-01 09:00:00.000423', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-01 09:00:00.002507', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.3ms) 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.2ms) UPDATE "advert_selector_placements" SET "only_once_per_session" = 't', "updated_at" = '2012-10-01 09:00:00.000912' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "updated_at" = '2012-10-01 09:00:00.002403', "content_for" = 'f' WHERE "advert_selector_helper_items"."id" = 510529479  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1)  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.005844' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.006028' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 7ms (Views: 6.0ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-01 09:00:00.002268' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.002448' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 7ms (Views: 6.0ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 21:44:08', 100, '2012-10-02 00:00:00', 't', '2012-09-27 21:44:08', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 21:44:08', '2012-10-07 00:00:00', 't', '2012-09-27 21:44:08', 100, 394627963, 1000, 't', 0, '2012-09-28 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-09-27 21:44:08', '2012-10-07 00:00:00', 'f', '2012-09-27 21:44:08', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 21:44:08', '2012-09-27 21:44:08', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 21:44:08', '2012-09-27 21:44:08', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "master_type") VALUES ('leaderboard_testing', 1, '2012-09-27 21:44:08', '2012-09-27 21:44:08', 405688915, 510529479, 'AdvertSelector::Placement') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_parade', 1, '2012-09-27 21:44:08', '2012-09-27 21:44:08', 207249520, 281932184, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 21:44:08', '2012-09-27 21:44:08', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-27 21:44:08', '2012-09-27 21:44:08', '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-09-27 21:44:08', '2012-09-27 21:44:08', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 21:44:08', '2012-09-27 21:44:08', 'parade', 405688915)  (37.1ms) 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.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.000769', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.014302', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.028391' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.028585' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Rendered examples/index.html.erb within layouts/application (15.7ms) Completed 200 OK in 21ms (Views: 19.9ms | ActiveRecord: 0.6ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.3ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "always_false"], ["position", 0], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.050410' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.050575' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] AdvertSelection finished Rendered examples/index.html.erb within layouts/application (4.4ms) Completed 200 OK in 6ms (Views: 4.9ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 "updated_at" = '2012-09-28 09:00:00.000417', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.002535', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.2ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "raise_error"], ["position", 0], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.008179' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.008356' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Error with banner Coke in placement Leaderboard. 2012-09-28T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /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:32:in `send' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:32:in `advert_selector_banner_try' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:28:in `each' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:28:in `advert_selector_banner_try' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:12: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' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `__send__' /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 7ms (Views: 6.1ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 Fri Sep 28 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"  CACHE (0.0ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 18ms (Views: 16.6ms | ActiveRecord: 0.4ms)  (0.5ms) rollback transaction  (0.2ms) begin transaction AdvertSelector::Banner Load (0.3ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]]  (0.1ms) SAVEPOINT active_record_1  (0.9ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.001512', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.006600', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.008365', "frequency" = 2 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.011381' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.011555' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 7ms (Views: 6.2ms | ActiveRecord: 0.5ms) AdvertSelector::HelperItem Load (0.3ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.029387' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.029609' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 9ms (Views: 7.7ms | ActiveRecord: 0.6ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Mon Oct 01 12:00:00 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 2ms (Views: 1.5ms | ActiveRecord: 0.0ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 "updated_at" = '2012-10-01 09:00:00.000421', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-01 09:00:00.002443', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-01 09:00:00.004514', "confirmed" = 't' 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"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.008255' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.008428' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner parade_banner in placement Parade [AdvertSelector] AdvertSelection finished Completed 200 OK in 7ms (Views: 6.0ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Mon Oct 01 12:00:00 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 4ms (Views: 3.3ms | ActiveRecord: 0.1ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 "updated_at" = '2012-10-01 09:00:00.000442', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-01 09:00:00.002521', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-01 09:00:00.004398', "confirmed" = 't' 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"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 "conflicting_placements_array" = '', "updated_at" = '2012-10-01 09:00:00.007269' WHERE "advert_selector_placements"."id" = 718799085 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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 "conflicting_placements_array" = '', "updated_at" = '2012-10-01 09:00:00.009342' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "updated_at" = '2012-10-01 09:00:00.010869', "content_for" = 'f' WHERE "advert_selector_helper_items"."id" = 510529479  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1) 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 "conflicting_placements_array" = '', "updated_at" = '2012-10-01 09:00:00.013341' WHERE "advert_selector_placements"."id" = 1019730477 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 1019730477 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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 Mon Oct 01 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-01 09:00:00.017462' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.017625' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner parade_banner in placement Parade [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 8ms (Views: 7.6ms | ActiveRecord: 0.5ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 "updated_at" = '2012-10-01 09:00:00.000411', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-01 09:00:00.002395', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.004005' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.5ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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.4ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Mon Oct 01 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.4ms | 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.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-01 09:00:00.000408', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-01 09:00:00.002536', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-01 09:00:00.004950', "only_once_per_session" = 't' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "updated_at" = '2012-10-01 09:00:00.006342', "content_for" = 'f' WHERE "advert_selector_helper_items"."id" = 510529479  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1)  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.009807' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.009986' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 7ms (Views: 6.2ms | ActiveRecord: 0.5ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 21:46:11', 100, '2012-10-02 00:00:00', 't', '2012-09-27 21:46:11', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 21:46:11', '2012-10-07 00:00:00', 't', '2012-09-27 21:46:11', 100, 394627963, 1000, 't', 0, '2012-09-28 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-09-27 21:46:11', '2012-10-07 00:00:00', 'f', '2012-09-27 21:46:11', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 21:46:11', '2012-09-27 21:46:11', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 21:46:11', '2012-09-27 21:46:11', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "master_type") VALUES ('leaderboard_testing', 1, '2012-09-27 21:46:11', '2012-09-27 21:46:11', 405688915, 510529479, 'AdvertSelector::Placement') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_parade', 1, '2012-09-27 21:46:11', '2012-09-27 21:46:11', 207249520, 281932184, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 21:46:11', '2012-09-27 21:46:11', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') Fixture Delete (0.2ms) 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-09-27 21:46:11', '2012-09-27 21:46:11', '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-09-27 21:46:11', '2012-09-27 21:46:11', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 21:46:11', '2012-09-27 21:46:11', 'parade', 405688915)  (42.3ms) 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.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 2], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Fri, 28 Sep 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-28 09:00:00.000073' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-28 09:00:00.000876' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.001004' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count)  (0.0ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-09-28 09:00:00.001942' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-09-28 09:00:00.002609' OR end_time IS NULL) AND (start_time < '2011-09-28 10:00:00.002722' 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.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.3ms) UPDATE "advert_selector_banners" SET "running_view_count" = 0, "updated_at" = '2012-09-28 09:00:00.000879' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 AdvertSelector::Banner Load (0.1ms) 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" = 1001, "updated_at" = '2012-09-28 09:00:00.007158' 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.4ms) UPDATE "advert_selector_banners" SET "confirmed" = 'f', "updated_at" = '2012-09-28 09:00:00.000384' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-28 09:00:00.002741' 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.3ms) UPDATE "advert_selector_banners" SET "end_time" = '2012-10-08 00:00:00.000000', "target_view_count" = 100, "start_time" = '2012-09-27 21:00:00.000000', "updated_at" = '2012-09-28 09:00:00.000841' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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" = 0, "updated_at" = '2012-09-28 09:00:00.003022' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 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", 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.1ms) 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", "end_time"=>"2012-10-07 00:00:00 UTC", "placement_id"=>"405688915", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-09-28 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["end_time", Sun, 07 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", Fri, 28 Sep 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Fri, 28 Sep 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"."master_id" = 814558299 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.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]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" Processing by AdvertSelector::BannersController#destroy 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"]]  (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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position SQL (0.2ms) 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position > 2) SQL (0.1ms) 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.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]] 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/banners/_form.html.erb (127.4ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 143ms (Views: 141.9ms | 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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 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.5ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 26ms (Views: 25.3ms | 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 0ms (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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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]] 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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 8ms (Views: 7.3ms | 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.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items"  (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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement') ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.4ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", nil], ["position", 1], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position >= 1) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", "some_limit_helper_here"], ["position", 1], ["updated_at", Fri, 28 Sep 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-09-28 09:00:00.009177' WHERE "advert_selector_helper_items"."id" = 960656442  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1) SQL (0.0ms) 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position > 2)  (0.1ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-09-28 09:00:00.011050', "position" = 11 WHERE "advert_selector_helper_items"."id" = 960656441  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 11)  (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]]  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement'  (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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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]] 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.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = 'not_found,video', "updated_at" = '2012-09-28 09:00:00.001216' WHERE "advert_selector_placements"."id" = 718799085 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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 "conflicting_placements_array" = '', "updated_at" = '2012-09-28 09:00:00.003379' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-09-28 09:00:00.004718' WHERE "advert_selector_helper_items"."id" = 510529479  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1) 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.1ms) 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.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]] 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.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.1ms) 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.5ms) INSERT INTO "advert_selector_placements" ("conflicting_placements_array", "created_at", "name", "only_once_per_session", "updated_at") VALUES (?, ?, ?, ?, ?) [["conflicting_placements_array", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Fri, 28 Sep 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"."master_id" = 1019730478 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/1019730478 Completed 302 Found in 4ms (ActiveRecord: 0.6ms)  (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.1ms) 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 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position SQL (0.3ms) DELETE FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."id" = ? [["id", 510529479]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position - 1) WHERE ("advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position > 1) SQL (0.1ms) 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 4ms (ActiveRecord: 0.7ms)  (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  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/placements/_form.html.erb (15.5ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 24ms (Views: 22.9ms | 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]] 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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 9ms (Views: 8.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#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 (12.5ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 20ms (Views: 19.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#show as HTML Parameters: {"id"=>"405688915"} Redirected to http://test.host/advert_selector/placements/405688915/edit Completed 302 Found in 0ms (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 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.3ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-09-28 09:00:00.004391' WHERE "advert_selector_helper_items"."id" = 510529479  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1)  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/405688915 Completed 302 Found in 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]]  (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.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-28 09:00:00.000391' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-28 09:00:00.002385' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.006512' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.006707' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 10ms (Views: 9.4ms | ActiveRecord: 0.5ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.2ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "always_false"], ["position", 0], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.020577' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.020741' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] AdvertSelection finished Completed 200 OK in 5ms (Views: 4.5ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-28 09:00:00.000422' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-28 09:00:00.002472' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND position >= 0) SQL (0.2ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "raise_error"], ["position", 0], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.004095' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.004273' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Error with banner Coke in placement Leaderboard. 2012-09-28T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /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:32:in `send' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:32:in `advert_selector_banner_try' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:28:in `each' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:28:in `advert_selector_banner_try' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:12: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' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `__send__' /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.8ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 Fri Sep 28 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" CACHE (0.0ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 14ms (Views: 12.5ms | 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-09-28 09:00:00.000406' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-28 09:00:00.002416' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.000287', "frequency" = 2 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.003196' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.003379' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 7ms (Views: 6.0ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.017857' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.018021' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.7ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-01 09:00:00.000409' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-01 09:00:00.002442' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-01 09:00:00.000455' 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"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.003920' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.004094' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner parade_banner in placement Parade [AdvertSelector] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.9ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Mon Oct 01 12:00:00 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 4ms (Views: 3.2ms | ActiveRecord: 0.1ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-01 09:00:00.000395' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-01 09:00:00.002408' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-01 09:00:00.000439' 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"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.1ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = '', "updated_at" = '2012-10-01 09:00:00.002580' WHERE "advert_selector_placements"."id" = 718799085 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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 "conflicting_placements_array" = '', "updated_at" = '2012-10-01 09:00:00.004422' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-10-01 09:00:00.005779' WHERE "advert_selector_helper_items"."id" = 510529479  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1) 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 "conflicting_placements_array" = '', "updated_at" = '2012-10-01 09:00:00.008057' WHERE "advert_selector_placements"."id" = 1019730477 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 1019730477 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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 Mon Oct 01 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time > '2012-10-01 09:00:00.011900' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.012066' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner parade_banner in placement Parade [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [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.4ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-01 09:00:00.000457' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.7ms) UPDATE "advert_selector_banners" SET "confirmed" = 'f', "updated_at" = '2012-10-01 09:00:00.002790' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.000295' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 7ms (Views: 6.0ms | ActiveRecord: 0.5ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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) Started GET "/" for 127.0.0.1 at Mon Oct 01 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 6ms (Views: 5.0ms | 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.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-01 09:00:00.000461' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-01 09:00:00.002973' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 "only_once_per_session" = 't', "updated_at" = '2012-10-01 09:00:00.000970' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-10-01 09:00:00.002366' WHERE "advert_selector_helper_items"."id" = 510529479  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND position = 1)  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.006080' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.006772' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 11ms (Views: 10.2ms | ActiveRecord: 0.8ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Mon Oct 01 12:00:00 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 2ms (Views: 1.5ms | ActiveRecord: 0.0ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.5ms) 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.1ms) 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.3ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time > '2012-10-01 09:00:00.002747' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.003320' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 11ms (Views: 9.7ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 22:19:20', 100, '2012-10-02 00:00:00', 't', '2012-09-27 22:19:20', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 22:19:20', '2012-10-07 00:00:00', 't', '2012-09-27 22:19:20', 100, 394627963, 1000, 't', 0, '2012-09-28 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-09-27 22:19:20', '2012-10-07 00:00:00', 'f', '2012-09-27 22:19:20', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 22:19:20', '2012-09-27 22:19:20', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 22:19:20', '2012-09-27 22:19:20', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "master_type") VALUES ('leaderboard_testing', 1, '2012-09-27 22:19:20', '2012-09-27 22:19:20', 405688915, 510529479, 'AdvertSelector::Placement') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_parade', 1, '2012-09-27 22:19:20', '2012-09-27 22:19:20', 207249520, 281932184, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 22:19:20', '2012-09-27 22:19:20', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') Fixture Delete (0.2ms) DELETE FROM "advert_selector_placements" Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Parade', '2012-09-27 22:19:20', '2012-09-27 22:19:20', '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-09-27 22:19:20', '2012-09-27 22:19:20', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 22:19:20', '2012-09-27 22:19:20', 'parade', 405688915)  (39.0ms) 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.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 814558298) ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 2], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 814558298 AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 814558298 AND position >= 0) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Fri, 28 Sep 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.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_banners" WHERE (end_time > '2012-09-28 09:00:00.000073' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-28 09:00:00.000881' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.001004' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count)  (0.0ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-09-28 09:00:00.001871' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-09-28 09:00:00.002580' OR end_time IS NULL) AND (start_time < '2011-09-28 10:00:00.002693' 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.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.3ms) UPDATE "advert_selector_banners" SET "running_view_count" = 0, "updated_at" = '2012-09-28 09:00:00.000853' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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" = 1001, "updated_at" = '2012-09-28 09:00:00.007147' 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.3ms) UPDATE "advert_selector_banners" SET "confirmed" = 'f', "updated_at" = '2012-09-28 09:00:00.000407' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-28 09:00:00.002530' 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.3ms) UPDATE "advert_selector_banners" SET "target_view_count" = 100, "start_time" = '2012-09-27 21:00:00.000000', "updated_at" = '2012-09-28 09:00:00.000842', "end_time" = '2012-10-08 00:00:00.000000' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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" = 0, "updated_at" = '2012-09-28 09:00:00.003031' 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", "end_time"=>"2012-10-07 00:00:00 UTC", "placement_id"=>"405688915", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-09-28 00:00:00 UTC"}}  (0.2ms) SAVEPOINT active_record_1 SQL (2.1ms) 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["end_time", Sun, 07 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", Fri, 28 Sep 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Fri, 28 Sep 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"."master_id" = 814558299 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/banners/814558299 Completed 302 Found in 14ms (ActiveRecord: 2.4ms)  (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.1ms) SELECT COUNT(*) FROM "advert_selector_banners" Processing by AdvertSelector::BannersController#destroy 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"]]  (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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_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.7ms)  (0.1ms) 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/banners/_form.html.erb (129.3ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 146ms (Views: 144.1ms | 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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 11ms (Views: 9.5ms | 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.7ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 27ms (Views: 25.8ms | 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.1ms) 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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]] 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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 8ms (Views: 7.6ms | 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.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items"  (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"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 718799085) ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.4ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", nil], ["position", 1], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 718799085 AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 718799085 AND position >= 1) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", "some_limit_helper_here"], ["position", 1], ["updated_at", Fri, 28 Sep 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-09-28 09:00:00.008945' WHERE "advert_selector_helper_items"."id" = 960656442  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 718799085 AND position = 1) SQL (0.0ms) 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"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 718799085 AND position > 2)  (0.1ms) UPDATE "advert_selector_helper_items" SET "position" = 11, "content_for" = 'f', "updated_at" = '2012-09-28 09:00:00.010780' WHERE "advert_selector_helper_items"."id" = 960656441  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 718799085 AND position = 11)  (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]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement'  (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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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]] 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.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-09-28 09:00:00.001146', "conflicting_placements_array" = 'not_found,video' WHERE "advert_selector_placements"."id" = 718799085 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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-09-28 09:00:00.003290', "conflicting_placements_array" = '' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.2ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-09-28 09:00:00.004623' WHERE "advert_selector_helper_items"."id" = 510529479  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 405688915 AND position = 1) 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.1ms) 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.1ms) 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.5ms) INSERT INTO "advert_selector_placements" ("conflicting_placements_array", "created_at", "name", "only_once_per_session", "updated_at") VALUES (?, ?, ?, ?, ?) [["conflicting_placements_array", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Fri, 28 Sep 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"."master_id" = 1019730478 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/1019730478 Completed 302 Found in 4ms (ActiveRecord: 0.6ms)  (0.1ms) 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 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position SQL (0.2ms) DELETE FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."id" = ? [["id", 510529479]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position - 1) WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 405688915 AND position > 1) SQL (0.1ms) 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 4ms (ActiveRecord: 0.7ms)  (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  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/placements/_form.html.erb (15.5ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 24ms (Views: 23.1ms | 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]] 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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 9ms (Views: 8.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#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 (12.8ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 20ms (Views: 19.6ms | 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 0ms (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 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.3ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-09-28 09:00:00.004348' WHERE "advert_selector_helper_items"."id" = 510529479  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 405688915 AND position = 1)  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/405688915 Completed 302 Found in 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]]  (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.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-28 09:00:00.000396' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-28 09:00:00.002489' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.006678' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.006878' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 10ms (Views: 9.3ms | ActiveRecord: 0.5ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 814558298 AND position >= 0) SQL (0.2ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "always_false"], ["position", 0], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.020849' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.021026' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] AdvertSelection finished Completed 200 OK in 5ms (Views: 4.8ms | ActiveRecord: 0.5ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-28 09:00:00.000405' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-28 09:00:00.002461' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 814558298 AND position >= 0) SQL (0.2ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "raise_error"], ["position", 0], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.004190' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.004359' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Error with banner Coke in placement Leaderboard. 2012-09-28T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /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:48:in `send' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:48:in `advert_selector_banner_try' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:44:in `each' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:44:in `advert_selector_banner_try' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:16: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' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `__send__' /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.8ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 Fri Sep 28 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" CACHE (0.0ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 14ms (Views: 13.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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-28 09:00:00.000406' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-28 09:00:00.002540' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.000292', "frequency" = 2 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.003221' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.003399' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 7ms (Views: 6.0ms | ActiveRecord: 0.5ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.017405' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.017573' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 7ms (Views: 6.0ms | ActiveRecord: 0.5ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Mon Oct 01 12:00:00 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 1ms (Views: 1.3ms | ActiveRecord: 0.0ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-01 09:00:00.000402' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-01 09:00:00.002477' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-01 09:00:00.000452' 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"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.003905' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.004083' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner parade_banner in placement Parade [AdvertSelector] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.9ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Mon Oct 01 12:00:00 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 4ms (Views: 3.3ms | ActiveRecord: 0.1ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-01 09:00:00.000412' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-01 09:00:00.002446' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-01 09:00:00.000433' 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"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.1ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-10-01 09:00:00.002609', "conflicting_placements_array" = '' WHERE "advert_selector_placements"."id" = 718799085 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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-01 09:00:00.004377', "conflicting_placements_array" = '' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-10-01 09:00:00.005678' WHERE "advert_selector_helper_items"."id" = 510529479  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 405688915 AND position = 1) 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-01 09:00:00.007962', "conflicting_placements_array" = '' WHERE "advert_selector_placements"."id" = 1019730477 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 1019730477 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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 Mon Oct 01 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-01 09:00:00.011909' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.012081' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner parade_banner in placement Parade [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 9ms (Views: 8.0ms | ActiveRecord: 0.6ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-01 09:00:00.000419' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-01 09:00:00.002552' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.000249' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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.6ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Mon Oct 01 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.5ms | 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.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-01 09:00:00.000410' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-01 09:00:00.002502' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.2ms) UPDATE "advert_selector_placements" SET "only_once_per_session" = 't', "updated_at" = '2012-10-01 09:00:00.000948' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-10-01 09:00:00.002357' WHERE "advert_selector_helper_items"."id" = 510529479  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 405688915 AND position = 1)  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.005950' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.006142' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 7ms (Views: 6.1ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Mon Oct 01 12:00:00 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 2ms (Views: 1.5ms | ActiveRecord: 0.0ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-01 09:00:00.002308' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.002482' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 7ms (Views: 6.2ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-27 22:22:47', 100, '2012-10-02 00:00:00', 't', '2012-09-27 22:22:47', 50, 814558298, 1000, 'f', 0, '2012-09-22 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-09-27 22:22:47', '2012-10-07 00:00:00', 't', '2012-09-27 22:22:47', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-27 22:22:47', '2012-10-07 00:00:00', 'f', '2012-09-27 22:22:47', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-27 22:22:47', '2012-09-27 22:22:47', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-27 22:22:47', '2012-09-27 22:22:47', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "master_type") VALUES ('leaderboard_testing', 1, '2012-09-27 22:22:47', '2012-09-27 22:22:47', 405688915, 510529479, 'AdvertSelector::Placement') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_parade', 1, '2012-09-27 22:22:47', '2012-09-27 22:22:47', 207249520, 281932184, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-27 22:22:47', '2012-09-27 22:22:47', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') Fixture Delete (0.2ms) 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-09-27 22:22:47', '2012-09-27 22:22:47', '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-09-27 22:22:47', '2012-09-27 22:22:47', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-27 22:22:47', '2012-09-27 22:22:47', 'parade', 405688915)  (46.3ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.7ms) 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.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 814558298) ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 2], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 814558298 AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 814558298 AND position >= 0) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Fri, 28 Sep 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-28 09:00:00.000072' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-28 09:00:00.000878' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.000996' 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-09-28 09:00:00.001898' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-09-28 09:00:00.002629' OR end_time IS NULL) AND (start_time < '2011-09-28 10:00:00.002738' 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.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.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.000850', "running_view_count" = 0 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 AdvertSelector::Banner Load (0.1ms) 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 "updated_at" = '2012-09-28 09:00:00.007010', "running_view_count" = 1001 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.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.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.000399', "confirmed" = 'f' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.002432', "confirmed" = 't' 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 "updated_at" = '2012-09-28 09:00:00.000827', "target_view_count" = 100, "end_time" = '2012-10-08 00:00:00.000000', "start_time" = '2012-09-27 21:00:00.000000' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.002926', "running_view_count" = 0 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", "end_time"=>"2012-10-07 00:00:00 UTC", "placement_id"=>"405688915", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-09-28 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["end_time", Sun, 07 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", Fri, 28 Sep 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Fri, 28 Sep 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"."master_id" = 814558299 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.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]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" Processing by AdvertSelector::BannersController#destroy 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"]]  (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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position SQL (0.2ms) 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 394627963 AND position > 2) SQL (0.1ms) 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.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]] 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/banners/_form.html.erb (139.8ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 156ms (Views: 154.3ms | ActiveRecord: 0.9ms)  (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.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners"  AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 11ms (Views: 9.3ms | 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]] 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.5ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 26ms (Views: 25.3ms | 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 0ms (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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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]] 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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 8ms (Views: 7.1ms | 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.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items"  (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"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 718799085) ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.4ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", nil], ["position", 1], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 718799085 AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 718799085 AND position >= 1) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", "some_limit_helper_here"], ["position", 1], ["updated_at", Fri, 28 Sep 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "updated_at" = '2012-09-28 09:00:00.009034', "content_for" = 'f' WHERE "advert_selector_helper_items"."id" = 960656442  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 718799085 AND position = 1) SQL (0.0ms) 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"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 718799085 AND position > 2)  (0.1ms) UPDATE "advert_selector_helper_items" SET "updated_at" = '2012-09-28 09:00:00.011092', "position" = 11, "content_for" = 'f' WHERE "advert_selector_helper_items"."id" = 960656441  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 718799085 AND position = 11)  (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]]  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement'  (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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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]] 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.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = 'not_found,video', "updated_at" = '2012-09-28 09:00:00.001264' WHERE "advert_selector_placements"."id" = 718799085 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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 "conflicting_placements_array" = '', "updated_at" = '2012-09-28 09:00:00.003408' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "updated_at" = '2012-09-28 09:00:00.004789', "content_for" = 'f' WHERE "advert_selector_helper_items"."id" = 510529479  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 405688915 AND position = 1) 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.1ms) 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.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.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.1ms) 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.5ms) INSERT INTO "advert_selector_placements" ("conflicting_placements_array", "created_at", "name", "only_once_per_session", "updated_at") VALUES (?, ?, ?, ?, ?) [["conflicting_placements_array", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Fri, 28 Sep 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"."master_id" = 1019730478 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/1019730478 Completed 302 Found in 4ms (ActiveRecord: 0.7ms)  (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.1ms) 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 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position SQL (0.2ms) DELETE FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."id" = ? [["id", 510529479]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position - 1) WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 405688915 AND position > 1) SQL (0.1ms) 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 4ms (ActiveRecord: 0.6ms)  (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  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/placements/_form.html.erb (15.5ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 24ms (Views: 23.0ms | 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]] 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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 9ms (Views: 8.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#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 (12.4ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 20ms (Views: 19.0ms | 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 0ms (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 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.3ms) UPDATE "advert_selector_helper_items" SET "updated_at" = '2012-09-28 09:00:00.004376', "content_for" = 'f' WHERE "advert_selector_helper_items"."id" = 510529479  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 405688915 AND position = 1)  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/405688915 Completed 302 Found in 4ms (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]]  (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.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.000406', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.002440', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.006407' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.006603' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 10ms (Views: 9.2ms | ActiveRecord: 0.5ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 814558298 AND position >= 0) SQL (0.3ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "always_false"], ["position", 0], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.020338' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.020512' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] AdvertSelection finished Completed 200 OK in 5ms (Views: 4.5ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 "updated_at" = '2012-09-28 09:00:00.000408', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.002425', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 814558298 AND position >= 0) SQL (0.2ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "raise_error"], ["position", 0], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.004083' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.004262' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Error with banner Coke in placement Leaderboard. 2012-09-28T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /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:48:in `send' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:48:in `advert_selector_banner_try' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:44:in `each' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:44:in `advert_selector_banner_try' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:16: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' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `__send__' /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 7ms (Views: 6.0ms | ActiveRecord: 0.5ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 Fri Sep 28 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" CACHE (0.0ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 14ms (Views: 12.4ms | 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 "updated_at" = '2012-09-28 09:00:00.000403', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.002404', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.000273', "frequency" = 2 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.003065' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.003239' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.9ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.017109' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.017275' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 7ms (Views: 6.2ms | ActiveRecord: 0.5ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 "updated_at" = '2012-10-01 09:00:00.000414', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-01 09:00:00.002445', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.002149' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.002321' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 7ms (Views: 6.0ms | ActiveRecord: 0.5ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/?advert_selector_force=parade_banner" for 127.0.0.1 at Mon Oct 01 12:00:00 +0300 2012 Processing by ExamplesController#index as HTML Parameters: {"advert_selector_force"=>"parade_banner"} [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = 0 LIMIT 1 [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 3ms (Views: 2.9ms | ActiveRecord: 0.1ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 "updated_at" = '2012-10-01 09:00:00.000402', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-01 09:00:00.002486', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-01 09:00:00.000435', "confirmed" = 't' 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"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.003896' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.004071' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner parade_banner in placement Parade [AdvertSelector] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.9ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Mon Oct 01 12:00:00 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 4ms (Views: 3.5ms | ActiveRecord: 0.1ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 "updated_at" = '2012-10-01 09:00:00.000411', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-01 09:00:00.002579', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-01 09:00:00.000445', "confirmed" = 't' 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"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.1ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = '', "updated_at" = '2012-10-01 09:00:00.002745' WHERE "advert_selector_placements"."id" = 718799085 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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 "conflicting_placements_array" = '', "updated_at" = '2012-10-01 09:00:00.004613' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "updated_at" = '2012-10-01 09:00:00.005964', "content_for" = 'f' WHERE "advert_selector_helper_items"."id" = 510529479  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 405688915 AND position = 1) 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 "conflicting_placements_array" = '', "updated_at" = '2012-10-01 09:00:00.008292' WHERE "advert_selector_placements"."id" = 1019730477 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 1019730477 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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 Mon Oct 01 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-01 09:00:00.012401' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.012577' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner parade_banner in placement Parade [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 9ms (Views: 7.8ms | ActiveRecord: 0.5ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 "updated_at" = '2012-10-01 09:00:00.000417', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-01 09:00:00.002520', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.000245' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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 Mon Oct 01 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.4ms | 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.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-01 09:00:00.000411', "fast_mode" = 't' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-01 09:00:00.002489', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.2ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-10-01 09:00:00.000935', "only_once_per_session" = 't' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "updated_at" = '2012-10-01 09:00:00.002437', "content_for" = 'f' WHERE "advert_selector_helper_items"."id" = 510529479  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 405688915 AND position = 1)  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.005962' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.006156' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 7ms (Views: 6.0ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Mon Oct 01 12:00:00 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 2ms (Views: 1.5ms | ActiveRecord: 0.0ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-01 09:00:00.002408' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.002598' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 7ms (Views: 6.6ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.2ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 10:53:50', 100, '2012-10-03 00:00:00', 't', '2012-09-28 10:53:50', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 10:53:50', '2012-10-08 00:00:00', 't', '2012-09-28 10:53:50', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 10:53:50', '2012-10-08 00:00:00', 'f', '2012-09-28 10:53:50', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-28 10:53:50', '2012-09-28 10:53:50', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-28 10:53:50', '2012-09-28 10:53:50', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "master_type") VALUES ('leaderboard_testing', 1, '2012-09-28 10:53:50', '2012-09-28 10:53:50', 405688915, 510529479, 'AdvertSelector::Placement') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_parade', 1, '2012-09-28 10:53:50', '2012-09-28 10:53:50', 207249520, 281932184, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-28 10:53:50', '2012-09-28 10:53:50', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') Fixture Delete (0.2ms) 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-09-28 10:53:50', '2012-09-28 10:53:50', '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-09-28 10:53:50', '2012-09-28 10:53:50', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-28 10:53:50', '2012-09-28 10:53:50', 'parade', 405688915)  (28.0ms) commit transaction  (0.0ms) 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) SELECT COUNT(*) FROM "advert_selector_helper_items"   (0.1ms) SAVEPOINT active_record_1 AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 814558298) ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 2], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 814558298 AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 814558298 AND position >= 0) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Fri, 28 Sep 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-28 09:00:00.000078' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-28 09:00:00.000919' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.001047' 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-09-28 09:00:00.001938' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-09-28 09:00:00.002647' OR end_time IS NULL) AND (start_time < '2011-09-28 10:00:00.002775' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count)  (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.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) 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 "updated_at" = '2012-09-28 09:00:00.000999', "running_view_count" = 0 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 AdvertSelector::Banner Load (0.1ms) 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 "updated_at" = '2012-09-28 09:00:00.007431', "running_view_count" = 1001 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 "updated_at" = '2012-09-28 09:00:00.000410', "confirmed" = 'f' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.002496', "confirmed" = 't' 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 "target_view_count" = 100, "end_time" = '2012-10-08 00:00:00.000000', "start_time" = '2012-09-27 21:00:00.000000', "updated_at" = '2012-09-28 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.002888', "running_view_count" = 0 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.1ms) 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#create as HTML Parameters: {"banner"=>{"comment"=>"Pepsi banner", "name"=>"Pepsi", "end_time"=>"2012-10-08 00:00:00 UTC", "placement_id"=>"405688915", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-09-28 00:00:00 UTC"}}  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["end_time", Mon, 08 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", Fri, 28 Sep 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Fri, 28 Sep 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"."master_id" = 814558299 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.8ms)  (0.1ms) 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.1ms) SELECT COUNT(*) FROM "advert_selector_banners" Processing by AdvertSelector::BannersController#destroy 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"]]  (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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position SQL (0.2ms) 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 394627963 AND position > 2) SQL (0.1ms) 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.7ms)  (0.1ms) 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.1ms) 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/banners/_form.html.erb (160.7ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 181ms (Views: 179.8ms | ActiveRecord: 0.9ms)  (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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 11ms (Views: 9.8ms | 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]] 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 (19.4ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 28ms (Views: 26.8ms | 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]] 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.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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.3ms)  (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::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" 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 Completed 200 OK in 9ms (Views: 8.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.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.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items"  (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"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 718799085) ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", nil], ["position", 1], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 718799085 AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 718799085 AND position >= 1) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", "some_limit_helper_here"], ["position", 1], ["updated_at", Fri, 28 Sep 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-09-28 09:00:00.010224' WHERE "advert_selector_helper_items"."id" = 960656442  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 718799085 AND position = 1) SQL (0.0ms) 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"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 718799085 AND position > 2)  (0.1ms) UPDATE "advert_selector_helper_items" SET "position" = 11, "content_for" = 'f', "updated_at" = '2012-09-28 09:00:00.012367' WHERE "advert_selector_helper_items"."id" = 960656441  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 718799085 AND position = 11)  (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]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement'  (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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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]] 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) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = 'not_found,video', "updated_at" = '2012-09-28 09:00:00.001441' WHERE "advert_selector_placements"."id" = 718799085 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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 "conflicting_placements_array" = '', "updated_at" = '2012-09-28 09:00:00.004125' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.2ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-09-28 09:00:00.006075' WHERE "advert_selector_helper_items"."id" = 510529479  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 405688915 AND position = 1) 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.1ms) 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.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", 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.5ms) INSERT INTO "advert_selector_placements" ("conflicting_placements_array", "created_at", "name", "only_once_per_session", "updated_at") VALUES (?, ?, ?, ?, ?) [["conflicting_placements_array", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Fri, 28 Sep 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"."master_id" = 1019730478 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/1019730478 Completed 302 Found in 4ms (ActiveRecord: 0.6ms)  (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.1ms) SELECT COUNT(*) FROM "advert_selector_placements"  Processing by AdvertSelector::PlacementsController#destroy as HTML Parameters: {"id"=>"405688915"} AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", "405688915"]]  (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"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position SQL (0.2ms) DELETE FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."id" = ? [["id", 510529479]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position - 1) WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 405688915 AND position > 1) SQL (0.1ms) 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 4ms (ActiveRecord: 0.6ms)  (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  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/placements/_form.html.erb (15.9ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 25ms (Views: 23.8ms | 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]] 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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 11ms (Views: 9.4ms | 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#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 (13.1ms) 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" 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 Completed 200 OK in 21ms (Views: 20.5ms | 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#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.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", "405688915"]]  (0.0ms) SAVEPOINT active_record_1 AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.3ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-09-28 09:00:00.005444' WHERE "advert_selector_helper_items"."id" = 510529479  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 405688915 AND position = 1)  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/405688915 Completed 302 Found in 5ms (ActiveRecord: 0.7ms)  (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) 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.4ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-28 09:00:00.000474' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.002862', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.007648' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.007872' 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.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" IN (718799085, 405688915) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 13ms (Views: 11.6ms | ActiveRecord: 0.7ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 814558298 AND position >= 0) SQL (0.3ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "always_false"], ["position", 0], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.024941' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.025136' 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"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" IN (718799085, 405688915) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.0ms | ActiveRecord: 0.5ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-28 09:00:00.000421' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.002497', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 814558298 AND position >= 0) SQL (0.2ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "raise_error"], ["position", 0], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.004145' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.004328' 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"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" IN (718799085, 405688915) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] Error with banner Coke in placement Leaderboard. 2012-09-28T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /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:48:in `send' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:48:in `advert_selector_banner_try' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:44:in `each' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:44:in `advert_selector_banner_try' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:16: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' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `__send__' /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 7ms (Views: 6.0ms | ActiveRecord: 0.5ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 Fri Sep 28 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" CACHE (0.0ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 16ms (Views: 14.4ms | 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-09-28 09:00:00.000424' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.002472', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-28 09:00:00.000305' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.003258' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.003452' 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"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" IN (718799085, 405688915) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 7ms (Views: 6.0ms | ActiveRecord: 0.5ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.017533' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.017753' 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"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" IN (718799085, 405688915) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 7ms (Views: 6.1ms | ActiveRecord: 0.5ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Mon Oct 01 12:00:00 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 2ms (Views: 1.5ms | ActiveRecord: 0.0ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1  (0.2ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]]  (0.1ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-01 09:00:00.000668' WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-01 09:00:00.004387', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.003541' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.003860' 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"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" IN (718799085, 405688915) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 11ms (Views: 9.6ms | ActiveRecord: 0.8ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/?advert_selector_force=parade_banner" for 127.0.0.1 at Mon Oct 01 12:00:00 +0300 2012 Processing by ExamplesController#index as HTML Parameters: {"advert_selector_force"=>"parade_banner"} [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = 0 LIMIT 1 [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 5ms (Views: 4.6ms | ActiveRecord: 0.2ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.4ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-01 09:00:00.000590' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-01 09:00:00.003632', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-01 09:00:00.000673', "confirmed" = 't' 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"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.005954' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.006203' 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"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" IN (718799085, 405688915) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner parade_banner in placement Parade [AdvertSelector] AdvertSelection finished Completed 200 OK in 8ms (Views: 7.3ms | ActiveRecord: 0.6ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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.7ms | ActiveRecord: 0.0ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1  (0.2ms) 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-01 09:00:00.000428' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-01 09:00:00.002675', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-01 09:00:00.000809', "confirmed" = 't' 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"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 "conflicting_placements_array" = '', "updated_at" = '2012-10-01 09:00:00.003736' WHERE "advert_selector_placements"."id" = 718799085 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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 "conflicting_placements_array" = '', "updated_at" = '2012-10-01 09:00:00.005965' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-10-01 09:00:00.007441' WHERE "advert_selector_helper_items"."id" = 510529479  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 405688915 AND position = 1) 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 "conflicting_placements_array" = '', "updated_at" = '2012-10-01 09:00:00.010073' WHERE "advert_selector_placements"."id" = 1019730477 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 1019730477 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE (LOWER(name) = 'parade') LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.015007' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.015207' 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"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" IN (718799085, 405688915) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_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.5ms | ActiveRecord: 0.5ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-01 09:00:00.000417' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-01 09:00:00.002542', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.000331' 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"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" IN (718799085, 405688915) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_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.5ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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.6ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Mon Oct 01 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.5ms | 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.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-01 09:00:00.000422' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-01 09:00:00.002600', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 "only_once_per_session" = 't', "updated_at" = '2012-10-01 09:00:00.001015' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-10-01 09:00:00.002412' WHERE "advert_selector_helper_items"."id" = 510529479  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 405688915 AND position = 1)  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.006247' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.006443' 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"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" IN (718799085, 405688915) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 7ms (Views: 6.1ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.5ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Mon Oct 01 12:00:00 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 3ms (Views: 2.1ms | ActiveRecord: 0.0ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-01 09:00:00.002444' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.002635' 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"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" IN (718799085, 405688915) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 7ms (Views: 6.4ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 10:54:13', 100, '2012-10-03 00:00:00', 't', '2012-09-28 10:54:13', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 10:54:13', '2012-10-08 00:00:00', 't', '2012-09-28 10:54:13', 100, 394627963, 1000, 't', 0, '2012-09-28 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-09-28 10:54:13', '2012-10-08 00:00:00', 'f', '2012-09-28 10:54:13', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-28 10:54:13', '2012-09-28 10:54:13', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-28 10:54:13', '2012-09-28 10:54:13', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "master_type") VALUES ('leaderboard_testing', 1, '2012-09-28 10:54:13', '2012-09-28 10:54:13', 405688915, 510529479, 'AdvertSelector::Placement') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_parade', 1, '2012-09-28 10:54:13', '2012-09-28 10:54:13', 207249520, 281932184, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-28 10:54:13', '2012-09-28 10:54:13', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-28 10:54:13', '2012-09-28 10:54:13', '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-09-28 10:54:13', '2012-09-28 10:54:13', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-28 10:54:13', '2012-09-28 10:54:13', 'parade', 405688915)  (53.0ms) commit 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) SELECT COUNT(*) FROM "advert_selector_helper_items"   (0.1ms) SAVEPOINT active_record_1 AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 814558298) ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 2], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 814558298 AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 814558298 AND position >= 0) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Fri, 28 Sep 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-28 09:00:00.000077' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-28 09:00:00.000970' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.001098' 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-09-28 09:00:00.001990' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-09-28 09:00:00.002700' OR end_time IS NULL) AND (start_time < '2011-09-28 10:00:00.002827' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count)  (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.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) 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.4ms) UPDATE "advert_selector_banners" SET "running_view_count" = 0, "updated_at" = '2012-09-28 09:00:00.000946' WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.1ms) RELEASE SAVEPOINT active_record_1 AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]]  (0.1ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "running_view_count" = 1001, "updated_at" = '2012-09-28 09:00:00.010857' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 AdvertSelector::Banner Load (0.1ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]]  (0.0ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_banners" SET "confirmed" = 'f', "updated_at" = '2012-09-28 09:00:00.000640' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "confirmed" = 't', "updated_at" = '2012-09-28 09:00:00.003878' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]]  (0.1ms) rollback transaction  (0.1ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]]  (0.0ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_banners" SET "target_view_count" = 100, "end_time" = '2012-10-08 00:00:00.000000', "updated_at" = '2012-09-28 09:00:00.001326', "start_time" = '2012-09-27 21:00:00.000000' WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "running_view_count" = 0, "updated_at" = '2012-09-28 09:00:00.004796' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 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.1ms) 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", 814558298]] 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.1ms) 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", 814558298]]  (0.1ms) rollback transaction  (0.1ms) 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.1ms) 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", "end_time"=>"2012-10-08 00:00:00 UTC", "placement_id"=>"405688915", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-09-28 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["end_time", Mon, 08 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", Fri, 28 Sep 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Fri, 28 Sep 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"."master_id" = 814558299 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.1ms) 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.1ms) 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position SQL (0.2ms) 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 394627963 AND position > 2) SQL (0.1ms) 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 5ms (ActiveRecord: 0.7ms)  (0.1ms) 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.1ms) 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/banners/_form.html.erb (127.2ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 144ms (Views: 142.4ms | ActiveRecord: 0.9ms)  (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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 11ms (Views: 9.3ms | 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 (22.1ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 30ms (Views: 29.0ms | 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.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]] 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.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]] Processing by AdvertSelector::BannersController#update as HTML Parameters: {"banner"=>{"comment"=>"Pepsi banner"}, "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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.3ms)  (0.1ms) rollback transaction  (0.1ms) 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 2ms (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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 9ms (Views: 8.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.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]] 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) SELECT COUNT(*) FROM "advert_selector_helper_items"  (0.1ms) SAVEPOINT active_record_1 AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 718799085) ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", nil], ["position", 1], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 718799085 AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 718799085 AND position >= 1) SQL (0.2ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", "some_limit_helper_here"], ["position", 1], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-09-28 09:00:00.012672' WHERE "advert_selector_helper_items"."id" = 960656442  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 718799085 AND position = 1) 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"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 718799085 AND position > 2)  (0.2ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-09-28 09:00:00.016454', "position" = 11 WHERE "advert_selector_helper_items"."id" = 960656441  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 718799085 AND position = 11)  (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" = ? LIMIT 1 [["id", 718799085]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement'  (0.1ms) 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position DESC LIMIT 1  (0.2ms) 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.1ms) 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.1ms) 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.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.1ms) 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.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.1ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-09-28 09:00:00.002441', "conflicting_placements_array" = 'not_found,video' WHERE "advert_selector_placements"."id" = 718799085 AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE (LOWER(name) = 'leaderboard') LIMIT 1  (0.3ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-09-28 09:00:00.006793', "conflicting_placements_array" = '' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.2ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-09-28 09:00:00.009471' WHERE "advert_selector_helper_items"."id" = 510529479  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 405688915 AND position = 1) 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.1ms) 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.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]] 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.1ms) 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.1ms) 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.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.1ms) 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.8ms) INSERT INTO "advert_selector_placements" ("conflicting_placements_array", "created_at", "name", "only_once_per_session", "updated_at") VALUES (?, ?, ?, ?, ?) [["conflicting_placements_array", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Fri, 28 Sep 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"."master_id" = 1019730478 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/1019730478 Completed 302 Found in 5ms (ActiveRecord: 1.0ms)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_placements"  (0.1ms) rollback transaction  (0.0ms) 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.1ms) 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", 405688915]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_placements"  Processing by AdvertSelector::PlacementsController#destroy as HTML Parameters: {"id"=>"405688915"} AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", "405688915"]]  (0.1ms) SAVEPOINT active_record_1 AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position SQL (0.2ms) DELETE FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."id" = ? [["id", 510529479]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position - 1) WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 405688915 AND position > 1) SQL (0.1ms) 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 5ms (ActiveRecord: 0.8ms)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_placements"   (0.1ms) rollback transaction  (0.1ms) 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.1ms) 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.1ms) 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  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/placements/_form.html.erb (17.0ms) 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" 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 Completed 200 OK in 28ms (Views: 26.4ms | ActiveRecord: 0.9ms)  (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::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" 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 Completed 200 OK in 12ms (Views: 10.3ms | ActiveRecord: 0.7ms)  (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 (13.9ms) AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.3ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 AdvertSelector::Placement Load (0.2ms) 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 Completed 200 OK in 27ms (Views: 25.6ms | ActiveRecord: 0.9ms)  (0.1ms) rollback transaction  (0.1ms) 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.1ms) 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", 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.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", "405688915"]]  (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"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.3ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-09-28 09:00:00.004819' WHERE "advert_selector_helper_items"."id" = 510529479  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 405688915 AND position = 1)  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/405688915 Completed 302 Found in 5ms (ActiveRecord: 0.6ms)  (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) rollback transaction  (0.1ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) 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-09-28 09:00:00.000577' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-28 09:00:00.003132' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.006589' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.006793' 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"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" IN (718799085, 405688915) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 11ms (Views: 10.2ms | ActiveRecord: 0.6ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 814558298 AND position >= 0) SQL (0.3ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "always_false"], ["position", 0], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.022600' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.022805' 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"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" IN (718799085, 405688915) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.3ms | ActiveRecord: 0.5ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-28 09:00:00.000447' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-28 09:00:00.002513' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 814558298 AND position >= 0) SQL (0.2ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "raise_error"], ["position", 0], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.005255' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.005475' 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"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" IN (718799085, 405688915) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] Error with banner Coke in placement Leaderboard. 2012-09-28T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /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:48:in `send' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:48:in `advert_selector_banner_try' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:44:in `each' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:44:in `advert_selector_banner_try' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:16: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' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `__send__' /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 8ms (Views: 7.0ms | ActiveRecord: 0.6ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 Fri Sep 28 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" CACHE (0.0ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 16ms (Views: 14.5ms | 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-28 09:00:00.000394' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-28 09:00:00.002973' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-28 09:00:00.000390' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.003664' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.003889' 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"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" IN (718799085, 405688915) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 8ms (Views: 6.9ms | ActiveRecord: 0.6ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.018971' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.019158' 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"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" IN (718799085, 405688915) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 7ms (Views: 6.4ms | ActiveRecord: 0.5ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Mon Oct 01 12:00:00 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 2ms (Views: 1.5ms | ActiveRecord: 0.0ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1  (0.2ms) 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-01 09:00:00.000407' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-01 09:00:00.002471' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.002185' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.002371' 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"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" IN (718799085, 405688915) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 7ms (Views: 6.5ms | ActiveRecord: 0.6ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/?advert_selector_force=parade_banner" for 127.0.0.1 at Mon Oct 01 12:00:00 +0300 2012 Processing by ExamplesController#index as HTML Parameters: {"advert_selector_force"=>"parade_banner"} [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = 0 LIMIT 1 [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 4ms (Views: 3.4ms | ActiveRecord: 0.1ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-01 09:00:00.000406' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-01 09:00:00.002454' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-01 09:00:00.000444' 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"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.004860' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.005075' 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"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" IN (718799085, 405688915) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner parade_banner in placement Parade [AdvertSelector] AdvertSelection finished Completed 200 OK in 8ms (Views: 7.1ms | ActiveRecord: 0.6ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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.6ms | ActiveRecord: 0.0ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-01 09:00:00.000422' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-01 09:00:00.002868' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-01 09:00:00.000533' WHERE "advert_selector_banners"."id" = 207249520 AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-01 09:00:00.003923', "conflicting_placements_array" = '' WHERE "advert_selector_placements"."id" = 718799085 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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-01 09:00:00.006232', "conflicting_placements_array" = '' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-10-01 09:00:00.007697' WHERE "advert_selector_helper_items"."id" = 510529479  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 405688915 AND position = 1) 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-01 09:00:00.010297', "conflicting_placements_array" = '' WHERE "advert_selector_placements"."id" = 1019730477 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 1019730477 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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 Mon Oct 01 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-01 09:00:00.014854' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.015051' 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"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" IN (718799085, 405688915) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_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.3ms | ActiveRecord: 0.5ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-01 09:00:00.000420' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-01 09:00:00.002520' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.000254' 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"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" IN (718799085, 405688915) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_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.5ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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: 3.1ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Mon Oct 01 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.7ms | 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.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-01 09:00:00.000416' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-01 09:00:00.002514' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 "only_once_per_session" = 't', "updated_at" = '2012-10-01 09:00:00.000943' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-10-01 09:00:00.002432' WHERE "advert_selector_helper_items"."id" = 510529479  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 405688915 AND position = 1)  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.006002' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.006204' 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"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" IN (718799085, 405688915) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 7ms (Views: 6.0ms | ActiveRecord: 0.5ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Mon Oct 01 12:00:00 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 2ms (Views: 1.5ms | ActiveRecord: 0.0ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-01 09:00:00.002609' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.002809' 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"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" IN (718799085, 405688915) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 7ms (Views: 6.6ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 10:55:27', 100, '2012-10-03 00:00:00', 't', '2012-09-28 10:55:27', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 10:55:27', '2012-10-08 00:00:00', 't', '2012-09-28 10:55:27', 100, 394627963, 1000, 't', 0, '2012-09-28 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-09-28 10:55:27', '2012-10-08 00:00:00', 'f', '2012-09-28 10:55:27', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-28 10:55:27', '2012-09-28 10:55:27', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-28 10:55:27', '2012-09-28 10:55:27', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "master_type") VALUES ('leaderboard_testing', 1, '2012-09-28 10:55:27', '2012-09-28 10:55:27', 405688915, 510529479, 'AdvertSelector::Placement') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_parade', 1, '2012-09-28 10:55:27', '2012-09-28 10:55:27', 207249520, 281932184, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-28 10:55:27', '2012-09-28 10:55:27', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-28 10:55:27', '2012-09-28 10:55:27', '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-09-28 10:55:27', '2012-09-28 10:55:27', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-28 10:55:27', '2012-09-28 10:55:27', 'parade', 405688915)  (42.0ms) commit transaction  (0.0ms) 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) SELECT COUNT(*) FROM "advert_selector_helper_items"   (0.1ms) SAVEPOINT active_record_1 AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 814558298) ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 2], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 814558298 AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 814558298 AND position >= 0) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Fri, 28 Sep 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-28 09:00:00.000076' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-28 09:00:00.000956' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.001084' 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-09-28 09:00:00.001976' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-09-28 09:00:00.002694' OR end_time IS NULL) AND (start_time < '2011-09-28 10:00:00.002826' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count)  (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) 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.4ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.001119', "running_view_count" = 0 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]]  (0.1ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.008204', "running_view_count" = 1001 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.3ms) UPDATE "advert_selector_banners" SET "confirmed" = 'f', "updated_at" = '2012-09-28 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-28 09:00:00.002400' 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-09-27 21:00:00.000000', "end_time" = '2012-10-08 00:00:00.000000', "target_view_count" = 100, "updated_at" = '2012-09-28 09:00:00.000813' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.002822', "running_view_count" = 0 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.0ms) SELECT COUNT(*) FROM "advert_selector_banners"  Processing by AdvertSelector::BannersController#create as HTML Parameters: {"banner"=>{"comment"=>"Pepsi banner", "name"=>"Pepsi", "end_time"=>"2012-10-08 00:00:00 UTC", "placement_id"=>"405688915", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-09-28 00:00:00 UTC"}}  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["end_time", Mon, 08 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", Fri, 28 Sep 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Fri, 28 Sep 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"."master_id" = 814558299 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.1ms) 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.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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position SQL (0.2ms) 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 394627963 AND position > 2) SQL (0.1ms) 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.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]] Processing by AdvertSelector::BannersController#edit 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"]] 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/banners/_form.html.erb (130.4ms) 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" 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 Completed 200 OK in 147ms (Views: 145.3ms | ActiveRecord: 0.9ms)  (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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 11ms (Views: 10.0ms | 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]] 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 (20.0ms) 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" 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 Completed 200 OK in 29ms (Views: 27.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]] 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.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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.3ms)  (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::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" 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 Completed 200 OK in 9ms (Views: 8.3ms | 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.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.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items"  (0.0ms) SAVEPOINT active_record_1 AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 718799085) ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", nil], ["position", 1], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 718799085 AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 718799085 AND position >= 1) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", "some_limit_helper_here"], ["position", 1], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-09-28 09:00:00.010252' WHERE "advert_selector_helper_items"."id" = 960656442  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 718799085 AND position = 1) SQL (0.0ms) 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"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 718799085 AND position > 2)  (0.1ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "position" = 11, "updated_at" = '2012-09-28 09:00:00.012369' WHERE "advert_selector_helper_items"."id" = 960656441  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 718799085 AND position = 11)  (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]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement'  (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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position DESC LIMIT 1  (0.2ms) rollback transaction  (0.1ms) 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.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]] 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.3ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-09-28 09:00:00.001203', "conflicting_placements_array" = 'not_found,video' WHERE "advert_selector_placements"."id" = 718799085 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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-09-28 09:00:00.003450', "conflicting_placements_array" = '' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.2ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-09-28 09:00:00.004944' WHERE "advert_selector_helper_items"."id" = 510529479  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 405688915 AND position = 1) 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.1ms) 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.1ms) 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.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.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.1ms) 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.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]] AdvertSelector::Placement Load (0.0ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_placements"  Processing by AdvertSelector::PlacementsController#create as HTML Parameters: {"placement"=>{"name"=>"new placement"}}  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "advert_selector_placements" ("conflicting_placements_array", "created_at", "name", "only_once_per_session", "updated_at") VALUES (?, ?, ?, ?, ?) [["conflicting_placements_array", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Fri, 28 Sep 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"."master_id" = 1019730478 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/1019730478 Completed 302 Found in 4ms (ActiveRecord: 0.7ms)  (0.1ms) 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.1ms) SELECT COUNT(*) FROM "advert_selector_placements"  Processing by AdvertSelector::PlacementsController#destroy as HTML Parameters: {"id"=>"405688915"} AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", "405688915"]]  (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"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position SQL (0.3ms) DELETE FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."id" = ? [["id", 510529479]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position - 1) WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 405688915 AND position > 1) SQL (0.1ms) 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 4ms (ActiveRecord: 0.7ms)  (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.1ms) 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  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/placements/_form.html.erb (16.2ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 26ms (Views: 24.5ms | ActiveRecord: 0.9ms)  (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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 11ms (Views: 9.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#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 (13.6ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 21ms (Views: 20.6ms | 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 0ms (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.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", "405688915"]]  (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"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.3ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-09-28 09:00:00.004675' WHERE "advert_selector_helper_items"."id" = 510529479  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 405688915 AND position = 1)  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/405688915 Completed 302 Found in 5ms (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]]  (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-09-28 09:00:00.000487' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-28 09:00:00.002764' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.007400' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.007611' 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"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" IN (718799085, 405688915) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 11ms (Views: 10.2ms | ActiveRecord: 0.6ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 814558298 AND position >= 0) SQL (0.3ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "always_false"], ["position", 0], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.022647' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.022840' 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"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" IN (718799085, 405688915) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelection finished Completed 200 OK in 6ms (Views: 4.9ms | ActiveRecord: 0.5ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-28 09:00:00.000443' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-28 09:00:00.002648' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 814558298 AND position >= 0) SQL (0.2ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "raise_error"], ["position", 0], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.004488' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.004684' 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"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" IN (718799085, 405688915) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] Error with banner Coke in placement Leaderboard. 2012-09-28T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /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:48:in `send' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:48:in `advert_selector_banner_try' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:44:in `each' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:44:in `advert_selector_banner_try' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:16: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' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `__send__' /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 7ms (Views: 6.6ms | ActiveRecord: 0.5ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 Fri Sep 28 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" CACHE (0.0ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 15ms (Views: 13.4ms | 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.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-28 09:00:00.000502' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-28 09:00:00.002930' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-28 09:00:00.000335' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.003183' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.003365' 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"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" IN (718799085, 405688915) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 7ms (Views: 6.0ms | ActiveRecord: 0.5ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.017304' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.017472' 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"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" IN (718799085, 405688915) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_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.9ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-01 09:00:00.000414' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-01 09:00:00.002642' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.002222' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.002411' 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"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" IN (718799085, 405688915) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_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.5ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/?advert_selector_force=parade_banner" for 127.0.0.1 at Mon Oct 01 12:00:00 +0300 2012 Processing by ExamplesController#index as HTML Parameters: {"advert_selector_force"=>"parade_banner"} [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = 0 LIMIT 1 [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 4ms (Views: 3.2ms | ActiveRecord: 0.2ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.1ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-01 09:00:00.000489' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-01 09:00:00.002619' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-01 09:00:00.000471' 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"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.004383' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.004588' 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.4ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" IN (718799085, 405688915) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner parade_banner in placement Parade [AdvertSelector] AdvertSelection finished Completed 200 OK in 8ms (Views: 7.1ms | ActiveRecord: 0.8ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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.8ms | ActiveRecord: 0.0ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-01 09:00:00.000470' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-01 09:00:00.002727' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "confirmed" = 't', "updated_at" = '2012-10-01 09:00:00.000517' 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"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-01 09:00:00.002970', "conflicting_placements_array" = '' WHERE "advert_selector_placements"."id" = 718799085 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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-01 09:00:00.005052', "conflicting_placements_array" = '' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.2ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-10-01 09:00:00.006494' WHERE "advert_selector_helper_items"."id" = 510529479  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 405688915 AND position = 1) 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-01 09:00:00.009036', "conflicting_placements_array" = '' WHERE "advert_selector_placements"."id" = 1019730477 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 1019730477 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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 Mon Oct 01 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-01 09:00:00.013702' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.014000' 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"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" IN (718799085, 405688915) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_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 9ms (Views: 8.4ms | ActiveRecord: 0.5ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-01 09:00:00.000441' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-01 09:00:00.002665' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.000250' 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"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" IN (718799085, 405688915) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_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.6ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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.7ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Mon Oct 01 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.7ms | 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.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-01 09:00:00.000581' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-01 09:00:00.003072' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.2ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-10-01 09:00:00.000995', "only_once_per_session" = 't' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.2ms) UPDATE "advert_selector_helper_items" SET "content_for" = 'f', "updated_at" = '2012-10-01 09:00:00.002531' WHERE "advert_selector_helper_items"."id" = 510529479  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 405688915 AND position = 1)  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.006439' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.006640' 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"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" IN (718799085, 405688915) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 7ms (Views: 6.5ms | ActiveRecord: 0.5ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Mon Oct 01 12:00:00 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 2ms (Views: 1.5ms | ActiveRecord: 0.0ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.3ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time > '2012-10-01 09:00:00.002633' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.002930' 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"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" IN (718799085, 405688915) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 8ms (Views: 7.1ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 10:56:23', 100, '2012-10-03 00:00:00', 't', '2012-09-28 10:56:23', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 10:56:23', '2012-10-08 00:00:00', 't', '2012-09-28 10:56:23', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 10:56:23', '2012-10-08 00:00:00', 'f', '2012-09-28 10:56:23', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-28 10:56:23', '2012-09-28 10:56:23', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-28 10:56:23', '2012-09-28 10:56:23', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "master_type") VALUES ('leaderboard_testing', 1, '2012-09-28 10:56:23', '2012-09-28 10:56:23', 405688915, 510529479, 'AdvertSelector::Placement') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_parade', 1, '2012-09-28 10:56:23', '2012-09-28 10:56:23', 207249520, 281932184, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-28 10:56:23', '2012-09-28 10:56:23', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-28 10:56:23', '2012-09-28 10:56:23', '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-09-28 10:56:23', '2012-09-28 10:56:23', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-28 10:56:23', '2012-09-28 10:56:23', 'parade', 405688915)  (504.1ms) commit 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-09-28 09:00:00.001877' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.015732', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:02.795208' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:02.795444' 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.5ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" IN (718799085, 405688915) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.5ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Rendered examples/index.html.erb within layouts/application (2792.7ms) Completed 200 OK in 2798ms (Views: 2796.5ms | ActiveRecord: 1.3ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/?advert_selector_force=parade_banner" for 127.0.0.1 at Fri Sep 28 12:00:02 +0300 2012 Processing by ExamplesController#index as HTML Parameters: {"advert_selector_force"=>"parade_banner"} [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = 0 LIMIT 1 [AdvertSelector] CACHE (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = 0 LIMIT 1 [AdvertSelector] CACHE (0.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = 0 LIMIT 1 [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Rendered examples/index.html.erb within layouts/application (60725.8ms) Completed 200 OK in 60729ms (Views: 60728.5ms | ActiveRecord: 0.2ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1  (0.2ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.3ms) 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-09-28 10:57:37', 100, '2012-10-03 00:00:00', 't', '2012-09-28 10:57:37', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 10:57:37', '2012-10-08 00:00:00', 't', '2012-09-28 10:57:37', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 10:57:37', '2012-10-08 00:00:00', 'f', '2012-09-28 10:57:37', 1000, 207249520, 1000, 't', 1, '2012-09-28 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", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-28 10:57:37', '2012-09-28 10:57:37', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-28 10:57:37', '2012-09-28 10:57:37', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "master_type") VALUES ('leaderboard_testing', 1, '2012-09-28 10:57:37', '2012-09-28 10:57:37', 405688915, 510529479, 'AdvertSelector::Placement') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_parade', 1, '2012-09-28 10:57:37', '2012-09-28 10:57:37', 207249520, 281932184, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-28 10:57:37', '2012-09-28 10:57:37', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') Fixture Delete (0.2ms) DELETE FROM "advert_selector_placements" Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Parade', '2012-09-28 10:57:37', '2012-09-28 10:57:37', 'leaderboard,video', 718799085) Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "only_once_per_session", "id") VALUES ('Video', '2012-09-28 10:57:37', '2012-09-28 10:57:37', 'parade', 't', 1019730477) Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-28 10:57:37', '2012-09-28 10:57:37', 'parade', 405688915)  (116.7ms) commit transaction  (0.0ms) 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.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-28 09:00:00.000791' WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.014988', "confirmed" = 'f' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.029688' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.029883' 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"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" IN (718799085, 405688915) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Rendered examples/index.html.erb within layouts/application (16.1ms) Completed 200 OK in 21ms (Views: 20.2ms | ActiveRecord: 0.6ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 Fri Sep 28 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position [AdvertSelector] ForceShowing banner parade_banner in placement Parade [AdvertSelector] AdvertSelection finished Rendered examples/index.html.erb within layouts/application (6.5ms) Completed 200 OK in 8ms (Views: 7.2ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 10:57:45', 100, '2012-10-03 00:00:00', 't', '2012-09-28 10:57:45', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 10:57:45', '2012-10-08 00:00:00', 't', '2012-09-28 10:57:45', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 10:57:45', '2012-10-08 00:00:00', 'f', '2012-09-28 10:57:45', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-28 10:57:45', '2012-09-28 10:57:45', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-28 10:57:45', '2012-09-28 10:57:45', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "master_type") VALUES ('leaderboard_testing', 1, '2012-09-28 10:57:45', '2012-09-28 10:57:45', 405688915, 510529479, 'AdvertSelector::Placement') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_parade', 1, '2012-09-28 10:57:45', '2012-09-28 10:57:45', 207249520, 281932184, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-28 10:57:45', '2012-09-28 10:57:45', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-28 10:57:45', '2012-09-28 10:57:45', '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-09-28 10:57:45', '2012-09-28 10:57:45', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-28 10:57:45', '2012-09-28 10:57:45', 'parade', 405688915)  (38.7ms) commit transaction  (0.0ms) 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.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-28 09:00:00.000804' WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "confirmed" = 'f', "updated_at" = '2012-09-28 09:00:00.015212' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.030044' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.030255' 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"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" IN (718799085, 405688915) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Rendered examples/index.html.erb within layouts/application (17.1ms) Completed 200 OK in 22ms (Views: 21.2ms | ActiveRecord: 0.6ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 Fri Sep 28 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position [AdvertSelector] ForceShowing banner parade_banner in placement Parade [AdvertSelector] AdvertSelection finished Rendered examples/index.html.erb within layouts/application (5.5ms) Completed 200 OK in 7ms (Views: 6.2ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 10:58:08', 100, '2012-10-03 00:00:00', 't', '2012-09-28 10:58:08', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 10:58:08', '2012-10-08 00:00:00', 't', '2012-09-28 10:58:08', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 10:58:08', '2012-10-08 00:00:00', 'f', '2012-09-28 10:58:08', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-28 10:58:08', '2012-09-28 10:58:08', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-28 10:58:08', '2012-09-28 10:58:08', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "master_type") VALUES ('leaderboard_testing', 1, '2012-09-28 10:58:08', '2012-09-28 10:58:08', 405688915, 510529479, 'AdvertSelector::Placement') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_parade', 1, '2012-09-28 10:58:08', '2012-09-28 10:58:08', 207249520, 281932184, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-28 10:58:08', '2012-09-28 10:58:08', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') Fixture Delete (0.2ms) 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-09-28 10:58:08', '2012-09-28 10:58:08', '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-09-28 10:58:08', '2012-09-28 10:58:08', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-28 10:58:08', '2012-09-28 10:58:08', 'parade', 405688915)  (230.1ms) commit transaction  (0.0ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]]  (0.1ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-28 09:00:00.001316' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-28 09:00:00.023186' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.037620' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.037826' 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"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" IN (718799085, 405688915) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Rendered examples/index.html.erb within layouts/application (15.9ms) Completed 200 OK in 21ms (Views: 20.0ms | ActiveRecord: 0.6ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 Fri Sep 28 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position [AdvertSelector] ForceShowing banner parade_banner in placement Parade [AdvertSelector] AdvertSelection finished Rendered examples/index.html.erb within layouts/application (7.3ms) Completed 200 OK in 9ms (Views: 8.3ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1  (0.2ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.3ms) 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-09-28 10:58:13', 100, '2012-10-03 00:00:00', 't', '2012-09-28 10:58:13', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 10:58:13', '2012-10-08 00:00:00', 't', '2012-09-28 10:58:13', 100, 394627963, 1000, 't', 0, '2012-09-28 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-09-28 10:58:13', '2012-10-08 00:00:00', 'f', '2012-09-28 10:58:13', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-28 10:58:13', '2012-09-28 10:58:13', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-28 10:58:13', '2012-09-28 10:58:13', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "master_type") VALUES ('leaderboard_testing', 1, '2012-09-28 10:58:13', '2012-09-28 10:58:13', 405688915, 510529479, 'AdvertSelector::Placement') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_parade', 1, '2012-09-28 10:58:13', '2012-09-28 10:58:13', 207249520, 281932184, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-28 10:58:13', '2012-09-28 10:58:13', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-28 10:58:13', '2012-09-28 10:58:13', '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-09-28 10:58:13', '2012-09-28 10:58:13', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-28 10:58:13', '2012-09-28 10:58:13', 'parade', 405688915)  (871.9ms) 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.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 814558298) ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 2], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 814558298 AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 814558298 AND position >= 0) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Fri, 28 Sep 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-28 09:00:00.000073' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-28 09:00:00.000872' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.000996' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count)  (0.0ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-09-28 09:00:00.001887' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-09-28 09:00:00.002578' OR end_time IS NULL) AND (start_time < '2011-09-28 10:00:00.002709' 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.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.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.000997', "running_view_count" = 0 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 AdvertSelector::Banner Load (0.1ms) 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 "updated_at" = '2012-09-28 09:00:00.007161', "running_view_count" = 1001 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-09-28 09:00:00.000388' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-28 09:00:00.002429' 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.3ms) UPDATE "advert_selector_banners" SET "end_time" = '2012-10-08 00:00:00.000000', "target_view_count" = 100, "updated_at" = '2012-09-28 09:00:00.000822', "start_time" = '2012-09-27 21:00:00.000000' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.002901', "running_view_count" = 0 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", "end_time"=>"2012-10-08 00:00:00 UTC", "placement_id"=>"405688915", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-09-28 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["end_time", Mon, 08 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", Fri, 28 Sep 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Fri, 28 Sep 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"."master_id" = 814558299 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.1ms) 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.1ms) 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position SQL (0.2ms) 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 394627963 AND position > 2) SQL (0.1ms) 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.7ms)  (0.1ms) 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.1ms) 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/banners/_form.html.erb (137.9ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 154ms (Views: 152.7ms | ActiveRecord: 0.9ms)  (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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 11ms (Views: 9.8ms | 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]] 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 (19.0ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 27ms (Views: 26.2ms | 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]] Processing by AdvertSelector::BannersController#show as HTML Parameters: {"id"=>"394627963"} Redirected to http://test.host/advert_selector/banners/394627963/edit Completed 302 Found in 0ms (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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", "394627963"]]  (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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/banners/394627963 Completed 302 Found in 4ms (ActiveRecord: 0.3ms)  (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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) 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::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" ORDER BY priority desc LIMIT 10 AdvertSelector::Placement Load (0.2ms) 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 Completed 200 OK in 11ms (Views: 9.8ms | 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.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) SELECT COUNT(*) FROM "advert_selector_helper_items"  (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"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 718799085) ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", nil], ["position", 1], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 718799085 AND position >= 10) SQL (0.2ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]] SQL (0.2ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 718799085 AND position >= 1) SQL (0.2ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 718799085], ["master_type", "AdvertSelector::Placement"], ["name", "some_limit_helper_here"], ["position", 1], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "updated_at" = '2012-09-28 09:00:00.011312', "content_for" = 'f' WHERE "advert_selector_helper_items"."id" = 960656442  (0.2ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 718799085 AND position = 1) 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"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 718799085 AND position > 2)  (0.1ms) UPDATE "advert_selector_helper_items" SET "position" = 11, "updated_at" = '2012-09-28 09:00:00.015091', "content_for" = 'f' WHERE "advert_selector_helper_items"."id" = 960656441  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 718799085 AND position = 11)  (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]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement'  (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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position DESC LIMIT 1  (0.1ms) rollback transaction  (0.1ms) 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.1ms) 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.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]] 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) SAVEPOINT active_record_1  (0.5ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-09-28 09:00:00.002722', "conflicting_placements_array" = 'not_found,video' WHERE "advert_selector_placements"."id" = 718799085 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE (LOWER(name) = 'leaderboard') LIMIT 1  (0.2ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-09-28 09:00:00.006664', "conflicting_placements_array" = '' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.3ms) UPDATE "advert_selector_helper_items" SET "updated_at" = '2012-09-28 09:00:00.008950', "content_for" = 'f' WHERE "advert_selector_helper_items"."id" = 510529479  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 405688915 AND position = 1) AdvertSelector::Placement Load (0.2ms) 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.1ms) 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.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.1ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) 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.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.1ms) rollback transaction  (0.1ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) 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.1ms) rollback transaction  (0.1ms) 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", 405688915]]  (0.1ms) 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.5ms) INSERT INTO "advert_selector_placements" ("conflicting_placements_array", "created_at", "name", "only_once_per_session", "updated_at") VALUES (?, ?, ?, ?, ?) [["conflicting_placements_array", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Fri, 28 Sep 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"."master_id" = 1019730478 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/1019730478 Completed 302 Found in 4ms (ActiveRecord: 0.6ms)  (0.1ms) 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.1ms) 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 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position SQL (0.3ms) DELETE FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."id" = ? [["id", 510529479]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position - 1) WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 405688915 AND position > 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 4ms (ActiveRecord: 0.8ms)  (0.1ms) 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.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]] 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.1ms) 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  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/placements/_form.html.erb (16.8ms) 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" 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 Completed 200 OK in 28ms (Views: 25.8ms | ActiveRecord: 0.9ms)  (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::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 16ms (Views: 14.0ms | ActiveRecord: 0.9ms)  (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 (14.5ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.3ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 24ms (Views: 23.1ms | 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]] 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 0ms (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.1ms) 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.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", "405688915"]]  (0.0ms) SAVEPOINT active_record_1 AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.4ms) UPDATE "advert_selector_helper_items" SET "updated_at" = '2012-09-28 09:00:00.006042', "content_for" = 'f' WHERE "advert_selector_helper_items"."id" = 510529479  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 405688915 AND position = 1)  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/405688915 Completed 302 Found in 6ms (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]]  (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-09-28 09:00:00.000458' WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "confirmed" = 'f', "updated_at" = '2012-09-28 09:00:00.003477' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.008439' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.008795' 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"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" IN (718799085, 405688915) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 13ms (Views: 12.0ms | ActiveRecord: 0.7ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 814558298 AND position >= 0) SQL (0.3ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "always_false"], ["position", 0], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.025730' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.025944' 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.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" IN (718799085, 405688915) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] AdvertSelection finished Completed 200 OK in 7ms (Views: 6.5ms | ActiveRecord: 0.7ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.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.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-28 09:00:00.000410' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-28 09:00:00.002556' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 814558298 AND position >= 0) SQL (0.4ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "raise_error"], ["position", 0], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.007738' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.008070' 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"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" IN (718799085, 405688915) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] Error with banner Coke in placement Leaderboard. 2012-09-28T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /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:48:in `send' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:48:in `advert_selector_banner_try' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:44:in `each' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:44:in `advert_selector_banner_try' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:16: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' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `__send__' /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 12ms (Views: 10.7ms | ActiveRecord: 0.9ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 Fri Sep 28 12:00:00 +0300 2012 Processing by AdvertSelector::PlacementsController#index as HTML AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" CACHE (0.0ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 21ms (Views: 19.5ms | 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-28 09:00:00.000424' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-28 09:00:00.002641' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.000569', "frequency" = 2 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.005432' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.005757' 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"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" IN (718799085, 405688915) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 12ms (Views: 11.0ms | ActiveRecord: 0.9ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.025684' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.026029' 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"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" IN (718799085, 405688915) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 12ms (Views: 10.6ms | ActiveRecord: 0.9ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Mon Oct 01 12:00:00 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 2ms (Views: 1.7ms | ActiveRecord: 0.0ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.4ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-01 09:00:00.000422' WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-01 09:00:00.004293' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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.4ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time > '2012-10-01 09:00:00.003556' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.003882' 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.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" IN (718799085, 405688915) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 9ms (Views: 8.3ms | ActiveRecord: 0.8ms) AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 Mon Oct 01 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"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position [AdvertSelector] ForceShowing banner parade_banner in placement Parade [AdvertSelector] AdvertSelection finished Completed 200 OK in 8ms (Views: 7.6ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-01 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-01 09:00:00.002551' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-01 09:00:00.000470' 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"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.004371' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.004730' 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"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" IN (718799085, 405688915) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner parade_banner in placement Parade [AdvertSelector] AdvertSelection finished Completed 200 OK in 13ms (Views: 11.5ms | ActiveRecord: 0.9ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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.7ms | ActiveRecord: 0.0ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]]  (0.1ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-01 09:00:00.000729' WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "confirmed" = 'f', "updated_at" = '2012-10-01 09:00:00.004770' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "confirmed" = 't', "updated_at" = '2012-10-01 09:00:00.001162' 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"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-01 09:00:00.004940', "conflicting_placements_array" = '' WHERE "advert_selector_placements"."id" = 718799085 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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-01 09:00:00.007091', "conflicting_placements_array" = '' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.2ms) UPDATE "advert_selector_helper_items" SET "updated_at" = '2012-10-01 09:00:00.008577', "content_for" = 'f' WHERE "advert_selector_helper_items"."id" = 510529479  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 405688915 AND position = 1) 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-01 09:00:00.011210', "conflicting_placements_array" = '' WHERE "advert_selector_placements"."id" = 1019730477 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 1019730477 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position 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 Mon Oct 01 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-01 09:00:00.016199' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.016600' 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"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" IN (718799085, 405688915) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_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 14ms (Views: 13.1ms | ActiveRecord: 0.9ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 207249520 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-01 09:00:00.000425' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-01 09:00:00.002608' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.000460' OR end_time IS NULL) 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"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" IN (718799085, 405688915) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.3ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 11ms (Views: 9.8ms | ActiveRecord: 1.0ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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 Mon Oct 01 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.5ms | ActiveRecord: 0.0ms)  (0.2ms) rollback transaction  (0.1ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]]  (0.1ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-01 09:00:00.000976' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-01 09:00:00.004376' 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 "only_once_per_session" = 't', "updated_at" = '2012-10-01 09:00:00.001054' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) UPDATE "advert_selector_helper_items" SET "updated_at" = '2012-10-01 09:00:00.002578', "content_for" = 'f' WHERE "advert_selector_helper_items"."id" = 510529479  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" = 405688915 AND position = 1)  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.006288' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.006489' 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"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" IN (718799085, 405688915) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 9ms (Views: 8.5ms | ActiveRecord: 0.7ms) AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.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.1ms) 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-01 09:00:00.002453' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.002682' 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"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" IN (718799085, 405688915) ORDER BY position [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" IN (207249520, 394627963, 814558298) ORDER BY position [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 7ms (Views: 6.5ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 11:01:35', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:01:35', 50, 814558298, 1000, 'f', 0, '2012-09-23 00:00:00') Fixture Insert (0.0ms) 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-09-28 11:01:35', '2012-10-08 00:00:00', 't', '2012-09-28 11:01:35', 100, 394627963, 1000, 't', 0, '2012-09-28 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-09-28 11:01:35', '2012-10-08 00:00:00', 'f', '2012-09-28 11:01:35', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-28 11:01:35', '2012-09-28 11:01:35', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-28 11:01:35', '2012-09-28 11:01:35', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "master_type") VALUES ('leaderboard_testing', 1, '2012-09-28 11:01:35', '2012-09-28 11:01:35', 405688915, 510529479, 'AdvertSelector::Placement') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_parade', 1, '2012-09-28 11:01:35', '2012-09-28 11:01:35', 207249520, 281932184, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-28 11:01:35', '2012-09-28 11:01:35', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') Fixture Delete (0.2ms) 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-09-28 11:01:35', '2012-09-28 11:01:35', '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-09-28 11:01:35', '2012-09-28 11:01:35', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-28 11:01:35', '2012-09-28 11:01:35', 'parade', 405688915)  (38.1ms) commit transaction  (0.0ms) 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) SELECT COUNT(*) FROM "advert_selector_helper_items"   (0.1ms) SAVEPOINT active_record_1 AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 814558298) ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.6ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 2], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 814558298 AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 814558298 AND position >= 0) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Fri, 28 Sep 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-28 09:00:00.000087' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-28 09:00:00.000926' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.001060' 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-09-28 09:00:00.001978' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-09-28 09:00:00.002735' OR end_time IS NULL) AND (start_time < '2011-09-28 10:00:00.002854' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count)  (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.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) 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.1ms) 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 "running_view_count" = 0, "updated_at" = '2012-09-28 09:00:00.001204' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 AdvertSelector::Banner Load (0.1ms) 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-09-28 09:00:00.007487' 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.3ms) UPDATE "advert_selector_banners" SET "running_view_count" = 0, "updated_at" = '2012-09-28 09:00:00.001020', "target_view_count" = 10 WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.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 "updated_at" = '2012-09-28 09:00:00.000432', "confirmed" = 'f' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.002664', "confirmed" = 't' 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.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.000841', "start_time" = '2012-09-27 21:00:00.000000', "end_time" = '2012-10-08 00:00:00.000000', "target_view_count" = 100 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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" = 0, "updated_at" = '2012-09-28 09:00:00.003179' 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.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", 814558298]]  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 11:01:41', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:01:41', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:01:41', '2012-10-08 00:00:00', 't', '2012-09-28 11:01:41', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:01:41', '2012-10-08 00:00:00', 'f', '2012-09-28 11:01:41', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-28 11:01:41', '2012-09-28 11:01:41', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-28 11:01:41', '2012-09-28 11:01:41', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "master_type") VALUES ('leaderboard_testing', 1, '2012-09-28 11:01:41', '2012-09-28 11:01:41', 405688915, 510529479, 'AdvertSelector::Placement') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_parade', 1, '2012-09-28 11:01:41', '2012-09-28 11:01:41', 207249520, 281932184, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-28 11:01:41', '2012-09-28 11:01:41', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') Fixture Delete (0.2ms) DELETE FROM "advert_selector_placements" Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Parade', '2012-09-28 11:01:41', '2012-09-28 11:01:41', '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-09-28 11:01:41', '2012-09-28 11:01:41', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-28 11:01:41', '2012-09-28 11:01:41', 'parade', 405688915)  (329.3ms) commit transaction  (0.0ms) 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) SELECT COUNT(*) FROM "advert_selector_helper_items"   (0.1ms) SAVEPOINT active_record_1 AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 814558298) ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.6ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 2], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 814558298 AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 814558298 AND position >= 0) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Fri, 28 Sep 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.1ms) 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-09-28 09:00:00.000098' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-28 09:00:00.001015' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.001146' 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-09-28 09:00:00.002081' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-09-28 09:00:00.002824' OR end_time IS NULL) AND (start_time < '2011-09-28 10:00:00.002944' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count)  (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) 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-09-28 09:00:00.001003' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 AdvertSelector::Banner Load (0.1ms) 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-09-28 09:00:00.007396' 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.3ms) UPDATE "advert_selector_banners" SET "target_view_count" = 10, "running_view_count" = 0, "updated_at" = '2012-09-28 09:00:00.000995' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.1ms) RELEASE SAVEPOINT active_record_1 AdvertSelector::Banner Load (0.1ms) 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.3ms) UPDATE "advert_selector_banners" SET "confirmed" = 'f', "updated_at" = '2012-09-28 09:00:00.000441' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-28 09:00:00.002685' 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.3ms) UPDATE "advert_selector_banners" SET "target_view_count" = 100, "end_time" = '2012-10-08 00:00:00.000000', "start_time" = '2012-09-27 21:00:00.000000', "updated_at" = '2012-09-28 09:00:00.000866' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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" = 0, "updated_at" = '2012-09-28 09:00:00.003122' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 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.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", 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 Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 11:02:01', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:02:01', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:02:01', '2012-10-08 00:00:00', 't', '2012-09-28 11:02:01', 100, 394627963, 1000, 't', 0, '2012-09-28 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-09-28 11:02:01', '2012-10-08 00:00:00', 'f', '2012-09-28 11:02:01', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-28 11:02:01', '2012-09-28 11:02:01', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-28 11:02:01', '2012-09-28 11:02:01', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "master_type") VALUES ('leaderboard_testing', 1, '2012-09-28 11:02:01', '2012-09-28 11:02:01', 405688915, 510529479, 'AdvertSelector::Placement') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_parade', 1, '2012-09-28 11:02:01', '2012-09-28 11:02:01', 207249520, 281932184, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-28 11:02:01', '2012-09-28 11:02:01', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') Fixture Delete (0.2ms) 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-09-28 11:02:01', '2012-09-28 11:02:01', '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-09-28 11:02:01', '2012-09-28 11:02:01', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-28 11:02:01', '2012-09-28 11:02:01', 'parade', 405688915)  (35.9ms) commit transaction  (0.0ms) 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) SELECT COUNT(*) FROM "advert_selector_helper_items"   (0.1ms) SAVEPOINT active_record_1 AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 814558298) ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.7ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 2], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 814558298 AND position >= 10) SQL (0.2ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]] SQL (0.2ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 814558298 AND position >= 0) SQL (0.2ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-28 09:00:00.000083' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-28 09:00:00.000941' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.001067' 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-09-28 09:00:00.001975' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-09-28 09:00:00.002700' OR end_time IS NULL) AND (start_time < '2011-09-28 10:00:00.002817' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count)  (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) 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 "updated_at" = '2012-09-28 09:00:00.001002', "running_view_count" = 0 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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 "updated_at" = '2012-09-28 09:00:00.007022', "running_view_count" = 551 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.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.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "target_view_count" = 10, "updated_at" = '2012-09-28 09:00:00.001003', "running_view_count" = 0 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.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 "confirmed" = 'f', "updated_at" = '2012-09-28 09:00:00.000438' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-28 09:00:00.002806' 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.3ms) UPDATE "advert_selector_banners" SET "target_view_count" = 100, "start_time" = '2012-09-27 21:00:00.000000', "updated_at" = '2012-09-28 09:00:00.000872', "end_time" = '2012-10-08 00:00:00.000000' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.003274', "running_view_count" = 0 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]]  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 11:02:46', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:02:46', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:02:46', '2012-10-08 00:00:00', 't', '2012-09-28 11:02:46', 100, 394627963, 1000, 't', 0, '2012-09-28 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-09-28 11:02:46', '2012-10-08 00:00:00', 'f', '2012-09-28 11:02:46', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-28 11:02:46', '2012-09-28 11:02:46', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-28 11:02:46', '2012-09-28 11:02:46', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "master_type") VALUES ('leaderboard_testing', 1, '2012-09-28 11:02:46', '2012-09-28 11:02:46', 405688915, 510529479, 'AdvertSelector::Placement') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_parade', 1, '2012-09-28 11:02:46', '2012-09-28 11:02:46', 207249520, 281932184, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-28 11:02:46', '2012-09-28 11:02:46', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-28 11:02:46', '2012-09-28 11:02:46', '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-09-28 11:02:46', '2012-09-28 11:02:46', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-28 11:02:46', '2012-09-28 11:02:46', 'parade', 405688915)  (46.9ms) commit transaction  (0.0ms) 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) SELECT COUNT(*) FROM "advert_selector_helper_items"   (0.1ms) SAVEPOINT active_record_1 AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 814558298) ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 2], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 814558298 AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 814558298 AND position >= 0) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Fri, 28 Sep 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-28 09:00:00.000084' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-28 09:00:00.000904' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.001032' 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-09-28 09:00:00.002041' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-09-28 09:00:00.002834' OR end_time IS NULL) AND (start_time < '2011-09-28 10:00:00.002956' 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.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 "running_view_count" = 0, "updated_at" = '2012-09-28 09:00:00.000915' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-28 09:00:00.006547' 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.1ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "running_view_count" = 0, "updated_at" = '2012-09-28 09:00:00.001087', "target_view_count" = 10 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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.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-09-28 09:00:00.000420' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-28 09:00:00.002499' 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.3ms) UPDATE "advert_selector_banners" SET "start_time" = '2012-09-27 21:00:00.000000', "end_time" = '2012-10-08 00:00:00.000000', "updated_at" = '2012-09-28 09:00:00.000868', "target_view_count" = 100 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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" = 0, "updated_at" = '2012-09-28 09:00:00.002974' 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.1ms) 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", 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 Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 11:02:52', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:02:52', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:02:52', '2012-10-08 00:00:00', 't', '2012-09-28 11:02:52', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:02:52', '2012-10-08 00:00:00', 'f', '2012-09-28 11:02:52', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_leaderboard', 2, '2012-09-28 11:02:52', '2012-09-28 11:02:52', 394627963, 960656439, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES (1, 'banner_leaderboard', '2012-09-28 11:02:52', '2012-09-28 11:02:52', 814558298, 929640376, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "master_type") VALUES ('leaderboard_testing', 1, '2012-09-28 11:02:52', '2012-09-28 11:02:52', 405688915, 510529479, 'AdvertSelector::Placement') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('banner_parade', 1, '2012-09-28 11:02:52', '2012-09-28 11:02:52', 207249520, 281932184, 't', '', 'AdvertSelector::Banner') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "master_id", "id", "content_for", "content", "master_type") VALUES ('request_params_include?', '2012-09-28 11:02:52', '2012-09-28 11:02:52', 394627963, 435138789, 'f', 'pepsi=true', 'AdvertSelector::Banner') 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-09-28 11:02:52', '2012-09-28 11:02:52', '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-09-28 11:02:52', '2012-09-28 11:02:52', 'parade', 't', 1019730477) Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-28 11:02:52', '2012-09-28 11:02:52', 'parade', 405688915)  (42.7ms) commit transaction  (0.2ms) 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 814558298) ORDER BY advert_selector_helper_items.position DESC LIMIT 1 SQL (0.5ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", nil], ["position", 2], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 814558298 AND position >= 10) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", true], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]] SQL (0.1ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_id" = 814558298 AND position >= 0) SQL (0.1ms) INSERT INTO "advert_selector_helper_items" ("content", "content_for", "created_at", "master_id", "master_type", "name", "position", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["content", nil], ["content_for", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["master_id", 814558298], ["master_type", "AdvertSelector::Banner"], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Fri, 28 Sep 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_type" = 'AdvertSelector::Banner' AND "advert_selector_helper_items"."master_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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' 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-09-28 09:00:00.000081' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-28 09:00:00.000876' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.001002' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count)  (0.0ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-09-28 09:00:00.001889' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-09-28 09:00:00.002559' OR end_time IS NULL) AND (start_time < '2011-09-28 10:00:00.002677' 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 "updated_at" = '2012-09-28 09:00:00.000964', "running_view_count" = 0 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 AdvertSelector::Banner Load (0.1ms) 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 "updated_at" = '2012-09-28 09:00:00.006680', "running_view_count" = 551 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.3ms) UPDATE "advert_selector_banners" SET "target_view_count" = 10, "updated_at" = '2012-09-28 09:00:00.000948', "running_view_count" = 0 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.004655', "running_view_count" = 10 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.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.000427', "confirmed" = 'f' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.002544', "confirmed" = 't' 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.3ms) UPDATE "advert_selector_banners" SET "target_view_count" = 100, "updated_at" = '2012-09-28 09:00:00.000846', "end_time" = '2012-10-08 00:00:00.000000', "start_time" = '2012-09-27 21:00:00.000000' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.002963', "running_view_count" = 0 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 Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 11:21:32', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:21:32', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:21:32', '2012-10-08 00:00:00', 't', '2012-09-28 11:21:32', 100, 394627963, 1000, 't', 0, '2012-09-28 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-09-28 11:21:32', '2012-10-08 00:00:00', 'f', '2012-09-28 11:21:32', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:21:32', '2012-09-28 11:21:32', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:21:32', '2012-09-28 11:21:32', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 11:21:32', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:21:32', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:21:32', '2012-10-08 00:00:00', 't', '2012-09-28 11:21:32', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:21:32', '2012-10-08 00:00:00', 'f', '2012-09-28 11:21:32', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:21:32', '2012-09-28 11:21:32', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:21:32', '2012-09-28 11:21:32', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.1ms) 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-09-28 11:21:32', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:21:32', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:21:32', '2012-10-08 00:00:00', 't', '2012-09-28 11:21:32', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:21:32', '2012-10-08 00:00:00', 'f', '2012-09-28 11:21:32', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:21:32', '2012-09-28 11:21:32', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:21:32', '2012-09-28 11:21:32', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 11:21:32', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:21:32', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:21:32', '2012-10-08 00:00:00', 't', '2012-09-28 11:21:32', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:21:32', '2012-10-08 00:00:00', 'f', '2012-09-28 11:21:32', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:21:32', '2012-09-28 11:21:32', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:21:32', '2012-09-28 11:21:32', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.1ms) 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-09-28 11:21:32', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:21:32', 50, 814558298, 1000, 'f', 0, '2012-09-23 00:00:00') Fixture Insert (0.0ms) 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-09-28 11:21:32', '2012-10-08 00:00:00', 't', '2012-09-28 11:21:32', 100, 394627963, 1000, 't', 0, '2012-09-28 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-09-28 11:21:32', '2012-10-08 00:00:00', 'f', '2012-09-28 11:21:32', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:21:32', '2012-09-28 11:21:32', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:21:32', '2012-09-28 11:21:32', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 11:21:32', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:21:32', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:21:32', '2012-10-08 00:00:00', 't', '2012-09-28 11:21:32', 100, 394627963, 1000, 't', 0, '2012-09-28 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-09-28 11:21:32', '2012-10-08 00:00:00', 'f', '2012-09-28 11:21:32', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:21:32', '2012-09-28 11:21:32', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:21:32', '2012-09-28 11:21:32', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.1ms) 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-09-28 11:21:32', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:21:32', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:21:32', '2012-10-08 00:00:00', 't', '2012-09-28 11:21:32', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:21:32', '2012-10-08 00:00:00', 'f', '2012-09-28 11:21:32', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:21:32', '2012-09-28 11:21:32', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:21:32', '2012-09-28 11:21:32', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 11:21:32', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:21:32', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:21:32', '2012-10-08 00:00:00', 't', '2012-09-28 11:21:32', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:21:32', '2012-10-08 00:00:00', 'f', '2012-09-28 11:21:32', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:21:32', '2012-09-28 11:21:32', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:21:32', '2012-09-28 11:21:32', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.1ms) 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-09-28 11:21:32', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:21:32', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:21:32', '2012-10-08 00:00:00', 't', '2012-09-28 11:21:32', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:21:32', '2012-10-08 00:00:00', 'f', '2012-09-28 11:21:32', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:21:32', '2012-09-28 11:21:32', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:21:32', '2012-09-28 11:21:32', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.1ms) 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-09-28 11:21:32', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:21:32', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:21:32', '2012-10-08 00:00:00', 't', '2012-09-28 11:21:32', 100, 394627963, 1000, 't', 0, '2012-09-28 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-09-28 11:21:32', '2012-10-08 00:00:00', 'f', '2012-09-28 11:21:32', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:21:32', '2012-09-28 11:21:32', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:21:32', '2012-09-28 11:21:32', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.1ms) 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-09-28 11:21:32', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:21:32', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:21:32', '2012-10-08 00:00:00', 't', '2012-09-28 11:21:32', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:21:32', '2012-10-08 00:00:00', 'f', '2012-09-28 11:21:32', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:21:32', '2012-09-28 11:21:32', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:21:32', '2012-09-28 11:21:32', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 11:21:32', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:21:32', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:21:32', '2012-10-08 00:00:00', 't', '2012-09-28 11:21:32', 100, 394627963, 1000, 't', 0, '2012-09-28 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-09-28 11:21:32', '2012-10-08 00:00:00', 'f', '2012-09-28 11:21:32', 1000, 207249520, 1000, 't', 1, '2012-09-28 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", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:21:32', '2012-09-28 11:21:32', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:21:32', '2012-09-28 11:21:32', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.1ms) 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-09-28 11:21:32', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:21:32', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:21:32', '2012-10-08 00:00:00', 't', '2012-09-28 11:21:32', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:21:32', '2012-10-08 00:00:00', 'f', '2012-09-28 11:21:32', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:21:32', '2012-09-28 11:21:32', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:21:32', '2012-09-28 11:21:32', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.1ms) 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-09-28 11:21:32', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:21:32', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:21:32', '2012-10-08 00:00:00', 't', '2012-09-28 11:21:32', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:21:32', '2012-10-08 00:00:00', 'f', '2012-09-28 11:21:32', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:21:32', '2012-09-28 11:21:32', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:21:32', '2012-09-28 11:21:32', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.1ms) 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-09-28 11:21:32', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:21:32', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:21:32', '2012-10-08 00:00:00', 't', '2012-09-28 11:21:32', 100, 394627963, 1000, 't', 0, '2012-09-28 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-09-28 11:21:32', '2012-10-08 00:00:00', 'f', '2012-09-28 11:21:32', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:21:32', '2012-09-28 11:21:32', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:21:32', '2012-09-28 11:21:32', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 11:21:32', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:21:32', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:21:32', '2012-10-08 00:00:00', 't', '2012-09-28 11:21:32', 100, 394627963, 1000, 't', 0, '2012-09-28 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-09-28 11:21:32', '2012-10-08 00:00:00', 'f', '2012-09-28 11:21:32', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:21:32', '2012-09-28 11:21:32', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:21:32', '2012-09-28 11:21:32', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.1ms) 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-09-28 11:21:32', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:21:32', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:21:32', '2012-10-08 00:00:00', 't', '2012-09-28 11:21:32', 100, 394627963, 1000, 't', 0, '2012-09-28 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-09-28 11:21:32', '2012-10-08 00:00:00', 'f', '2012-09-28 11:21:32', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:21:32', '2012-09-28 11:21:32', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:21:32', '2012-09-28 11:21:32', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.1ms) 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-09-28 11:21:32', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:21:32', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:21:32', '2012-10-08 00:00:00', 't', '2012-09-28 11:21:32', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:21:32', '2012-10-08 00:00:00', 'f', '2012-09-28 11:21:32', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:21:32', '2012-09-28 11:21:32', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:21:32', '2012-09-28 11:21:32', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.1ms) 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-09-28 11:21:32', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:21:32', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:21:32', '2012-10-08 00:00:00', 't', '2012-09-28 11:21:32', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:21:32', '2012-10-08 00:00:00', 'f', '2012-09-28 11:21:32', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:21:32', '2012-09-28 11:21:32', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:21:32', '2012-09-28 11:21:32', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.1ms) 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-09-28 11:21:32', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:21:32', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:21:32', '2012-10-08 00:00:00', 't', '2012-09-28 11:21:32', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:21:32', '2012-10-08 00:00:00', 'f', '2012-09-28 11:21:32', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:21:32', '2012-09-28 11:21:32', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:21:32', '2012-09-28 11:21:32', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.1ms) 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-09-28 11:21:32', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:21:32', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:21:32', '2012-10-08 00:00:00', 't', '2012-09-28 11:21:32', 100, 394627963, 1000, 't', 0, '2012-09-28 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-09-28 11:21:32', '2012-10-08 00:00:00', 'f', '2012-09-28 11:21:32', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:21:32', '2012-09-28 11:21:32', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:21:32', '2012-09-28 11:21:32', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.1ms) 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-09-28 11:21:32', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:21:32', 50, 814558298, 1000, 'f', 0, '2012-09-23 00:00:00') Fixture Insert (0.0ms) 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-09-28 11:21:32', '2012-10-08 00:00:00', 't', '2012-09-28 11:21:32', 100, 394627963, 1000, 't', 0, '2012-09-28 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-09-28 11:21:32', '2012-10-08 00:00:00', 'f', '2012-09-28 11:21:32', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:21:32', '2012-09-28 11:21:32', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:21:32', '2012-09-28 11:21:32', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.1ms) 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-09-28 11:21:32', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:21:32', 50, 814558298, 1000, 'f', 0, '2012-09-23 00:00:00') Fixture Insert (0.0ms) 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-09-28 11:21:32', '2012-10-08 00:00:00', 't', '2012-09-28 11:21:32', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:21:32', '2012-10-08 00:00:00', 'f', '2012-09-28 11:21:32', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:21:32', '2012-09-28 11:21:32', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:21:32', '2012-09-28 11:21:32', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 11:21:32', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:21:32', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:21:32', '2012-10-08 00:00:00', 't', '2012-09-28 11:21:32', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:21:32', '2012-10-08 00:00:00', 'f', '2012-09-28 11:21:32', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:21:32', '2012-09-28 11:21:32', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:21:32', '2012-09-28 11:21:32', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 11:21:32', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:21:32', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:21:32', '2012-10-08 00:00:00', 't', '2012-09-28 11:21:32', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.2ms) 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-09-28 11:21:32', '2012-10-08 00:00:00', 'f', '2012-09-28 11:21:32', 1000, 207249520, 1000, 't', 1, '2012-09-28 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", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:21:32', '2012-09-28 11:21:32', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:21:32', '2012-09-28 11:21:32', 394627963, 960656439, 't', '')  (0.2ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.4ms) 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-09-28 11:21:32', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:21:32', 50, 814558298, 1000, 'f', 0, '2012-09-23 00:00:00') Fixture Insert (0.2ms) 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-09-28 11:21:32', '2012-10-08 00:00:00', 't', '2012-09-28 11:21:32', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.2ms) 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-09-28 11:21:32', '2012-10-08 00:00:00', 'f', '2012-09-28 11:21:32', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.3ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.2ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:21:32', '2012-09-28 11:21:32', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:21:32', '2012-09-28 11:21:32', 394627963, 960656439, 't', '')  (2.9ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 11:21:32', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:21:32', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:21:32', '2012-10-08 00:00:00', 't', '2012-09-28 11:21:32', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:21:32', '2012-10-08 00:00:00', 'f', '2012-09-28 11:21:32', 1000, 207249520, 1000, 't', 1, '2012-09-28 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", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:21:32', '2012-09-28 11:21:32', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:21:32', '2012-09-28 11:21:32', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.3ms) 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-09-28 11:21:32', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:21:32', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:21:32', '2012-10-08 00:00:00', 't', '2012-09-28 11:21:32', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:21:32', '2012-10-08 00:00:00', 'f', '2012-09-28 11:21:32', 1000, 207249520, 1000, 't', 1, '2012-09-28 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", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:21:32', '2012-09-28 11:21:32', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:21:32', '2012-09-28 11:21:32', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 11:21:32', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:21:32', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:21:32', '2012-10-08 00:00:00', 't', '2012-09-28 11:21:32', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:21:32', '2012-10-08 00:00:00', 'f', '2012-09-28 11:21:32', 1000, 207249520, 1000, 't', 1, '2012-09-28 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", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:21:32', '2012-09-28 11:21:32', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:21:32', '2012-09-28 11:21:32', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 11:21:32', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:21:32', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:21:32', '2012-10-08 00:00:00', 't', '2012-09-28 11:21:32', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:21:32', '2012-10-08 00:00:00', 'f', '2012-09-28 11:21:32', 1000, 207249520, 1000, 't', 1, '2012-09-28 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", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:21:32', '2012-09-28 11:21:32', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:21:32', '2012-09-28 11:21:32', 394627963, 960656439, 't', '')  (0.2ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 11:21:32', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:21:32', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:21:32', '2012-10-08 00:00:00', 't', '2012-09-28 11:21:32', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:21:32', '2012-10-08 00:00:00', 'f', '2012-09-28 11:21:32', 1000, 207249520, 1000, 't', 1, '2012-09-28 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", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:21:32', '2012-09-28 11:21:32', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:21:32', '2012-09-28 11:21:32', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 11:21:32', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:21:32', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:21:32', '2012-10-08 00:00:00', 't', '2012-09-28 11:21:32', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:21:32', '2012-10-08 00:00:00', 'f', '2012-09-28 11:21:32', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:21:32', '2012-09-28 11:21:32', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:21:32', '2012-09-28 11:21:32', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 11:21:32', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:21:32', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:21:32', '2012-10-08 00:00:00', 't', '2012-09-28 11:21:32', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:21:32', '2012-10-08 00:00:00', 'f', '2012-09-28 11:21:32', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:21:32', '2012-09-28 11:21:32', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:21:32', '2012-09-28 11:21:32', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.1ms) 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-09-28 11:21:32', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:21:32', 50, 814558298, 1000, 'f', 0, '2012-09-23 00:00:00') Fixture Insert (0.0ms) 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-09-28 11:21:32', '2012-10-08 00:00:00', 't', '2012-09-28 11:21:32', 100, 394627963, 1000, 't', 0, '2012-09-28 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-09-28 11:21:32', '2012-10-08 00:00:00', 'f', '2012-09-28 11:21:32', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:21:32', '2012-09-28 11:21:32', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:21:32', '2012-09-28 11:21:32', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.1ms) 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-09-28 11:21:32', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:21:32', 50, 814558298, 1000, 'f', 0, '2012-09-23 00:00:00') Fixture Insert (0.0ms) 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-09-28 11:21:32', '2012-10-08 00:00:00', 't', '2012-09-28 11:21:32', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:21:32', '2012-10-08 00:00:00', 'f', '2012-09-28 11:21:32', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:21:32', '2012-09-28 11:21:32', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:21:32', '2012-09-28 11:21:32', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.1ms) 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-09-28 11:21:32', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:21:32', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:21:32', '2012-10-08 00:00:00', 't', '2012-09-28 11:21:32', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:21:32', '2012-10-08 00:00:00', 'f', '2012-09-28 11:21:32', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.5ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.2ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:21:32', '2012-09-28 11:21:32', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:21:32', '2012-09-28 11:21:32', 394627963, 960656439, 't', '')  (0.3ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.6ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.1ms) 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-09-28 11:21:32', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:21:32', 50, 814558298, 1000, 'f', 0, '2012-09-23 00:00:00') Fixture Insert (0.2ms) 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-09-28 11:21:32', '2012-10-08 00:00:00', 't', '2012-09-28 11:21:32', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.2ms) 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-09-28 11:21:32', '2012-10-08 00:00:00', 'f', '2012-09-28 11:21:32', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:21:32', '2012-09-28 11:21:32', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:21:32', '2012-09-28 11:21:32', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.1ms) 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-09-28 11:21:32', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:21:32', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:21:32', '2012-10-08 00:00:00', 't', '2012-09-28 11:21:32', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:21:32', '2012-10-08 00:00:00', 'f', '2012-09-28 11:21:32', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:21:32', '2012-09-28 11:21:32', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:21:32', '2012-09-28 11:21:32', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.1ms) 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-09-28 11:21:32', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:21:32', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:21:32', '2012-10-08 00:00:00', 't', '2012-09-28 11:21:32', 100, 394627963, 1000, 't', 0, '2012-09-28 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-09-28 11:21:32', '2012-10-08 00:00:00', 'f', '2012-09-28 11:21:32', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:21:32', '2012-09-28 11:21:32', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:21:32', '2012-09-28 11:21:32', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 11:22:46', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:22:46', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:22:46', '2012-10-08 00:00:00', 't', '2012-09-28 11:22:46', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:22:46', '2012-10-08 00:00:00', 'f', '2012-09-28 11:22:46', 1000, 207249520, 1000, 't', 1, '2012-09-28 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", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:22:46', '2012-09-28 11:22:46', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:22:46', '2012-09-28 11:22:46', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 11:22:46', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:22:46', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:22:46', '2012-10-08 00:00:00', 't', '2012-09-28 11:22:46', 100, 394627963, 1000, 't', 0, '2012-09-28 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-09-28 11:22:46', '2012-10-08 00:00:00', 'f', '2012-09-28 11:22:46', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:22:46', '2012-09-28 11:22:46', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:22:46', '2012-09-28 11:22:46', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 11:22:46', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:22:46', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:22:46', '2012-10-08 00:00:00', 't', '2012-09-28 11:22:46', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:22:46', '2012-10-08 00:00:00', 'f', '2012-09-28 11:22:46', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:22:46', '2012-09-28 11:22:46', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:22:46', '2012-09-28 11:22:46', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 11:22:46', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:22:46', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:22:46', '2012-10-08 00:00:00', 't', '2012-09-28 11:22:46', 100, 394627963, 1000, 't', 0, '2012-09-28 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-09-28 11:22:46', '2012-10-08 00:00:00', 'f', '2012-09-28 11:22:46', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:22:46', '2012-09-28 11:22:46', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:22:46', '2012-09-28 11:22:46', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.1ms) 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-09-28 11:22:46', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:22:46', 50, 814558298, 1000, 'f', 0, '2012-09-23 00:00:00') Fixture Insert (0.0ms) 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-09-28 11:22:46', '2012-10-08 00:00:00', 't', '2012-09-28 11:22:46', 100, 394627963, 1000, 't', 0, '2012-09-28 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-09-28 11:22:46', '2012-10-08 00:00:00', 'f', '2012-09-28 11:22:46', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:22:46', '2012-09-28 11:22:46', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:22:46', '2012-09-28 11:22:46', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 11:22:46', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:22:46', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:22:46', '2012-10-08 00:00:00', 't', '2012-09-28 11:22:46', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:22:46', '2012-10-08 00:00:00', 'f', '2012-09-28 11:22:46', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:22:46', '2012-09-28 11:22:46', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:22:46', '2012-09-28 11:22:46', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 11:22:47', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:22:47', 50, 814558298, 1000, 'f', 0, '2012-09-23 00:00:00') Fixture Insert (0.0ms) 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-09-28 11:22:47', '2012-10-08 00:00:00', 't', '2012-09-28 11:22:47', 100, 394627963, 1000, 't', 0, '2012-09-28 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-09-28 11:22:47', '2012-10-08 00:00:00', 'f', '2012-09-28 11:22:47', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:22:47', '2012-09-28 11:22:47', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:22:47', '2012-09-28 11:22:47', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 11:22:47', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:22:47', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:22:47', '2012-10-08 00:00:00', 't', '2012-09-28 11:22:47', 100, 394627963, 1000, 't', 0, '2012-09-28 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-09-28 11:22:47', '2012-10-08 00:00:00', 'f', '2012-09-28 11:22:47', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:22:47', '2012-09-28 11:22:47', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:22:47', '2012-09-28 11:22:47', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.1ms) 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-09-28 11:22:47', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:22:47', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:22:47', '2012-10-08 00:00:00', 't', '2012-09-28 11:22:47', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:22:47', '2012-10-08 00:00:00', 'f', '2012-09-28 11:22:47', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:22:47', '2012-09-28 11:22:47', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:22:47', '2012-09-28 11:22:47', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.1ms) 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-09-28 11:22:47', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:22:47', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:22:47', '2012-10-08 00:00:00', 't', '2012-09-28 11:22:47', 100, 394627963, 1000, 't', 0, '2012-09-28 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-09-28 11:22:47', '2012-10-08 00:00:00', 'f', '2012-09-28 11:22:47', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:22:47', '2012-09-28 11:22:47', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:22:47', '2012-09-28 11:22:47', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.1ms) 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-09-28 11:22:47', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:22:47', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:22:47', '2012-10-08 00:00:00', 't', '2012-09-28 11:22:47', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:22:47', '2012-10-08 00:00:00', 'f', '2012-09-28 11:22:47', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:22:47', '2012-09-28 11:22:47', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:22:47', '2012-09-28 11:22:47', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.1ms) 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-09-28 11:22:47', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:22:47', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:22:47', '2012-10-08 00:00:00', 't', '2012-09-28 11:22:47', 100, 394627963, 1000, 't', 0, '2012-09-28 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-09-28 11:22:47', '2012-10-08 00:00:00', 'f', '2012-09-28 11:22:47', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:22:47', '2012-09-28 11:22:47', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:22:47', '2012-09-28 11:22:47', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.1ms) 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-09-28 11:22:47', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:22:47', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:22:47', '2012-10-08 00:00:00', 't', '2012-09-28 11:22:47', 100, 394627963, 1000, 't', 0, '2012-09-28 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-09-28 11:22:47', '2012-10-08 00:00:00', 'f', '2012-09-28 11:22:47', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:22:47', '2012-09-28 11:22:47', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:22:47', '2012-09-28 11:22:47', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.1ms) 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-09-28 11:22:47', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:22:47', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:22:47', '2012-10-08 00:00:00', 't', '2012-09-28 11:22:47', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:22:47', '2012-10-08 00:00:00', 'f', '2012-09-28 11:22:47', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:22:47', '2012-09-28 11:22:47', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:22:47', '2012-09-28 11:22:47', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 11:22:47', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:22:47', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:22:47', '2012-10-08 00:00:00', 't', '2012-09-28 11:22:47', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:22:47', '2012-10-08 00:00:00', 'f', '2012-09-28 11:22:47', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:22:47', '2012-09-28 11:22:47', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:22:47', '2012-09-28 11:22:47', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 11:22:47', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:22:47', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:22:47', '2012-10-08 00:00:00', 't', '2012-09-28 11:22:47', 100, 394627963, 1000, 't', 0, '2012-09-28 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-09-28 11:22:47', '2012-10-08 00:00:00', 'f', '2012-09-28 11:22:47', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:22:47', '2012-09-28 11:22:47', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:22:47', '2012-09-28 11:22:47', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 11:22:47', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:22:47', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:22:47', '2012-10-08 00:00:00', 't', '2012-09-28 11:22:47', 100, 394627963, 1000, 't', 0, '2012-09-28 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-09-28 11:22:47', '2012-10-08 00:00:00', 'f', '2012-09-28 11:22:47', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:22:47', '2012-09-28 11:22:47', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:22:47', '2012-09-28 11:22:47', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.1ms) 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-09-28 11:22:47', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:22:47', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:22:47', '2012-10-08 00:00:00', 't', '2012-09-28 11:22:47', 100, 394627963, 1000, 't', 0, '2012-09-28 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-09-28 11:22:47', '2012-10-08 00:00:00', 'f', '2012-09-28 11:22:47', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:22:47', '2012-09-28 11:22:47', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:22:47', '2012-09-28 11:22:47', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.1ms) 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-09-28 11:22:47', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:22:47', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:22:47', '2012-10-08 00:00:00', 't', '2012-09-28 11:22:47', 100, 394627963, 1000, 't', 0, '2012-09-28 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-09-28 11:22:47', '2012-10-08 00:00:00', 'f', '2012-09-28 11:22:47', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:22:47', '2012-09-28 11:22:47', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:22:47', '2012-09-28 11:22:47', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.1ms) 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-09-28 11:22:47', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:22:47', 50, 814558298, 1000, 'f', 0, '2012-09-23 00:00:00') Fixture Insert (0.0ms) 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-09-28 11:22:47', '2012-10-08 00:00:00', 't', '2012-09-28 11:22:47', 100, 394627963, 1000, 't', 0, '2012-09-28 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-09-28 11:22:47', '2012-10-08 00:00:00', 'f', '2012-09-28 11:22:47', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:22:47', '2012-09-28 11:22:47', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:22:47', '2012-09-28 11:22:47', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.1ms) 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-09-28 11:22:47', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:22:47', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:22:47', '2012-10-08 00:00:00', 't', '2012-09-28 11:22:47', 100, 394627963, 1000, 't', 0, '2012-09-28 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-09-28 11:22:47', '2012-10-08 00:00:00', 'f', '2012-09-28 11:22:47', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:22:47', '2012-09-28 11:22:47', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:22:47', '2012-09-28 11:22:47', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.1ms) 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-09-28 11:22:47', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:22:47', 50, 814558298, 1000, 'f', 0, '2012-09-23 00:00:00') Fixture Insert (0.0ms) 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-09-28 11:22:47', '2012-10-08 00:00:00', 't', '2012-09-28 11:22:47', 100, 394627963, 1000, 't', 0, '2012-09-28 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-09-28 11:22:47', '2012-10-08 00:00:00', 'f', '2012-09-28 11:22:47', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:22:47', '2012-09-28 11:22:47', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:22:47', '2012-09-28 11:22:47', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.1ms) 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-09-28 11:22:47', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:22:47', 50, 814558298, 1000, 'f', 0, '2012-09-23 00:00:00') Fixture Insert (0.0ms) 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-09-28 11:22:47', '2012-10-08 00:00:00', 't', '2012-09-28 11:22:47', 100, 394627963, 1000, 't', 0, '2012-09-28 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-09-28 11:22:47', '2012-10-08 00:00:00', 'f', '2012-09-28 11:22:47', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:22:47', '2012-09-28 11:22:47', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:22:47', '2012-09-28 11:22:47', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.1ms) 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-09-28 11:22:47', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:22:47', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:22:47', '2012-10-08 00:00:00', 't', '2012-09-28 11:22:47', 100, 394627963, 1000, 't', 0, '2012-09-28 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-09-28 11:22:47', '2012-10-08 00:00:00', 'f', '2012-09-28 11:22:47', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:22:47', '2012-09-28 11:22:47', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:22:47', '2012-09-28 11:22:47', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.1ms) 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-09-28 11:22:47', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:22:47', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:22:47', '2012-10-08 00:00:00', 't', '2012-09-28 11:22:47', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:22:47', '2012-10-08 00:00:00', 'f', '2012-09-28 11:22:47', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:22:47', '2012-09-28 11:22:47', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:22:47', '2012-09-28 11:22:47', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.1ms) 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-09-28 11:22:47', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:22:47', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:22:47', '2012-10-08 00:00:00', 't', '2012-09-28 11:22:47', 100, 394627963, 1000, 't', 0, '2012-09-28 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-09-28 11:22:47', '2012-10-08 00:00:00', 'f', '2012-09-28 11:22:47', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:22:47', '2012-09-28 11:22:47', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:22:47', '2012-09-28 11:22:47', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 11:22:47', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:22:47', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:22:47', '2012-10-08 00:00:00', 't', '2012-09-28 11:22:47', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:22:47', '2012-10-08 00:00:00', 'f', '2012-09-28 11:22:47', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:22:47', '2012-09-28 11:22:47', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:22:47', '2012-09-28 11:22:47', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 11:22:47', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:22:47', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:22:47', '2012-10-08 00:00:00', 't', '2012-09-28 11:22:47', 100, 394627963, 1000, 't', 0, '2012-09-28 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-09-28 11:22:47', '2012-10-08 00:00:00', 'f', '2012-09-28 11:22:47', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:22:47', '2012-09-28 11:22:47', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:22:47', '2012-09-28 11:22:47', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.1ms) 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-09-28 11:22:47', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:22:47', 50, 814558298, 1000, 'f', 0, '2012-09-23 00:00:00') Fixture Insert (0.0ms) 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-09-28 11:22:47', '2012-10-08 00:00:00', 't', '2012-09-28 11:22:47', 100, 394627963, 1000, 't', 0, '2012-09-28 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-09-28 11:22:47', '2012-10-08 00:00:00', 'f', '2012-09-28 11:22:47', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:22:47', '2012-09-28 11:22:47', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:22:47', '2012-09-28 11:22:47', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.1ms) 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-09-28 11:22:47', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:22:47', 50, 814558298, 1000, 'f', 0, '2012-09-23 00:00:00') Fixture Insert (0.0ms) 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-09-28 11:22:47', '2012-10-08 00:00:00', 't', '2012-09-28 11:22:47', 100, 394627963, 1000, 't', 0, '2012-09-28 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-09-28 11:22:47', '2012-10-08 00:00:00', 'f', '2012-09-28 11:22:47', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:22:47', '2012-09-28 11:22:47', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:22:47', '2012-09-28 11:22:47', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.1ms) 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-09-28 11:22:47', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:22:47', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:22:47', '2012-10-08 00:00:00', 't', '2012-09-28 11:22:47', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:22:47', '2012-10-08 00:00:00', 'f', '2012-09-28 11:22:47', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:22:47', '2012-09-28 11:22:47', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:22:47', '2012-09-28 11:22:47', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.1ms) 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-09-28 11:22:47', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:22:47', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:22:47', '2012-10-08 00:00:00', 't', '2012-09-28 11:22:47', 100, 394627963, 1000, 't', 0, '2012-09-28 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-09-28 11:22:47', '2012-10-08 00:00:00', 'f', '2012-09-28 11:22:47', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:22:47', '2012-09-28 11:22:47', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:22:47', '2012-09-28 11:22:47', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 11:22:47', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:22:47', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:22:47', '2012-10-08 00:00:00', 't', '2012-09-28 11:22:47', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:22:47', '2012-10-08 00:00:00', 'f', '2012-09-28 11:22:47', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:22:47', '2012-09-28 11:22:47', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:22:47', '2012-09-28 11:22:47', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.1ms) 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-09-28 11:22:47', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:22:47', 50, 814558298, 1000, 'f', 0, '2012-09-23 00:00:00') Fixture Insert (0.0ms) 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-09-28 11:22:47', '2012-10-08 00:00:00', 't', '2012-09-28 11:22:47', 100, 394627963, 1000, 't', 0, '2012-09-28 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-09-28 11:22:47', '2012-10-08 00:00:00', 'f', '2012-09-28 11:22:47', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:22:47', '2012-09-28 11:22:47', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:22:47', '2012-09-28 11:22:47', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.1ms) 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-09-28 11:22:47', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:22:47', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:22:47', '2012-10-08 00:00:00', 't', '2012-09-28 11:22:47', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:22:47', '2012-10-08 00:00:00', 'f', '2012-09-28 11:22:47', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:22:47', '2012-09-28 11:22:47', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:22:47', '2012-09-28 11:22:47', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.3ms) 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-09-28 11:22:47', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:22:47', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:22:47', '2012-10-08 00:00:00', 't', '2012-09-28 11:22:47', 100, 394627963, 1000, 't', 0, '2012-09-28 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-09-28 11:22:47', '2012-10-08 00:00:00', 'f', '2012-09-28 11:22:47', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:22:47', '2012-09-28 11:22:47', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:22:47', '2012-09-28 11:22:47', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.1ms) 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-09-28 11:22:47', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:22:47', 50, 814558298, 1000, 'f', 0, '2012-09-23 00:00:00') Fixture Insert (0.0ms) 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-09-28 11:22:47', '2012-10-08 00:00:00', 't', '2012-09-28 11:22:47', 100, 394627963, 1000, 't', 0, '2012-09-28 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-09-28 11:22:47', '2012-10-08 00:00:00', 'f', '2012-09-28 11:22:47', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:22:47', '2012-09-28 11:22:47', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:22:47', '2012-09-28 11:22:47', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.1ms) 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-09-28 11:22:47', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:22:47', 50, 814558298, 1000, 'f', 0, '2012-09-23 00:00:00') Fixture Insert (0.0ms) 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-09-28 11:22:47', '2012-10-08 00:00:00', 't', '2012-09-28 11:22:47', 100, 394627963, 1000, 't', 0, '2012-09-28 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-09-28 11:22:47', '2012-10-08 00:00:00', 'f', '2012-09-28 11:22:47', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:22:47', '2012-09-28 11:22:47', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:22:47', '2012-09-28 11:22:47', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.1ms) 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-09-28 11:22:47', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:22:47', 50, 814558298, 1000, 'f', 0, '2012-09-23 00:00:00') Fixture Insert (0.0ms) 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-09-28 11:22:47', '2012-10-08 00:00:00', 't', '2012-09-28 11:22:47', 100, 394627963, 1000, 't', 0, '2012-09-28 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-09-28 11:22:47', '2012-10-08 00:00:00', 'f', '2012-09-28 11:22:47', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.1ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:22:47', '2012-09-28 11:22:47', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:22:47', '2012-09-28 11:22:47', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.5ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.4ms) 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-09-28 11:23:14', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:23:14', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:23:14', '2012-10-08 00:00:00', 't', '2012-09-28 11:23:14', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:23:14', '2012-10-08 00:00:00', 'f', '2012-09-28 11:23:14', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.3ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:23:14', '2012-09-28 11:23:14', 394627963, 960656439, 't', '') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES (1, 'banner_leaderboard', '2012-09-28 11:23:14', '2012-09-28 11:23:14', 814558298, 929640376, 't', '') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_parade', 1, '2012-09-28 11:23:14', '2012-09-28 11:23:14', 207249520, 281932184, 't', '') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('request_params_include?', '2012-09-28 11:23:14', '2012-09-28 11:23:14', 394627963, 435138789, 'f', '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-09-28 11:23:14', '2012-09-28 11:23:14', '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-09-28 11:23:14', '2012-09-28 11:23:14', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-28 11:23:14', '2012-09-28 11:23:14', 'parade', 405688915)  (287.4ms) commit transaction  (0.0ms) 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.1ms) 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) 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-09-28 09:00:00.000073' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-28 09:00:00.001712' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.001861' 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-09-28 09:00:00.002834' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-09-28 09:00:00.003649' OR end_time IS NULL) AND (start_time < '2011-09-28 10:00:00.003836' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count)  (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) 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.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.4ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.002014', "running_view_count" = 0 WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position SQLite3::SQLException: no such column: advert_selector_helper_items.master_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.1ms) ROLLBACK TO SAVEPOINT active_record_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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]]  (0.1ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.002154', "running_view_count" = 0, "target_view_count" = 10 WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position SQLite3::SQLException: no such column: advert_selector_helper_items.master_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.1ms) ROLLBACK TO 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 "updated_at" = '2012-09-28 09:00:00.000426', "confirmed" = 'f' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position SQLite3::SQLException: no such column: advert_selector_helper_items.master_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) ROLLBACK TO 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.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.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.000940', "target_view_count" = 100, "end_time" = '2012-10-08 00:00:00.000000', "start_time" = '2012-09-27 21:00:00.000000' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position SQLite3::SQLException: no such column: advert_selector_helper_items.master_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) ROLLBACK TO 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.1ms) SELECT COUNT(*) FROM "advert_selector_banners" Processing by AdvertSelector::BannersController#create as HTML Parameters: {"banner"=>{"comment"=>"Pepsi banner", "name"=>"Pepsi", "end_time"=>"2012-10-08 00:00:00 UTC", "placement_id"=>"405688915", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-09-28 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["end_time", Mon, 08 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", Fri, 28 Sep 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Fri, 28 Sep 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"."master_id" = 814558299 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position SQLite3::SQLException: no such column: advert_selector_helper_items.master_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558299 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 500 Internal Server Error in 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.1ms) 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"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position SQLite3::SQLException: no such column: advert_selector_helper_items.master_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 500 Internal Server Error in 2ms  (0.1ms) rollback transaction  (0.1ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", "394627963"]] AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/banners/_form.html.erb (37.5ms) Completed 500 Internal Server Error in 45ms  (0.1ms) rollback transaction  (0.1ms) 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.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]] Processing by AdvertSelector::BannersController#index as HTML AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners"  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" 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 Completed 200 OK in 97ms (Views: 95.4ms | ActiveRecord: 0.7ms)  (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.1ms) 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 (11.7ms) Completed 500 Internal Server Error in 13ms  (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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", "394627963"]]  (0.1ms) SAVEPOINT active_record_1 AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position SQLite3::SQLException: no such column: advert_selector_helper_items.master_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 394627963 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 500 Internal Server Error in 4ms  (0.1ms) rollback transaction  (0.1ms) 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.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]] Processing by AdvertSelector::MainController#clear_errors_log as HTML Redirected to http://test.host/advert_selector/ Completed 302 Found in 2ms (ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) 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.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]] Processing by AdvertSelector::MainController#index as HTML AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 9ms (Views: 8.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.1ms) 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.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items"   (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.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.3ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = 'not_found,video', "updated_at" = '2012-09-28 09:00:00.001694' WHERE "advert_selector_placements"."id" = 718799085 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position SQLite3::SQLException: no such column: advert_selector_helper_items.master_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) ROLLBACK TO 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]] 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.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.1ms) rollback transaction  (0.1ms) 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.1ms) 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 1019730478 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position SQLite3::SQLException: no such column: advert_selector_helper_items.master_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 1019730478 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 500 Internal Server Error in 3ms  (0.1ms) rollback transaction  (0.1ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) 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", 405688915]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_placements" Processing by AdvertSelector::PlacementsController#destroy as HTML Parameters: {"id"=>"405688915"} AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", "405688915"]]  (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"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position SQLite3::SQLException: no such column: advert_selector_helper_items.master_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 500 Internal Server Error in 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.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]] 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.1ms) 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 (7.7ms) Completed 500 Internal Server Error in 11ms  (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.1ms) 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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 12ms (Views: 10.4ms | 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#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 (5.9ms) Completed 500 Internal Server Error in 7ms  (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.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", "405688915"]]  (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"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position SQLite3::SQLException: no such column: advert_selector_helper_items.master_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 500 Internal Server Error in 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.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.1ms) 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-09-28 09:00:00.000572' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position SQLite3::SQLException: no such column: advert_selector_helper_items.master_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) ROLLBACK TO 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.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-28 09:00:00.000410' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position SQLite3::SQLException: no such column: advert_selector_helper_items.master_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) 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-09-28 09:00:00.000419' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position SQLite3::SQLException: no such column: advert_selector_helper_items.master_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.0ms) ROLLBACK TO 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.4ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-28 09:00:00.000554' WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position SQLite3::SQLException: no such column: advert_selector_helper_items.master_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]]  (0.1ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-28 09:00:00.000716' WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position SQLite3::SQLException: no such column: advert_selector_helper_items.master_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]]  (0.1ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-28 09:00:00.000658' WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position SQLite3::SQLException: no such column: advert_selector_helper_items.master_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.1ms) ROLLBACK TO SAVEPOINT active_record_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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]]  (0.1ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-28 09:00:00.000753' 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"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position SQLite3::SQLException: no such column: advert_selector_helper_items.master_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.1ms) ROLLBACK TO SAVEPOINT active_record_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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]]  (0.1ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-28 09:00:00.000644' WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position SQLite3::SQLException: no such column: advert_selector_helper_items.master_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 814558298 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Banner' ORDER BY position  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) 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-09-28 09:00:00.003808' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.004021' 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.3ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" IN ('718799085', '405688915') ORDER BY position [AdvertSelector] SQLite3::SQLException: no such column: advert_selector_helper_items.master_type: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" IN ('718799085', '405688915') ORDER BY position Completed 500 Internal Server Error in 12ms  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.3ms) 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-09-28 11:24:05', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:24:05', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:24:05', '2012-10-08 00:00:00', 't', '2012-09-28 11:24:05', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:24:05', '2012-10-08 00:00:00', 'f', '2012-09-28 11:24:05', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.3ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:24:05', '2012-09-28 11:24:05', 394627963, 960656439, 't', '') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES (1, 'banner_leaderboard', '2012-09-28 11:24:05', '2012-09-28 11:24:05', 814558298, 929640376, 't', '') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_parade', 1, '2012-09-28 11:24:05', '2012-09-28 11:24:05', 207249520, 281932184, 't', '') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('request_params_include?', '2012-09-28 11:24:05', '2012-09-28 11:24:05', 394627963, 435138789, 'f', 'pepsi=true') Fixture Delete (0.2ms) DELETE FROM "advert_selector_placements" Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Parade', '2012-09-28 11:24:05', '2012-09-28 11:24:05', '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-09-28 11:24:05', '2012-09-28 11:24:05', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-28 11:24:05', '2012-09-28 11:24:05', 'parade', 405688915)  (32.9ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.3ms) 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.1ms) 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) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]]  (0.2ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-28 09:00:00.000122' OR end_time IS NULL)  (0.2ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-28 09:00:00.002794' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.003058' 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-09-28 09:00:00.005346' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-09-28 09:00:00.006812' OR end_time IS NULL) AND (start_time < '2011-09-28 10:00:00.007021' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count)  (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.1ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]]  (0.1ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_banners" SET "running_view_count" = 0, "updated_at" = '2012-09-28 09:00:00.002548' WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 ORDER BY position SQLite3::SQLException: no such column: advert_selector_helper_items.banner_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 ORDER BY position  (0.1ms) ROLLBACK TO 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 "running_view_count" = 0, "updated_at" = '2012-09-28 09:00:00.001297', "target_view_count" = 10 WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 ORDER BY position SQLite3::SQLException: no such column: advert_selector_helper_items.banner_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 ORDER BY position  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]]  (0.0ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_banners" SET "confirmed" = 'f', "updated_at" = '2012-09-28 09:00:00.000602' WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 ORDER BY position SQLite3::SQLException: no such column: advert_selector_helper_items.banner_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 ORDER BY position  (0.1ms) ROLLBACK TO 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.4ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.000949', "target_view_count" = 100, "end_time" = '2012-10-08 00:00:00.000000', "start_time" = '2012-09-27 21:00:00.000000' 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 SQLite3::SQLException: no such column: advert_selector_helper_items.banner_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 ORDER BY position  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) 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", "end_time"=>"2012-10-08 00:00:00 UTC", "placement_id"=>"405688915", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-09-28 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["end_time", Mon, 08 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", Fri, 28 Sep 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Fri, 28 Sep 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 SQLite3::SQLException: no such column: advert_selector_helper_items.banner_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558299 ORDER BY position  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 500 Internal Server Error in 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.1ms) 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 SQLite3::SQLException: no such column: advert_selector_helper_items.banner_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 394627963 ORDER BY position  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 500 Internal Server Error in 2ms  (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]] 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"  Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/banners/_form.html.erb (34.3ms) Completed 500 Internal Server Error in 42ms  (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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 93ms (Views: 91.9ms | ActiveRecord: 0.7ms)  (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 (10.9ms) Completed 500 Internal Server Error in 12ms  (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 0ms (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.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 SQLite3::SQLException: no such column: advert_selector_helper_items.banner_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 394627963 ORDER BY position  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 500 Internal Server Error in 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]] 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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 9ms (Views: 7.9ms | 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.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 718799085]] AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items"   (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.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.3ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-09-28 09:00:00.001687', "conflicting_placements_array" = 'not_found,video' WHERE "advert_selector_placements"."id" = 718799085 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position SQLite3::SQLException: no such column: advert_selector_helper_items.master_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) ROLLBACK TO 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]] 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.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.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", 405688915]]  (0.1ms) 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.6ms) INSERT INTO "advert_selector_placements" ("conflicting_placements_array", "created_at", "name", "only_once_per_session", "updated_at") VALUES (?, ?, ?, ?, ?) [["conflicting_placements_array", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Fri, 28 Sep 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"."master_id" = 1019730478 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position SQLite3::SQLException: no such column: advert_selector_helper_items.master_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 1019730478 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 500 Internal Server Error in 3ms  (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.1ms) SELECT COUNT(*) FROM "advert_selector_placements" Processing by AdvertSelector::PlacementsController#destroy as HTML Parameters: {"id"=>"405688915"} AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", "405688915"]]  (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"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position SQLite3::SQLException: no such column: advert_selector_helper_items.master_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 500 Internal Server Error in 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]] 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 (7.6ms) Completed 500 Internal Server Error in 10ms  (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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 11ms (Views: 9.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#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 (5.0ms) Completed 500 Internal Server Error in 7ms  (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 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position SQLite3::SQLException: no such column: advert_selector_helper_items.master_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 500 Internal Server Error in 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.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 "updated_at" = '2012-09-28 09:00:00.000428', "fast_mode" = 't' 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 SQLite3::SQLException: no such column: advert_selector_helper_items.banner_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 ORDER BY position  (0.0ms) ROLLBACK TO 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 "updated_at" = '2012-09-28 09:00:00.000412', "fast_mode" = 't' WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 ORDER BY position SQLite3::SQLException: no such column: advert_selector_helper_items.banner_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 ORDER BY position  (0.0ms) ROLLBACK TO 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 "updated_at" = '2012-09-28 09:00:00.000411', "fast_mode" = 't' 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 SQLite3::SQLException: no such column: advert_selector_helper_items.banner_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 ORDER BY position  (0.0ms) ROLLBACK TO 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 "updated_at" = '2012-09-28 09:00:00.000406', "fast_mode" = 't' 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 SQLite3::SQLException: no such column: advert_selector_helper_items.banner_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 ORDER BY position  (0.0ms) ROLLBACK TO 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.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.000391', "fast_mode" = 't' 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 SQLite3::SQLException: no such column: advert_selector_helper_items.banner_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 ORDER BY position  (0.0ms) ROLLBACK TO 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.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.000396', "fast_mode" = 't' 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 SQLite3::SQLException: no such column: advert_selector_helper_items.banner_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 ORDER BY position  (0.0ms) ROLLBACK TO 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.1ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.000492', "fast_mode" = 't' 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 SQLite3::SQLException: no such column: advert_selector_helper_items.banner_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 ORDER BY position  (0.0ms) ROLLBACK TO 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 "updated_at" = '2012-09-28 09:00:00.000412', "fast_mode" = 't' 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 SQLite3::SQLException: no such column: advert_selector_helper_items.banner_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 ORDER BY position  (0.0ms) ROLLBACK TO 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]] 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-09-28 09:00:00.003646' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.003844' 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"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" IN ('718799085', '405688915') ORDER BY position [AdvertSelector] SQLite3::SQLException: no such column: advert_selector_helper_items.master_type: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' AND "advert_selector_helper_items"."master_id" IN ('718799085', '405688915') ORDER BY position Completed 500 Internal Server Error in 8ms  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 11:24:39', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:24:39', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:24:39', '2012-10-08 00:00:00', 't', '2012-09-28 11:24:39', 100, 394627963, 1000, 't', 0, '2012-09-28 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-09-28 11:24:39', '2012-10-08 00:00:00', 'f', '2012-09-28 11:24:39', 1000, 207249520, 1000, 't', 1, '2012-09-28 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", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:24:39', '2012-09-28 11:24:39', 394627963, 960656439, 't', '') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES (1, 'banner_leaderboard', '2012-09-28 11:24:39', '2012-09-28 11:24:39', 814558298, 929640376, 't', '') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_parade', 1, '2012-09-28 11:24:39', '2012-09-28 11:24:39', 207249520, 281932184, 't', '') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('request_params_include?', '2012-09-28 11:24:39', '2012-09-28 11:24:39', 394627963, 435138789, 'f', '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-09-28 11:24:39', '2012-09-28 11:24:39', '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-09-28 11:24:39', '2012-09-28 11:24:39', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-28 11:24:39', '2012-09-28 11:24:39', 'parade', 405688915)  (44.6ms) 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) 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-09-28 09:00:00.000067' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-28 09:00:00.001563' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.001697' 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-09-28 09:00:00.002615' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-09-28 09:00:00.003294' OR end_time IS NULL) AND (start_time < '2011-09-28 10:00:00.003400' 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.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.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.001259', "running_view_count" = 0 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 SQLite3::SQLException: no such column: advert_selector_helper_items.banner_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 ORDER BY position  (0.0ms) ROLLBACK TO 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.2ms) UPDATE "advert_selector_banners" SET "target_view_count" = 10, "updated_at" = '2012-09-28 09:00:00.001050', "running_view_count" = 0 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 SQLite3::SQLException: no such column: advert_selector_helper_items.banner_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 ORDER BY position  (0.0ms) ROLLBACK TO 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.4ms) UPDATE "advert_selector_banners" SET "confirmed" = 'f', "updated_at" = '2012-09-28 09:00:00.000402' WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 ORDER BY position SQLite3::SQLException: no such column: advert_selector_helper_items.banner_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 ORDER BY position  (0.1ms) ROLLBACK TO 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 "target_view_count" = 100, "end_time" = '2012-10-08 00:00:00.000000', "updated_at" = '2012-09-28 09:00:00.000825', "start_time" = '2012-09-27 21:00:00.000000' 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 SQLite3::SQLException: no such column: advert_selector_helper_items.banner_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 ORDER BY position  (0.0ms) ROLLBACK TO 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.1ms) SELECT COUNT(*) FROM "advert_selector_banners" Processing by AdvertSelector::BannersController#create as HTML Parameters: {"banner"=>{"comment"=>"Pepsi banner", "name"=>"Pepsi", "end_time"=>"2012-10-08 00:00:00 UTC", "placement_id"=>"405688915", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-09-28 00:00:00 UTC"}}  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["end_time", Mon, 08 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", Fri, 28 Sep 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Fri, 28 Sep 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 SQLite3::SQLException: no such column: advert_selector_helper_items.banner_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558299 ORDER BY position  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 500 Internal Server Error in 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) 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 SQLite3::SQLException: no such column: advert_selector_helper_items.banner_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 394627963 ORDER BY position  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 500 Internal Server Error in 2ms  (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]] 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"  Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/banners/_form.html.erb (33.1ms) Completed 500 Internal Server Error in 41ms  (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.1ms) 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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 91ms (Views: 89.5ms | 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) 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.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/banners/_form.html.erb (15.4ms) Completed 500 Internal Server Error in 18ms  (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.1ms) 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.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 SQLite3::SQLException: no such column: advert_selector_helper_items.banner_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 394627963 ORDER BY position  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 500 Internal Server Error in 2ms  (0.1ms) rollback transaction  (0.1ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) 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::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 10ms (Views: 9.7ms | 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.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 718799085]] AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items"   (0.1ms) rollback transaction  (0.1ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) 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.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.1ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-09-28 09:00:00.002613', "conflicting_placements_array" = 'not_found,video' WHERE "advert_selector_placements"."id" = 718799085 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position SQLite3::SQLException: no such column: advert_selector_helper_items.master_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) ROLLBACK TO 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]] 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.1ms) 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.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]] 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.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]] 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.1ms) 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.1ms) SELECT COUNT(*) FROM "advert_selector_placements"  Processing by AdvertSelector::PlacementsController#create as HTML Parameters: {"placement"=>{"name"=>"new placement"}}  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "advert_selector_placements" ("conflicting_placements_array", "created_at", "name", "only_once_per_session", "updated_at") VALUES (?, ?, ?, ?, ?) [["conflicting_placements_array", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Fri, 28 Sep 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"."master_id" = 1019730478 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position SQLite3::SQLException: no such column: advert_selector_helper_items.master_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 1019730478 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 500 Internal Server Error in 4ms  (0.2ms) rollback transaction  (0.1ms) 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", 405688915]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_placements" Processing by AdvertSelector::PlacementsController#destroy as HTML Parameters: {"id"=>"405688915"} AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", "405688915"]]  (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"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position SQLite3::SQLException: no such column: advert_selector_helper_items.master_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 500 Internal Server Error in 2ms  (0.1ms) rollback transaction  (0.1ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) 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", 405688915]] Processing by AdvertSelector::PlacementsController#edit as HTML Parameters: {"id"=>"405688915"} AdvertSelector::Placement Load (0.1ms) 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 (9.2ms) Completed 500 Internal Server Error in 13ms  (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.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]] 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::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 13ms (Views: 11.9ms | 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.1ms) 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 (5.3ms) Completed 500 Internal Server Error in 7ms  (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", 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.1ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) 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", 405688915]] Processing by AdvertSelector::PlacementsController#update as HTML Parameters: {"id"=>"405688915", "placement"=>{"name"=>"Leaderboard"}} AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", "405688915"]]  (0.0ms) SAVEPOINT active_record_1 AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position SQLite3::SQLException: no such column: advert_selector_helper_items.master_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 500 Internal Server Error in 3ms  (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) rollback transaction  (0.1ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]]  (0.1ms) SAVEPOINT active_record_1  (0.5ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-28 09:00:00.000763' WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 ORDER BY position SQLite3::SQLException: no such column: advert_selector_helper_items.banner_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 ORDER BY position  (0.1ms) ROLLBACK TO 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 "fast_mode" = 't', "updated_at" = '2012-09-28 09:00:00.000433' 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 SQLite3::SQLException: no such column: advert_selector_helper_items.banner_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 ORDER BY position  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) 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.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-09-28 09:00:00.000588' 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 SQLite3::SQLException: no such column: advert_selector_helper_items.banner_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 ORDER BY position  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) 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.1ms) 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-09-28 09:00:00.000455' 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 SQLite3::SQLException: no such column: advert_selector_helper_items.banner_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 ORDER BY position  (0.0ms) ROLLBACK TO 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.4ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-28 09:00:00.000494' WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 ORDER BY position SQLite3::SQLException: no such column: advert_selector_helper_items.banner_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 ORDER BY position  (0.1ms) ROLLBACK TO 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.4ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-28 09:00:00.000507' 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 SQLite3::SQLException: no such column: advert_selector_helper_items.banner_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 ORDER BY position  (0.1ms) ROLLBACK TO SAVEPOINT active_record_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.0ms) SAVEPOINT active_record_1  (0.6ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-28 09:00:00.000479' 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 SQLite3::SQLException: no such column: advert_selector_helper_items.banner_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 ORDER BY position  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) 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-09-28 09:00:00.000425' 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 SQLite3::SQLException: no such column: advert_selector_helper_items.banner_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 ORDER BY position  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) 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-09-28 09:00:00.004886' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.005119' 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] SQLite3::SQLException: no such column: advert_selector_helper_items.banner_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" IN ('207249520', '394627963', '814558298') ORDER BY position Completed 500 Internal Server Error in 10ms  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 11:25:23', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:25:23', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:25:23', '2012-10-08 00:00:00', 't', '2012-09-28 11:25:23', 100, 394627963, 1000, 't', 0, '2012-09-28 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-09-28 11:25:23', '2012-10-08 00:00:00', 'f', '2012-09-28 11:25:23', 1000, 207249520, 1000, 't', 1, '2012-09-28 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", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:25:23', '2012-09-28 11:25:23', 394627963, 960656439, 't', '') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES (1, 'banner_leaderboard', '2012-09-28 11:25:23', '2012-09-28 11:25:23', 814558298, 929640376, 't', '') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_parade', 1, '2012-09-28 11:25:23', '2012-09-28 11:25:23', 207249520, 281932184, 't', '') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('request_params_include?', '2012-09-28 11:25:23', '2012-09-28 11:25:23', 394627963, 435138789, 'f', '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-09-28 11:25:23', '2012-09-28 11:25:23', '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-09-28 11:25:23', '2012-09-28 11:25:23', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-28 11:25:23', '2012-09-28 11:25:23', 'parade', 405688915)  (40.1ms) commit transaction  (0.0ms) 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) SELECT COUNT(*) FROM "advert_selector_helper_items"  (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-09-28 09:00:00.000070' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-28 09:00:00.001525' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.001659' 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-09-28 09:00:00.002589' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-09-28 09:00:00.003319' OR end_time IS NULL) AND (start_time < '2011-09-28 10:00:00.003443' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count)  (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) 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-09-28 09:00:00.001424' 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 SQLite3::SQLException: no such column: advert_selector_helper_items.banner_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 ORDER BY position  (0.1ms) ROLLBACK TO 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 "running_view_count" = 0, "updated_at" = '2012-09-28 09:00:00.000993', "target_view_count" = 10 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 SQLite3::SQLException: no such column: advert_selector_helper_items.banner_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 ORDER BY position  (0.0ms) ROLLBACK TO 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 "confirmed" = 'f', "updated_at" = '2012-09-28 09:00:00.000413' 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 SQLite3::SQLException: no such column: advert_selector_helper_items.banner_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 ORDER BY position  (0.0ms) ROLLBACK TO 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.4ms) UPDATE "advert_selector_banners" SET "end_time" = '2012-10-08 00:00:00.000000', "start_time" = '2012-09-27 21:00:00.000000', "updated_at" = '2012-09-28 09:00:00.000873', "target_view_count" = 100 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 SQLite3::SQLException: no such column: advert_selector_helper_items.banner_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 ORDER BY position  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) 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", "end_time"=>"2012-10-08 00:00:00 UTC", "placement_id"=>"405688915", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-09-28 00:00:00 UTC"}}  (0.1ms) SAVEPOINT active_record_1 SQL (0.9ms) 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["end_time", Mon, 08 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", Fri, 28 Sep 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Fri, 28 Sep 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 SQLite3::SQLException: no such column: advert_selector_helper_items.banner_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558299 ORDER BY position  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 500 Internal Server Error in 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]]  (0.1ms) 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 SQLite3::SQLException: no such column: advert_selector_helper_items.banner_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 394627963 ORDER BY position  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 500 Internal Server Error in 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]] Processing by AdvertSelector::BannersController#edit 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"]] 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 (36.7ms) Completed 500 Internal Server Error in 45ms  (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::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" 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 Completed 200 OK in 101ms (Views: 99.4ms | 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#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 (10.8ms) Completed 500 Internal Server Error in 12ms  (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 0ms (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.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 SQLite3::SQLException: no such column: advert_selector_helper_items.banner_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 394627963 ORDER BY position  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 500 Internal Server Error in 2ms  (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]] 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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 8ms (Views: 7.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]] 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.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items"   (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.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-09-28 09:00:00.001606', "conflicting_placements_array" = 'not_found,video' WHERE "advert_selector_placements"."id" = 718799085 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position SQLite3::SQLException: no such column: advert_selector_helper_items.master_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) ROLLBACK TO 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.1ms) 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.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.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.1ms) 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.5ms) INSERT INTO "advert_selector_placements" ("conflicting_placements_array", "created_at", "name", "only_once_per_session", "updated_at") VALUES (?, ?, ?, ?, ?) [["conflicting_placements_array", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Fri, 28 Sep 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"."master_id" = 1019730478 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position SQLite3::SQLException: no such column: advert_selector_helper_items.master_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 1019730478 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 500 Internal Server Error in 3ms  (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.1ms) 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 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position SQLite3::SQLException: no such column: advert_selector_helper_items.master_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 500 Internal Server Error in 2ms  (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]] 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 (7.1ms) Completed 500 Internal Server Error in 10ms  (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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 10ms (Views: 8.9ms | 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.9ms) Completed 500 Internal Server Error in 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.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]] 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 0ms (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.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", "405688915"]]  (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"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position SQLite3::SQLException: no such column: advert_selector_helper_items.master_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 500 Internal Server Error in 2ms  (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) 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-09-28 09:00:00.000407' 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 SQLite3::SQLException: no such column: advert_selector_helper_items.banner_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 ORDER BY position  (0.0ms) ROLLBACK TO 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.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-28 09:00:00.000388' 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 SQLite3::SQLException: no such column: advert_selector_helper_items.banner_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 ORDER BY position  (0.0ms) ROLLBACK TO SAVEPOINT active_record_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.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]]  (0.1ms) SAVEPOINT active_record_1  (0.8ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-28 09:00:00.001291' WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.3ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 ORDER BY position SQLite3::SQLException: no such column: advert_selector_helper_items.banner_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 ORDER BY position  (0.0ms) ROLLBACK TO 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 "fast_mode" = 't', "updated_at" = '2012-09-28 09:00:00.000398' 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 SQLite3::SQLException: no such column: advert_selector_helper_items.banner_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 ORDER BY position  (0.0ms) ROLLBACK TO 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 "fast_mode" = 't', "updated_at" = '2012-09-28 09:00:00.000396' 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 SQLite3::SQLException: no such column: advert_selector_helper_items.banner_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 ORDER BY position  (0.0ms) ROLLBACK TO 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 "fast_mode" = 't', "updated_at" = '2012-09-28 09:00:00.000389' 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 SQLite3::SQLException: no such column: advert_selector_helper_items.banner_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 ORDER BY position  (0.0ms) ROLLBACK TO 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 "fast_mode" = 't', "updated_at" = '2012-09-28 09:00:00.000392' 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 SQLite3::SQLException: no such column: advert_selector_helper_items.banner_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 ORDER BY position  (0.0ms) ROLLBACK TO 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 "fast_mode" = 't', "updated_at" = '2012-09-28 09:00:00.000394' 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 SQLite3::SQLException: no such column: advert_selector_helper_items.banner_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 ORDER BY position  (0.0ms) ROLLBACK TO 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]] 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-09-28 09:00:00.003604' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.003795' 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] SQLite3::SQLException: no such column: advert_selector_helper_items.banner_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" IN ('207249520', '394627963', '814558298') ORDER BY position Completed 500 Internal Server Error in 7ms  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 11:26:13', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:26:13', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:26:13', '2012-10-08 00:00:00', 't', '2012-09-28 11:26:13', 100, 394627963, 1000, 't', 0, '2012-09-28 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-09-28 11:26:13', '2012-10-08 00:00:00', 'f', '2012-09-28 11:26:13', 1000, 207249520, 1000, 't', 1, '2012-09-28 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", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:26:13', '2012-09-28 11:26:13', 394627963, 960656439, 't', '') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES (1, 'banner_leaderboard', '2012-09-28 11:26:13', '2012-09-28 11:26:13', 814558298, 929640376, 't', '') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_parade', 1, '2012-09-28 11:26:13', '2012-09-28 11:26:13', 207249520, 281932184, 't', '') Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('request_params_include?', '2012-09-28 11:26:13', '2012-09-28 11:26:13', 394627963, 435138789, 'f', 'pepsi=true') Fixture Delete (0.2ms) DELETE FROM "advert_selector_placements" Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Parade', '2012-09-28 11:26:13', '2012-09-28 11:26:13', 'leaderboard,video', 718799085) Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "only_once_per_session", "id") VALUES ('Video', '2012-09-28 11:26:13', '2012-09-28 11:26:13', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-28 11:26:13', '2012-09-28 11:26:13', 'parade', 405688915)  (398.9ms) commit transaction  (0.2ms) 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) 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-09-28 09:00:00.000091' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-28 09:00:00.001834' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.001990' 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-09-28 09:00:00.002992' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-09-28 09:00:00.003787' OR end_time IS NULL) AND (start_time < '2011-09-28 10:00:00.003909' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count)  (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) 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-09-28 09:00:00.001375' 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 SQLite3::SQLException: no such column: advert_selector_helper_items.banner_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 ORDER BY position  (0.0ms) ROLLBACK TO 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 "running_view_count" = 0, "target_view_count" = 10, "updated_at" = '2012-09-28 09:00:00.000990' 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 SQLite3::SQLException: no such column: advert_selector_helper_items.banner_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 ORDER BY position  (0.0ms) ROLLBACK TO 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 "updated_at" = '2012-09-28 09:00:00.000401', "confirmed" = 'f' 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 SQLite3::SQLException: no such column: advert_selector_helper_items.banner_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 ORDER BY position  (0.0ms) ROLLBACK TO 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-09-27 21:00:00.000000', "target_view_count" = 100, "end_time" = '2012-10-08 00:00:00.000000', "updated_at" = '2012-09-28 09:00:00.000907' 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 SQLite3::SQLException: no such column: advert_selector_helper_items.banner_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 ORDER BY position  (0.0ms) ROLLBACK TO 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.1ms) SELECT COUNT(*) FROM "advert_selector_banners" Processing by AdvertSelector::BannersController#create as HTML Parameters: {"banner"=>{"comment"=>"Pepsi banner", "name"=>"Pepsi", "end_time"=>"2012-10-08 00:00:00 UTC", "placement_id"=>"405688915", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-09-28 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["end_time", Mon, 08 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", Fri, 28 Sep 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Fri, 28 Sep 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 SQLite3::SQLException: no such column: advert_selector_helper_items.banner_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558299 ORDER BY position  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 500 Internal Server Error in 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.1ms) 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 SQLite3::SQLException: no such column: advert_selector_helper_items.banner_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 394627963 ORDER BY position  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 500 Internal Server Error in 2ms  (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]] Processing by AdvertSelector::BannersController#edit 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"]] 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 (34.8ms) Completed 500 Internal Server Error in 44ms  (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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 94ms (Views: 92.8ms | ActiveRecord: 0.7ms)  (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 (10.9ms) Completed 500 Internal Server Error in 12ms  (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 0ms (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.4ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 394627963 ORDER BY position SQLite3::SQLException: no such column: advert_selector_helper_items.banner_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 394627963 ORDER BY position  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 500 Internal Server Error in 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]] 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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 8ms (Views: 7.6ms | 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.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items"   (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.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.3ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-09-28 09:00:00.001648', "conflicting_placements_array" = 'not_found,video' WHERE "advert_selector_placements"."id" = 718799085 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position SQLite3::SQLException: no such column: advert_selector_helper_items.master_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) ROLLBACK TO 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]] 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.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.1ms) 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.5ms) INSERT INTO "advert_selector_placements" ("conflicting_placements_array", "created_at", "name", "only_once_per_session", "updated_at") VALUES (?, ?, ?, ?, ?) [["conflicting_placements_array", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Fri, 28 Sep 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"."master_id" = 1019730478 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position SQLite3::SQLException: no such column: advert_selector_helper_items.master_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 1019730478 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 500 Internal Server Error in 3ms  (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.1ms) SELECT COUNT(*) FROM "advert_selector_placements" Processing by AdvertSelector::PlacementsController#destroy as HTML Parameters: {"id"=>"405688915"} AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", "405688915"]]  (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"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position SQLite3::SQLException: no such column: advert_selector_helper_items.master_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 500 Internal Server Error in 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]] 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.1ms) 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 (7.8ms) Completed 500 Internal Server Error in 11ms  (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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 12ms (Views: 10.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#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 (5.5ms) Completed 500 Internal Server Error in 7ms  (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.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]] 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.1ms) 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", 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 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position SQLite3::SQLException: no such column: advert_selector_helper_items.master_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 500 Internal Server Error in 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.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-09-28 09:00:00.000552' 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 SQLite3::SQLException: no such column: advert_selector_helper_items.banner_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 ORDER BY position  (0.0ms) ROLLBACK TO 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.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-28 09:00:00.000392' 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 SQLite3::SQLException: no such column: advert_selector_helper_items.banner_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 ORDER BY position  (0.0ms) ROLLBACK TO 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.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-28 09:00:00.000387' 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 SQLite3::SQLException: no such column: advert_selector_helper_items.banner_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 ORDER BY position  (0.0ms) ROLLBACK TO 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.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.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-28 09:00:00.000409' 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 SQLite3::SQLException: no such column: advert_selector_helper_items.banner_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 ORDER BY position  (0.0ms) ROLLBACK TO 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 "fast_mode" = 't', "updated_at" = '2012-09-28 09:00:00.000510' 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 SQLite3::SQLException: no such column: advert_selector_helper_items.banner_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 ORDER BY position  (0.1ms) ROLLBACK TO 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 "fast_mode" = 't', "updated_at" = '2012-09-28 09:00:00.000402' 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 SQLite3::SQLException: no such column: advert_selector_helper_items.banner_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 ORDER BY position  (0.0ms) ROLLBACK TO 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.1ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-28 09:00:00.000532' 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 SQLite3::SQLException: no such column: advert_selector_helper_items.banner_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 ORDER BY position  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) 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.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.0ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-28 09:00:00.000435' 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 SQLite3::SQLException: no such column: advert_selector_helper_items.banner_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 ORDER BY position  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) 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.1ms) 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-09-28 09:00:00.004222' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.004440' 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] SQLite3::SQLException: no such column: advert_selector_helper_items.banner_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" IN ('207249520', '394627963', '814558298') ORDER BY position Completed 500 Internal Server Error in 10ms  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.3ms) 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-09-28 11:26:39', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:26:39', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:26:39', '2012-10-08 00:00:00', 't', '2012-09-28 11:26:39', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:26:39', '2012-10-08 00:00:00', 'f', '2012-09-28 11:26:39', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.3ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:26:39', '2012-09-28 11:26:39', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:26:39', '2012-09-28 11:26:39', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.5ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 11:26:39', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:26:39', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:26:39', '2012-10-08 00:00:00', 't', '2012-09-28 11:26:39', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:26:39', '2012-10-08 00:00:00', 'f', '2012-09-28 11:26:39', 1000, 207249520, 1000, 't', 1, '2012-09-28 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", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:26:39', '2012-09-28 11:26:39', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:26:39', '2012-09-28 11:26:39', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 11:26:39', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:26:39', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:26:39', '2012-10-08 00:00:00', 't', '2012-09-28 11:26:39', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:26:39', '2012-10-08 00:00:00', 'f', '2012-09-28 11:26:39', 1000, 207249520, 1000, 't', 1, '2012-09-28 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", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:26:39', '2012-09-28 11:26:39', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:26:39', '2012-09-28 11:26:39', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 11:26:39', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:26:39', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:26:39', '2012-10-08 00:00:00', 't', '2012-09-28 11:26:39', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:26:39', '2012-10-08 00:00:00', 'f', '2012-09-28 11:26:39', 1000, 207249520, 1000, 't', 1, '2012-09-28 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", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:26:39', '2012-09-28 11:26:39', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:26:39', '2012-09-28 11:26:39', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.1ms) 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-09-28 11:26:39', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:26:39', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:26:39', '2012-10-08 00:00:00', 't', '2012-09-28 11:26:39', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:26:39', '2012-10-08 00:00:00', 'f', '2012-09-28 11:26:39', 1000, 207249520, 1000, 't', 1, '2012-09-28 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", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:26:39', '2012-09-28 11:26:39', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:26:39', '2012-09-28 11:26:39', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 11:26:39', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:26:39', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:26:39', '2012-10-08 00:00:00', 't', '2012-09-28 11:26:39', 100, 394627963, 1000, 't', 0, '2012-09-28 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-09-28 11:26:39', '2012-10-08 00:00:00', 'f', '2012-09-28 11:26:39', 1000, 207249520, 1000, 't', 1, '2012-09-28 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", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:26:39', '2012-09-28 11:26:39', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:26:39', '2012-09-28 11:26:39', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 11:26:39', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:26:39', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:26:39', '2012-10-08 00:00:00', 't', '2012-09-28 11:26:39', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:26:39', '2012-10-08 00:00:00', 'f', '2012-09-28 11:26:39', 1000, 207249520, 1000, 't', 1, '2012-09-28 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", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:26:39', '2012-09-28 11:26:39', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:26:39', '2012-09-28 11:26:39', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.1ms) 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-09-28 11:26:39', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:26:39', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:26:39', '2012-10-08 00:00:00', 't', '2012-09-28 11:26:39', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:26:39', '2012-10-08 00:00:00', 'f', '2012-09-28 11:26:39', 1000, 207249520, 1000, 't', 1, '2012-09-28 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", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:26:39', '2012-09-28 11:26:39', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:26:39', '2012-09-28 11:26:39', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 11:26:39', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:26:39', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:26:39', '2012-10-08 00:00:00', 't', '2012-09-28 11:26:39', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:26:39', '2012-10-08 00:00:00', 'f', '2012-09-28 11:26:39', 1000, 207249520, 1000, 't', 1, '2012-09-28 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", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:26:39', '2012-09-28 11:26:39', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:26:39', '2012-09-28 11:26:39', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 11:26:39', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:26:39', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:26:39', '2012-10-08 00:00:00', 't', '2012-09-28 11:26:39', 100, 394627963, 1000, 't', 0, '2012-09-28 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-09-28 11:26:39', '2012-10-08 00:00:00', 'f', '2012-09-28 11:26:39', 1000, 207249520, 1000, 't', 1, '2012-09-28 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", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:26:39', '2012-09-28 11:26:39', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:26:39', '2012-09-28 11:26:39', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 11:26:39', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:26:39', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:26:39', '2012-10-08 00:00:00', 't', '2012-09-28 11:26:39', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:26:39', '2012-10-08 00:00:00', 'f', '2012-09-28 11:26:39', 1000, 207249520, 1000, 't', 1, '2012-09-28 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", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:26:39', '2012-09-28 11:26:39', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:26:39', '2012-09-28 11:26:39', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 11:26:39', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:26:39', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:26:39', '2012-10-08 00:00:00', 't', '2012-09-28 11:26:39', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:26:39', '2012-10-08 00:00:00', 'f', '2012-09-28 11:26:39', 1000, 207249520, 1000, 't', 1, '2012-09-28 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", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:26:39', '2012-09-28 11:26:39', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:26:39', '2012-09-28 11:26:39', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.1ms) 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-09-28 11:26:39', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:26:39', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:26:39', '2012-10-08 00:00:00', 't', '2012-09-28 11:26:39', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:26:39', '2012-10-08 00:00:00', 'f', '2012-09-28 11:26:39', 1000, 207249520, 1000, 't', 1, '2012-09-28 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", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:26:39', '2012-09-28 11:26:39', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:26:39', '2012-09-28 11:26:39', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 11:26:39', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:26:39', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:26:39', '2012-10-08 00:00:00', 't', '2012-09-28 11:26:39', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:26:39', '2012-10-08 00:00:00', 'f', '2012-09-28 11:26:39', 1000, 207249520, 1000, 't', 1, '2012-09-28 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", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:26:39', '2012-09-28 11:26:39', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:26:39', '2012-09-28 11:26:39', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 11:26:39', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:26:39', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:26:39', '2012-10-08 00:00:00', 't', '2012-09-28 11:26:39', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:26:39', '2012-10-08 00:00:00', 'f', '2012-09-28 11:26:39', 1000, 207249520, 1000, 't', 1, '2012-09-28 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", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:26:39', '2012-09-28 11:26:39', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:26:39', '2012-09-28 11:26:39', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.1ms) 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-09-28 11:26:39', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:26:39', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:26:39', '2012-10-08 00:00:00', 't', '2012-09-28 11:26:39', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:26:39', '2012-10-08 00:00:00', 'f', '2012-09-28 11:26:39', 1000, 207249520, 1000, 't', 1, '2012-09-28 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", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:26:39', '2012-09-28 11:26:39', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:26:39', '2012-09-28 11:26:39', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.1ms) 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-09-28 11:26:39', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:26:39', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:26:39', '2012-10-08 00:00:00', 't', '2012-09-28 11:26:39', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:26:39', '2012-10-08 00:00:00', 'f', '2012-09-28 11:26:39', 1000, 207249520, 1000, 't', 1, '2012-09-28 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", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:26:39', '2012-09-28 11:26:39', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:26:39', '2012-09-28 11:26:39', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 11:26:39', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:26:39', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:26:39', '2012-10-08 00:00:00', 't', '2012-09-28 11:26:39', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:26:39', '2012-10-08 00:00:00', 'f', '2012-09-28 11:26:39', 1000, 207249520, 1000, 't', 1, '2012-09-28 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", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:26:39', '2012-09-28 11:26:39', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:26:39', '2012-09-28 11:26:39', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 11:26:39', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:26:39', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:26:39', '2012-10-08 00:00:00', 't', '2012-09-28 11:26:39', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:26:39', '2012-10-08 00:00:00', 'f', '2012-09-28 11:26:39', 1000, 207249520, 1000, 't', 1, '2012-09-28 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", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:26:39', '2012-09-28 11:26:39', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:26:39', '2012-09-28 11:26:39', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.1ms) 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-09-28 11:26:39', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:26:39', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:26:39', '2012-10-08 00:00:00', 't', '2012-09-28 11:26:39', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:26:39', '2012-10-08 00:00:00', 'f', '2012-09-28 11:26:39', 1000, 207249520, 1000, 't', 1, '2012-09-28 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", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:26:39', '2012-09-28 11:26:39', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:26:39', '2012-09-28 11:26:39', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 11:26:39', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:26:39', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:26:39', '2012-10-08 00:00:00', 't', '2012-09-28 11:26:39', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:26:39', '2012-10-08 00:00:00', 'f', '2012-09-28 11:26:39', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.3ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:26:39', '2012-09-28 11:26:39', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:26:39', '2012-09-28 11:26:39', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.1ms) 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-09-28 11:26:39', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:26:39', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:26:39', '2012-10-08 00:00:00', 't', '2012-09-28 11:26:39', 100, 394627963, 1000, 't', 0, '2012-09-28 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-09-28 11:26:39', '2012-10-08 00:00:00', 'f', '2012-09-28 11:26:39', 1000, 207249520, 1000, 't', 1, '2012-09-28 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", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:26:39', '2012-09-28 11:26:39', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:26:39', '2012-09-28 11:26:39', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 11:26:39', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:26:39', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:26:39', '2012-10-08 00:00:00', 't', '2012-09-28 11:26:39', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:26:39', '2012-10-08 00:00:00', 'f', '2012-09-28 11:26:39', 1000, 207249520, 1000, 't', 1, '2012-09-28 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", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:26:39', '2012-09-28 11:26:39', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:26:39', '2012-09-28 11:26:39', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 11:26:39', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:26:39', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:26:39', '2012-10-08 00:00:00', 't', '2012-09-28 11:26:39', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:26:39', '2012-10-08 00:00:00', 'f', '2012-09-28 11:26:39', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.3ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:26:39', '2012-09-28 11:26:39', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:26:39', '2012-09-28 11:26:39', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 11:26:39', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:26:39', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:26:39', '2012-10-08 00:00:00', 't', '2012-09-28 11:26:39', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:26:39', '2012-10-08 00:00:00', 'f', '2012-09-28 11:26:39', 1000, 207249520, 1000, 't', 1, '2012-09-28 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", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:26:39', '2012-09-28 11:26:39', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:26:39', '2012-09-28 11:26:39', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 11:26:39', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:26:39', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:26:39', '2012-10-08 00:00:00', 't', '2012-09-28 11:26:39', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:26:39', '2012-10-08 00:00:00', 'f', '2012-09-28 11:26:39', 1000, 207249520, 1000, 't', 1, '2012-09-28 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", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:26:39', '2012-09-28 11:26:39', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:26:39', '2012-09-28 11:26:39', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 11:26:39', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:26:39', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:26:39', '2012-10-08 00:00:00', 't', '2012-09-28 11:26:39', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:26:39', '2012-10-08 00:00:00', 'f', '2012-09-28 11:26:39', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.3ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:26:39', '2012-09-28 11:26:39', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:26:39', '2012-09-28 11:26:39', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 11:26:39', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:26:39', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:26:39', '2012-10-08 00:00:00', 't', '2012-09-28 11:26:39', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:26:39', '2012-10-08 00:00:00', 'f', '2012-09-28 11:26:39', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.3ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:26:39', '2012-09-28 11:26:39', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:26:39', '2012-09-28 11:26:39', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 11:26:39', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:26:39', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:26:39', '2012-10-08 00:00:00', 't', '2012-09-28 11:26:39', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:26:39', '2012-10-08 00:00:00', 'f', '2012-09-28 11:26:39', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.3ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:26:39', '2012-09-28 11:26:39', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:26:39', '2012-09-28 11:26:39', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 11:26:39', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:26:39', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:26:39', '2012-10-08 00:00:00', 't', '2012-09-28 11:26:39', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:26:39', '2012-10-08 00:00:00', 'f', '2012-09-28 11:26:39', 1000, 207249520, 1000, 't', 1, '2012-09-28 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", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:26:39', '2012-09-28 11:26:39', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:26:39', '2012-09-28 11:26:39', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.1ms) 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-09-28 11:26:39', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:26:39', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:26:39', '2012-10-08 00:00:00', 't', '2012-09-28 11:26:39', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:26:39', '2012-10-08 00:00:00', 'f', '2012-09-28 11:26:39', 1000, 207249520, 1000, 't', 1, '2012-09-28 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", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:26:39', '2012-09-28 11:26:39', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:26:39', '2012-09-28 11:26:39', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 11:26:39', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:26:39', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:26:39', '2012-10-08 00:00:00', 't', '2012-09-28 11:26:39', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:26:39', '2012-10-08 00:00:00', 'f', '2012-09-28 11:26:39', 1000, 207249520, 1000, 't', 1, '2012-09-28 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", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:26:39', '2012-09-28 11:26:39', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:26:39', '2012-09-28 11:26:39', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 11:26:39', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:26:39', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:26:39', '2012-10-08 00:00:00', 't', '2012-09-28 11:26:39', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:26:39', '2012-10-08 00:00:00', 'f', '2012-09-28 11:26:39', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.3ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:26:39', '2012-09-28 11:26:39', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:26:39', '2012-09-28 11:26:39', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 11:26:39', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:26:39', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:26:39', '2012-10-08 00:00:00', 't', '2012-09-28 11:26:39', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:26:39', '2012-10-08 00:00:00', 'f', '2012-09-28 11:26:39', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.3ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:26:39', '2012-09-28 11:26:39', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:26:39', '2012-09-28 11:26:39', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 11:26:39', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:26:39', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:26:39', '2012-10-08 00:00:00', 't', '2012-09-28 11:26:39', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:26:39', '2012-10-08 00:00:00', 'f', '2012-09-28 11:26:39', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.3ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:26:39', '2012-09-28 11:26:39', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:26:39', '2012-09-28 11:26:39', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 11:26:39', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:26:39', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:26:39', '2012-10-08 00:00:00', 't', '2012-09-28 11:26:39', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:26:39', '2012-10-08 00:00:00', 'f', '2012-09-28 11:26:39', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.3ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:26:39', '2012-09-28 11:26:39', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:26:39', '2012-09-28 11:26:39', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.5ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 11:26:39', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:26:39', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:26:39', '2012-10-08 00:00:00', 't', '2012-09-28 11:26:39', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:26:39', '2012-10-08 00:00:00', 'f', '2012-09-28 11:26:39', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.4ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.2ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:26:39', '2012-09-28 11:26:39', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:26:39', '2012-09-28 11:26:39', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 11:26:39', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:26:39', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:26:39', '2012-10-08 00:00:00', 't', '2012-09-28 11:26:39', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:26:39', '2012-10-08 00:00:00', 'f', '2012-09-28 11:26:39', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.3ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:26:39', '2012-09-28 11:26:39', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:26:39', '2012-09-28 11:26:39', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 11:26:39', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:26:39', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:26:39', '2012-10-08 00:00:00', 't', '2012-09-28 11:26:39', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:26:39', '2012-10-08 00:00:00', 'f', '2012-09-28 11:26:39', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.3ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:26:39', '2012-09-28 11:26:39', 394627963, 960656439, 't', '') SQLite3::SQLException: table advert_selector_helper_items has no column named advert_selector_banner_id: INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "advert_selector_banner_id", "id", "content_for", "content") VALUES ('banner_leaderboard', 2, '2012-09-28 11:26:39', '2012-09-28 11:26:39', 394627963, 960656439, 't', '')  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 11:27:16', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:27:16', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:27:16', '2012-10-08 00:00:00', 't', '2012-09-28 11:27:16', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:27:16', '2012-10-08 00:00:00', 'f', '2012-09-28 11:27:16', 1000, 207249520, 1000, 't', 1, '2012-09-28 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-09-28 11:27:16', '2012-09-28 11:27:16', 960656439, 't', 394627963, '') 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-09-28 11:27:16', '2012-09-28 11:27:16', 929640376, 't', 814558298, '') 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-09-28 11:27:16', '2012-09-28 11:27:16', 281932184, 't', 207249520, '') 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-09-28 11:27:16', '2012-09-28 11:27:16', 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-09-28 11:27:16', '2012-09-28 11:27:16', '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-09-28 11:27:16', '2012-09-28 11:27:16', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-28 11:27:16', '2012-09-28 11:27:16', 'parade', 405688915)  (50.5ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.4ms) 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  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) 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-09-28 09:00:00.000078' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-28 09:00:00.001612' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.001768' 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-09-28 09:00:00.002736' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-09-28 09:00:00.003494' OR end_time IS NULL) AND (start_time < '2011-09-28 10:00:00.003619' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count)  (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) 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 "running_view_count" = 0, "updated_at" = '2012-09-28 09:00:00.001034' 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]]  (0.1ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "running_view_count" = 551, "updated_at" = '2012-09-28 09:00:00.008209' 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.3ms) UPDATE "advert_selector_banners" SET "running_view_count" = 0, "target_view_count" = 10, "updated_at" = '2012-09-28 09:00:00.001097' 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.1ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "running_view_count" = 10, "updated_at" = '2012-09-28 09:00:00.005203' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 AdvertSelector::Banner Load (0.1ms) 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.3ms) UPDATE "advert_selector_banners" SET "confirmed" = 'f', "updated_at" = '2012-09-28 09:00:00.000446' 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-09-28 09:00:00.002739' 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.4ms) UPDATE "advert_selector_banners" SET "target_view_count" = 100, "start_time" = '2012-09-27 21:00:00.000000', "end_time" = '2012-10-08 00:00:00.000000', "updated_at" = '2012-09-28 09:00:00.000871' 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" = 0, "updated_at" = '2012-09-28 09:00:00.003540' 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.1ms) 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", 814558298]] 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", 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) 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", "end_time"=>"2012-10-08 00:00:00 UTC", "placement_id"=>"405688915", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-09-28 00:00:00 UTC"}}  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["end_time", Mon, 08 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", Fri, 28 Sep 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Fri, 28 Sep 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 6ms (ActiveRecord: 0.9ms)  (0.1ms) 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.1ms) 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.4ms) 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]]  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 500 Internal Server Error in 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.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]] Processing by AdvertSelector::BannersController#edit 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"]] 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 (137.3ms) AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.3ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = 718799085 LIMIT 1 AdvertSelector::Placement Load (0.2ms) 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 Completed 200 OK in 162ms (Views: 159.8ms | ActiveRecord: 1.4ms)  (0.1ms) rollback transaction  (0.1ms) 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::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" 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 Completed 200 OK in 12ms (Views: 10.9ms | ActiveRecord: 0.7ms)  (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 (21.2ms) 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" 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 Completed 200 OK in 30ms (Views: 29.0ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) 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.1ms) 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.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  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/banners/394627963 Completed 302 Found in 3ms (ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) 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::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" 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 Completed 200 OK in 10ms (Views: 9.4ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.1ms) 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.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]] 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) SELECT COUNT(*) FROM "advert_selector_helper_items"  (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.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]] 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.3ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-09-28 09:00:00.001760', "conflicting_placements_array" = 'not_found,video' WHERE "advert_selector_placements"."id" = 718799085 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position SQLite3::SQLException: no such column: advert_selector_helper_items.master_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) 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.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]] 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.1ms) 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.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]] 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.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.1ms) rollback transaction  (0.1ms) 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.1ms) SELECT COUNT(*) FROM "advert_selector_placements" Processing by AdvertSelector::PlacementsController#create as HTML Parameters: {"placement"=>{"name"=>"new placement"}}  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "advert_selector_placements" ("conflicting_placements_array", "created_at", "name", "only_once_per_session", "updated_at") VALUES (?, ?, ?, ?, ?) [["conflicting_placements_array", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Fri, 28 Sep 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"."master_id" = 1019730478 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position SQLite3::SQLException: no such column: advert_selector_helper_items.master_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 1019730478 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 500 Internal Server Error in 3ms  (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.1ms) SELECT COUNT(*) FROM "advert_selector_placements"  Processing by AdvertSelector::PlacementsController#destroy as HTML Parameters: {"id"=>"405688915"} AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", "405688915"]]  (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"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position SQLite3::SQLException: no such column: advert_selector_helper_items.master_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 500 Internal Server Error in 3ms  (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.1ms) 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 (9.0ms) Completed 500 Internal Server Error in 12ms  (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::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" 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 Completed 200 OK in 11ms (Views: 9.8ms | 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#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 (5.5ms) Completed 500 Internal Server Error in 7ms  (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.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", "405688915"]]  (0.0ms) SAVEPOINT active_record_1 AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position SQLite3::SQLException: no such column: advert_selector_helper_items.master_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 500 Internal Server Error in 3ms  (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) 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-09-28 09:00:00.000450' 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-09-28 09:00:00.002749' 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 Fri Sep 28 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-09-28 09:00:00.007315' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.007541' 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] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] SQLite3::SQLException: no such column: advert_selector_helper_items.master_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Error with banner Coke in placement Leaderboard. 2012-09-28T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/sqlite3-1.3.6/lib/sqlite3/database.rb:91:in `initialize' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/sqlite3-1.3.6/lib/sqlite3/database.rb:91:in `new' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/sqlite3-1.3.6/lib/sqlite3/database.rb:91:in `prepare' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/sqlite_adapter.rb:246:in `exec_query' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract_adapter.rb:280:in `log' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/activesupport-3.2.8/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract_adapter.rb:275:in `log' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/sqlite_adapter.rb:242:in `exec_query' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/sqlite_adapter.rb:467:in `select' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/database_statements.rb:18:in `select_all' [AdvertSelector] AdvertSelection finished Completed 200 OK in 12ms (Views: 10.8ms | ActiveRecord: 0.7ms) 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.4ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-28 09:00:00.000460' 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-09-28 09:00:00.003029' 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.0ms) ROLLBACK TO 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.4ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-28 09:00:00.000427' 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-09-28 09:00:00.002980' 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-09-28 09:00:00.000344' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.004054' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.004261' 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] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] SQLite3::SQLException: no such column: advert_selector_helper_items.master_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Error with banner Coke in placement Leaderboard. 2012-09-28T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/sqlite3-1.3.6/lib/sqlite3/database.rb:91:in `initialize' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/sqlite3-1.3.6/lib/sqlite3/database.rb:91:in `new' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/sqlite3-1.3.6/lib/sqlite3/database.rb:91:in `prepare' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/sqlite_adapter.rb:246:in `exec_query' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract_adapter.rb:280:in `log' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/activesupport-3.2.8/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract_adapter.rb:275:in `log' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/sqlite_adapter.rb:242:in `exec_query' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/sqlite_adapter.rb:467:in `select' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/database_statements.rb:18:in `select_all' [AdvertSelector] AdvertSelection finished Completed 200 OK in 7ms (Views: 6.4ms | 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" = 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-09-28 09:00:00.000439' 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-09-28 09:00:00.002752' 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 Fri Sep 28 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-09-28 09:00:00.002650' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.002849' 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] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] SQLite3::SQLException: no such column: advert_selector_helper_items.master_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Error with banner Coke in placement Leaderboard. 2012-09-28T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/sqlite3-1.3.6/lib/sqlite3/database.rb:91:in `initialize' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/sqlite3-1.3.6/lib/sqlite3/database.rb:91:in `new' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/sqlite3-1.3.6/lib/sqlite3/database.rb:91:in `prepare' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/sqlite_adapter.rb:246:in `exec_query' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract_adapter.rb:280:in `log' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/activesupport-3.2.8/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract_adapter.rb:275:in `log' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/sqlite_adapter.rb:242:in `exec_query' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/sqlite_adapter.rb:467:in `select' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/database_statements.rb:18:in `select_all' [AdvertSelector] AdvertSelection finished Completed 200 OK in 7ms (Views: 6.4ms | 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 Started GET "/?advert_selector_force=207249520" for 127.0.0.1 at Fri Sep 28 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.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] SQLite3::SQLException: no such column: advert_selector_helper_items.master_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position Completed 500 Internal Server Error in 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.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-28 09:00:00.000467' 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-09-28 09:00:00.002834' 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-09-28 09:00:00.000521' 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 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.004899' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.005104' 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] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] SQLite3::SQLException: no such column: advert_selector_helper_items.master_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Error with banner parade_banner in placement Parade. 2012-09-28T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/sqlite3-1.3.6/lib/sqlite3/database.rb:91:in `initialize' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/sqlite3-1.3.6/lib/sqlite3/database.rb:91:in `new' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/sqlite3-1.3.6/lib/sqlite3/database.rb:91:in `prepare' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/sqlite_adapter.rb:246:in `exec_query' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract_adapter.rb:280:in `log' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/activesupport-3.2.8/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract_adapter.rb:275:in `log' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/sqlite_adapter.rb:242:in `exec_query' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/sqlite_adapter.rb:467:in `select' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/database_statements.rb:18:in `select_all' [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] SQLite3::SQLException: no such column: advert_selector_helper_items.master_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Error with banner Coke in placement Leaderboard. 2012-09-28T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/sqlite3-1.3.6/lib/sqlite3/database.rb:91:in `initialize' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/sqlite3-1.3.6/lib/sqlite3/database.rb:91:in `new' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/sqlite3-1.3.6/lib/sqlite3/database.rb:91:in `prepare' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/sqlite_adapter.rb:246:in `exec_query' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract_adapter.rb:280:in `log' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/activesupport-3.2.8/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract_adapter.rb:275:in `log' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/sqlite_adapter.rb:242:in `exec_query' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/sqlite_adapter.rb:467:in `select' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/database_statements.rb:18:in `select_all' [AdvertSelector] AdvertSelection finished Completed 200 OK in 10ms (Views: 8.6ms | ActiveRecord: 0.9ms) 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.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-28 09:00:00.000458' 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-09-28 09:00:00.002794' 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-09-28 09:00:00.000504' 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-09-28 09:00:00.003099', "conflicting_placements_array" = '' WHERE "advert_selector_placements"."id" = 718799085 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position SQLite3::SQLException: no such column: advert_selector_helper_items.master_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) ROLLBACK TO 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 "fast_mode" = 't', "updated_at" = '2012-09-28 09:00:00.000418' WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.2ms) 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.3ms) UPDATE "advert_selector_banners" SET "confirmed" = 'f', "updated_at" = '2012-09-28 09:00:00.003464' 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.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.000320' 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] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] SQLite3::SQLException: no such column: advert_selector_helper_items.master_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Error with banner Coke in placement Leaderboard. 2012-09-28T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/sqlite3-1.3.6/lib/sqlite3/database.rb:91:in `initialize' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/sqlite3-1.3.6/lib/sqlite3/database.rb:91:in `new' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/sqlite3-1.3.6/lib/sqlite3/database.rb:91:in `prepare' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/sqlite_adapter.rb:246:in `exec_query' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract_adapter.rb:280:in `log' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/activesupport-3.2.8/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract_adapter.rb:275:in `log' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/sqlite_adapter.rb:242:in `exec_query' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/sqlite_adapter.rb:467:in `select' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/database_statements.rb:18:in `select_all' [AdvertSelector] AdvertSelection finished Completed 200 OK in 7ms (Views: 5.9ms | 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" = 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-09-28 09:00:00.000445' 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-09-28 09:00:00.002788' 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.2ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-09-28 09:00:00.001116', "only_once_per_session" = 't' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position SQLite3::SQLException: no such column: advert_selector_helper_items.master_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) ROLLBACK TO 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]] 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-09-28 09:00:00.002458' OR end_time IS NULL) AND (start_time < '2012-09-28 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] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] SQLite3::SQLException: no such column: advert_selector_helper_items.master_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Error with banner Pepsi in placement Leaderboard. 2012-09-28T12:00:00+03:00 - http://test.host/ - {"action"=>"index", "controller"=>"examples"} # /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/sqlite3-1.3.6/lib/sqlite3/database.rb:91:in `initialize' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/sqlite3-1.3.6/lib/sqlite3/database.rb:91:in `new' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/sqlite3-1.3.6/lib/sqlite3/database.rb:91:in `prepare' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/sqlite_adapter.rb:246:in `exec_query' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract_adapter.rb:280:in `log' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/activesupport-3.2.8/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract_adapter.rb:275:in `log' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/sqlite_adapter.rb:242:in `exec_query' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/sqlite_adapter.rb:467:in `select' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/database_statements.rb:18:in `select_all' [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] SQLite3::SQLException: no such column: advert_selector_helper_items.master_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Error with banner Coke in placement Leaderboard. 2012-09-28T12:00:00+03:00 - http://test.host/ - {"action"=>"index", "controller"=>"examples"} # /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/sqlite3-1.3.6/lib/sqlite3/database.rb:91:in `initialize' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/sqlite3-1.3.6/lib/sqlite3/database.rb:91:in `new' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/sqlite3-1.3.6/lib/sqlite3/database.rb:91:in `prepare' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/sqlite_adapter.rb:246:in `exec_query' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract_adapter.rb:280:in `log' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/activesupport-3.2.8/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract_adapter.rb:275:in `log' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/sqlite_adapter.rb:242:in `exec_query' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/sqlite_adapter.rb:467:in `select' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/database_statements.rb:18:in `select_all' [AdvertSelector] AdvertSelection finished Completed 200 OK in 9ms (Views: 7.9ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 11:27:49', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:27:49', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:27:49', '2012-10-08 00:00:00', 't', '2012-09-28 11:27:49', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:27:49', '2012-10-08 00:00:00', 'f', '2012-09-28 11:27:49', 1000, 207249520, 1000, 't', 1, '2012-09-28 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-09-28 11:27:49', '2012-09-28 11:27:49', 960656439, 't', 394627963, '') 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-09-28 11:27:49', '2012-09-28 11:27:49', 929640376, 't', 814558298, '') 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-09-28 11:27:49', '2012-09-28 11:27:49', 281932184, 't', 207249520, '') 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-09-28 11:27:49', '2012-09-28 11:27:49', 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-09-28 11:27:49', '2012-09-28 11:27:49', '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-09-28 11:27:49', '2012-09-28 11:27:49', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-28 11:27:49', '2012-09-28 11:27:49', 'parade', 405688915)  (102.4ms) commit transaction  (0.0ms) 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.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]]  (0.2ms) SELECT COUNT(*) FROM "advert_selector_helper_items"  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO 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.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-28 09:00:00.000091' OR end_time IS NULL)  (0.2ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-28 09:00:00.002276' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.002510' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count)  (0.2ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-09-28 09:00:00.003899' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-09-28 09:00:00.005343' OR end_time IS NULL) AND (start_time < '2011-09-28 10:00:00.005542' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count)  (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) rollback transaction  (0.1ms) 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 "updated_at" = '2012-09-28 09:00:00.001146', "running_view_count" = 0 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 "updated_at" = '2012-09-28 09:00:00.007568', "running_view_count" = 551 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) 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 "updated_at" = '2012-09-28 09:00:00.001384', "running_view_count" = 0, "target_view_count" = 10 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 "updated_at" = '2012-09-28 09:00:00.005479', "running_view_count" = 10 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]]  (0.2ms) 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 "updated_at" = '2012-09-28 09:00:00.000418', "confirmed" = 'f' 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 "updated_at" = '2012-09-28 09:00:00.002397', "confirmed" = 't' 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.2ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]]  (0.1ms) SAVEPOINT active_record_1  (0.5ms) UPDATE "advert_selector_banners" SET "start_time" = '2012-09-27 21:00:00.000000', "updated_at" = '2012-09-28 09:00:00.001400', "end_time" = '2012-10-08 00:00:00.000000', "target_view_count" = 100 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 "updated_at" = '2012-09-28 09:00:00.004258', "running_view_count" = 0 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 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.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", 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) 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", "end_time"=>"2012-10-08 00:00:00 UTC", "placement_id"=>"405688915", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-09-28 00:00:00 UTC"}}  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["end_time", Mon, 08 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", Fri, 28 Sep 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Fri, 28 Sep 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 6ms (ActiveRecord: 0.9ms)  (0.1ms) 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.1ms) 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.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" = 394627963 ORDER BY position SQL (0.5ms) DELETE FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."id" = ? [["id", 435138789]] SQL (0.1ms) DELETE FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."id" = ? [["id", 960656439]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 500 Internal Server Error in 5ms  (0.2ms) rollback transaction  (0.1ms) 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.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]] Processing by AdvertSelector::BannersController#edit 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"]] 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 (139.7ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 157ms (Views: 155.2ms | ActiveRecord: 0.9ms)  (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.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners"  AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 12ms (Views: 10.8ms | 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]] Processing by AdvertSelector::BannersController#new as HTML AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/banners/_form.html.erb (20.7ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 29ms (Views: 28.1ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) 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.1ms) 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.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]] 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::Placement Load (0.3ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.3ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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.3ms) 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 Completed 200 OK in 17ms (Views: 15.6ms | ActiveRecord: 1.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]] 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.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items"  (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.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.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]] 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) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = 'not_found,video', "updated_at" = '2012-09-28 09:00:00.002096' WHERE "advert_selector_placements"."id" = 718799085 AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE (LOWER(name) = 'leaderboard') LIMIT 1  (0.2ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = '', "updated_at" = '2012-09-28 09:00:00.004776' 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.1ms) 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.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.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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) 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", 405688915]]  (0.1ms) 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.5ms) INSERT INTO "advert_selector_placements" ("conflicting_placements_array", "created_at", "name", "only_once_per_session", "updated_at") VALUES (?, ?, ?, ?, ?) [["conflicting_placements_array", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Fri, 28 Sep 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.6ms)  (0.1ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) 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", 405688915]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_placements"  Processing by AdvertSelector::PlacementsController#destroy as HTML Parameters: {"id"=>"405688915"} AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", "405688915"]]  (0.0ms) SAVEPOINT active_record_1 AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position SQLite3::SQLException: no such column: advert_selector_helper_items.master_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 500 Internal Server Error in 3ms  (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 (8.7ms) Completed 500 Internal Server Error in 11ms  (0.1ms) rollback transaction  (0.1ms) 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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 11ms (Views: 9.2ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.1ms) 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.1ms) 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", 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 (5.3ms) Completed 500 Internal Server Error in 7ms  (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 0ms (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.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-09-28 09:00:00.000487' 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 "updated_at" = '2012-09-28 09:00:00.002533', "confirmed" = 'f' 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 Fri Sep 28 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-09-28 09:00:00.006885' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.007086' 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] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] SQLite3::SQLException: no such column: advert_selector_helper_items.master_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Error with banner Coke in placement Leaderboard. 2012-09-28T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/sqlite3-1.3.6/lib/sqlite3/database.rb:91:in `initialize' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/sqlite3-1.3.6/lib/sqlite3/database.rb:91:in `new' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/sqlite3-1.3.6/lib/sqlite3/database.rb:91:in `prepare' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/sqlite_adapter.rb:246:in `exec_query' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract_adapter.rb:280:in `log' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/activesupport-3.2.8/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract_adapter.rb:275:in `log' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/sqlite_adapter.rb:242:in `exec_query' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/sqlite_adapter.rb:467:in `select' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/database_statements.rb:18:in `select_all' [AdvertSelector] AdvertSelection finished Completed 200 OK in 11ms (Views: 9.9ms | 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" = 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-09-28 09:00:00.000405' 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 "updated_at" = '2012-09-28 09:00:00.002594', "confirmed" = 'f' 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.0ms) ROLLBACK TO 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.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-28 09:00:00.000440' 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 "updated_at" = '2012-09-28 09:00:00.002502', "confirmed" = 'f' 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-09-28 09:00:00.000307' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.003705' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.003886' 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] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] SQLite3::SQLException: no such column: advert_selector_helper_items.master_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Error with banner Coke in placement Leaderboard. 2012-09-28T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/sqlite3-1.3.6/lib/sqlite3/database.rb:91:in `initialize' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/sqlite3-1.3.6/lib/sqlite3/database.rb:91:in `new' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/sqlite3-1.3.6/lib/sqlite3/database.rb:91:in `prepare' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/sqlite_adapter.rb:246:in `exec_query' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract_adapter.rb:280:in `log' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/activesupport-3.2.8/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract_adapter.rb:275:in `log' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/sqlite_adapter.rb:242:in `exec_query' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/sqlite_adapter.rb:467:in `select' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/database_statements.rb:18:in `select_all' [AdvertSelector] AdvertSelection finished Completed 200 OK in 7ms (Views: 6.1ms | 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" = 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-09-28 09:00:00.000408' 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 "updated_at" = '2012-09-28 09:00:00.002614', "confirmed" = 'f' 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 Fri Sep 28 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-09-28 09:00:00.002309' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.002577' 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] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] SQLite3::SQLException: no such column: advert_selector_helper_items.master_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Error with banner Coke in placement Leaderboard. 2012-09-28T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/sqlite3-1.3.6/lib/sqlite3/database.rb:91:in `initialize' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/sqlite3-1.3.6/lib/sqlite3/database.rb:91:in `new' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/sqlite3-1.3.6/lib/sqlite3/database.rb:91:in `prepare' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/sqlite_adapter.rb:246:in `exec_query' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract_adapter.rb:280:in `log' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/activesupport-3.2.8/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract_adapter.rb:275:in `log' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/sqlite_adapter.rb:242:in `exec_query' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/sqlite_adapter.rb:467:in `select' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/database_statements.rb:18:in `select_all' [AdvertSelector] AdvertSelection finished Completed 200 OK in 7ms (Views: 6.0ms | 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 Started GET "/?advert_selector_force=207249520" for 127.0.0.1 at Fri Sep 28 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.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] SQLite3::SQLException: no such column: advert_selector_helper_items.master_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position Completed 500 Internal Server Error in 3ms  (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-09-28 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 "updated_at" = '2012-09-28 09:00:00.002567', "confirmed" = 'f' 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 "updated_at" = '2012-09-28 09:00:00.000436', "confirmed" = 't' 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 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.004264' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.004508' 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] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] SQLite3::SQLException: no such column: advert_selector_helper_items.master_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Error with banner parade_banner in placement Parade. 2012-09-28T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/sqlite3-1.3.6/lib/sqlite3/database.rb:91:in `initialize' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/sqlite3-1.3.6/lib/sqlite3/database.rb:91:in `new' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/sqlite3-1.3.6/lib/sqlite3/database.rb:91:in `prepare' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/sqlite_adapter.rb:246:in `exec_query' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract_adapter.rb:280:in `log' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/activesupport-3.2.8/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract_adapter.rb:275:in `log' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/sqlite_adapter.rb:242:in `exec_query' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/sqlite_adapter.rb:467:in `select' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/database_statements.rb:18:in `select_all' [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] SQLite3::SQLException: no such column: advert_selector_helper_items.master_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Error with banner Coke in placement Leaderboard. 2012-09-28T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/sqlite3-1.3.6/lib/sqlite3/database.rb:91:in `initialize' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/sqlite3-1.3.6/lib/sqlite3/database.rb:91:in `new' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/sqlite3-1.3.6/lib/sqlite3/database.rb:91:in `prepare' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/sqlite_adapter.rb:246:in `exec_query' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract_adapter.rb:280:in `log' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/activesupport-3.2.8/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract_adapter.rb:275:in `log' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/sqlite_adapter.rb:242:in `exec_query' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/sqlite_adapter.rb:467:in `select' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/database_statements.rb:18:in `select_all' [AdvertSelector] AdvertSelection finished Completed 200 OK in 9ms (Views: 7.6ms | ActiveRecord: 0.8ms) 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-09-28 09:00:00.000398' 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 "updated_at" = '2012-09-28 09:00:00.002513', "confirmed" = 'f' 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 "updated_at" = '2012-09-28 09:00:00.000527', "confirmed" = 't' 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.1ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = '', "updated_at" = '2012-09-28 09:00:00.002838' 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.0ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = '', "updated_at" = '2012-09-28 09:00:00.004152' 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 "conflicting_placements_array" = '', "updated_at" = '2012-09-28 09:00:00.005836' 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 Fri Sep 28 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-09-28 09:00:00.009340' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.009512' 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] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] SQLite3::SQLException: no such column: advert_selector_helper_items.master_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 718799085 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Error with banner parade_banner in placement Parade. 2012-09-28T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/sqlite3-1.3.6/lib/sqlite3/database.rb:91:in `initialize' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/sqlite3-1.3.6/lib/sqlite3/database.rb:91:in `new' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/sqlite3-1.3.6/lib/sqlite3/database.rb:91:in `prepare' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/sqlite_adapter.rb:246:in `exec_query' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract_adapter.rb:280:in `log' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/activesupport-3.2.8/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract_adapter.rb:275:in `log' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/sqlite_adapter.rb:242:in `exec_query' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/sqlite_adapter.rb:467:in `select' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/database_statements.rb:18:in `select_all' [AdvertSelector] AdvertSelector::HelperItem Load (0.1ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] SQLite3::SQLException: no such column: advert_selector_helper_items.master_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Error with banner Coke in placement Leaderboard. 2012-09-28T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/sqlite3-1.3.6/lib/sqlite3/database.rb:91:in `initialize' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/sqlite3-1.3.6/lib/sqlite3/database.rb:91:in `new' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/sqlite3-1.3.6/lib/sqlite3/database.rb:91:in `prepare' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/sqlite_adapter.rb:246:in `exec_query' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract_adapter.rb:280:in `log' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/activesupport-3.2.8/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract_adapter.rb:275:in `log' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/sqlite_adapter.rb:242:in `exec_query' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/sqlite_adapter.rb:467:in `select' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/database_statements.rb:18:in `select_all' [AdvertSelector] AdvertSelection finished Completed 200 OK in 8ms (Views: 7.5ms | ActiveRecord: 0.7ms) 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-09-28 09:00:00.000401' 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 "updated_at" = '2012-09-28 09:00:00.002367', "confirmed" = 'f' 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 Fri Sep 28 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-09-28 09:00:00.000238' 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] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] SQLite3::SQLException: no such column: advert_selector_helper_items.master_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Error with banner Coke in placement Leaderboard. 2012-09-28T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/sqlite3-1.3.6/lib/sqlite3/database.rb:91:in `initialize' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/sqlite3-1.3.6/lib/sqlite3/database.rb:91:in `new' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/sqlite3-1.3.6/lib/sqlite3/database.rb:91:in `prepare' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/sqlite_adapter.rb:246:in `exec_query' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract_adapter.rb:280:in `log' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/activesupport-3.2.8/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract_adapter.rb:275:in `log' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/sqlite_adapter.rb:242:in `exec_query' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/sqlite_adapter.rb:467:in `select' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/database_statements.rb:18:in `select_all' [AdvertSelector] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.3ms | ActiveRecord: 0.5ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]]  (0.0ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-28 09:00:00.000642' 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 "updated_at" = '2012-09-28 09:00:00.003782', "confirmed" = 'f' 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.2ms) UPDATE "advert_selector_placements" SET "only_once_per_session" = 't', "updated_at" = '2012-09-28 09:00:00.001548' WHERE "advert_selector_placements"."id" = 405688915  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.006138' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.006420' 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] AdvertSelector::HelperItem Load (0.3ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] SQLite3::SQLException: no such column: advert_selector_helper_items.master_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Error with banner Coke in placement Leaderboard. 2012-09-28T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/sqlite3-1.3.6/lib/sqlite3/database.rb:91:in `initialize' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/sqlite3-1.3.6/lib/sqlite3/database.rb:91:in `new' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/sqlite3-1.3.6/lib/sqlite3/database.rb:91:in `prepare' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/sqlite_adapter.rb:246:in `exec_query' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract_adapter.rb:280:in `log' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/activesupport-3.2.8/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract_adapter.rb:275:in `log' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/sqlite_adapter.rb:242:in `exec_query' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/sqlite_adapter.rb:467:in `select' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/database_statements.rb:18:in `select_all' [AdvertSelector] AdvertSelection finished Completed 200 OK in 10ms (Views: 8.9ms | ActiveRecord: 0.8ms) 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.2ms) rollback transaction  (0.1ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) 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.3ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time > '2012-09-28 09:00:00.003531' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.003816' 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] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] SQLite3::SQLException: no such column: advert_selector_helper_items.master_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Error with banner Pepsi in placement Leaderboard. 2012-09-28T12:00:00+03:00 - http://test.host/ - {"action"=>"index", "controller"=>"examples"} # /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/sqlite3-1.3.6/lib/sqlite3/database.rb:91:in `initialize' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/sqlite3-1.3.6/lib/sqlite3/database.rb:91:in `new' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/sqlite3-1.3.6/lib/sqlite3/database.rb:91:in `prepare' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/sqlite_adapter.rb:246:in `exec_query' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract_adapter.rb:280:in `log' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/activesupport-3.2.8/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract_adapter.rb:275:in `log' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/sqlite_adapter.rb:242:in `exec_query' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/sqlite_adapter.rb:467:in `select' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/database_statements.rb:18:in `select_all' [AdvertSelector] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] SQLite3::SQLException: no such column: advert_selector_helper_items.master_id: SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."master_id" = 405688915 AND "advert_selector_helper_items"."master_type" = 'AdvertSelector::Placement' ORDER BY position [AdvertSelector] Error with banner Coke in placement Leaderboard. 2012-09-28T12:00:00+03:00 - http://test.host/ - {"action"=>"index", "controller"=>"examples"} # /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/sqlite3-1.3.6/lib/sqlite3/database.rb:91:in `initialize' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/sqlite3-1.3.6/lib/sqlite3/database.rb:91:in `new' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/sqlite3-1.3.6/lib/sqlite3/database.rb:91:in `prepare' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/sqlite_adapter.rb:246:in `exec_query' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract_adapter.rb:280:in `log' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/activesupport-3.2.8/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract_adapter.rb:275:in `log' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/sqlite_adapter.rb:242:in `exec_query' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/sqlite_adapter.rb:467:in `select' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/database_statements.rb:18:in `select_all' [AdvertSelector] AdvertSelection finished Completed 200 OK in 12ms (Views: 10.9ms | ActiveRecord: 1.0ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 11:27:58', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:27:58', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:27:58', '2012-10-08 00:00:00', 't', '2012-09-28 11:27:58', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:27:58', '2012-10-08 00:00:00', 'f', '2012-09-28 11:27:58', 1000, 207249520, 1000, 't', 1, '2012-09-28 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-09-28 11:27:58', '2012-09-28 11:27:58', 960656439, 't', 394627963, '') 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-09-28 11:27:58', '2012-09-28 11:27:58', 929640376, 't', 814558298, '') 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-09-28 11:27:58', '2012-09-28 11:27:58', 281932184, 't', 207249520, '') 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-09-28 11:27:58', '2012-09-28 11:27:58', 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-09-28 11:27:58', '2012-09-28 11:27:58', '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-09-28 11:27:58', '2012-09-28 11:27:58', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-28 11:27:58', '2012-09-28 11:27:58', 'parade', 405688915)  (161.6ms) commit transaction  (0.0ms) begin transaction AdvertSelector::Banner Load (0.3ms) 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  (0.0ms) ROLLBACK TO 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.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-28 09:00:00.000079' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-28 09:00:00.001537' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.001682' 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-09-28 09:00:00.002640' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-09-28 09:00:00.003376' OR end_time IS NULL) AND (start_time < '2011-09-28 10:00:00.003495' 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-09-28 09:00:00.000989' 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.1ms) 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-09-28 09:00:00.007781' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 AdvertSelector::Banner Load (0.1ms) 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.3ms) UPDATE "advert_selector_banners" SET "running_view_count" = 0, "updated_at" = '2012-09-28 09:00:00.000907', "target_view_count" = 10 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-09-28 09:00:00.004392' 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.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.000409', "confirmed" = 'f' 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 "updated_at" = '2012-09-28 09:00:00.002484', "confirmed" = 't' 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.1ms) 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.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.4ms) UPDATE "advert_selector_banners" SET "end_time" = '2012-10-08 00:00:00.000000', "updated_at" = '2012-09-28 09:00:00.000937', "target_view_count" = 100, "start_time" = '2012-09-27 21:00:00.000000' 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" = 0, "updated_at" = '2012-09-28 09:00:00.003256' 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", "end_time"=>"2012-10-08 00:00:00 UTC", "placement_id"=>"405688915", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-09-28 00:00:00 UTC"}}  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["end_time", Mon, 08 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", Fri, 28 Sep 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Fri, 28 Sep 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 6ms (ActiveRecord: 1.0ms)  (0.1ms) 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.1ms) 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.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 394627963 ORDER BY position SQL (0.4ms) 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]]  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 500 Internal Server Error in 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]] Processing by AdvertSelector::BannersController#edit 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"]] 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 (133.4ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 152ms (Views: 150.5ms | ActiveRecord: 0.9ms)  (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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 12ms (Views: 10.4ms | 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) 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.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/banners/_form.html.erb (20.3ms) 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" 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 Completed 200 OK in 30ms (Views: 29.1ms | ActiveRecord: 0.7ms)  (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.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  (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]] 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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 9ms (Views: 8.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.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.0ms) SELECT COUNT(*) FROM "advert_selector_helper_items"  (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.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.3ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = 'not_found,video', "updated_at" = '2012-09-28 09:00:00.001609' 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 "conflicting_placements_array" = '', "updated_at" = '2012-09-28 09:00:00.003598' 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.1ms) 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.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.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.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.1ms) 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.5ms) INSERT INTO "advert_selector_placements" ("conflicting_placements_array", "created_at", "name", "only_once_per_session", "updated_at") VALUES (?, ?, ?, ?, ?) [["conflicting_placements_array", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Fri, 28 Sep 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.6ms)  (0.1ms) 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.1ms) SELECT COUNT(*) FROM "advert_selector_placements"  Processing by AdvertSelector::PlacementsController#destroy as HTML Parameters: {"id"=>"405688915"} AdvertSelector::Placement Load (0.1ms) 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.3ms) 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.4ms)  (0.1ms) 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.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]] 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.2ms) 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 (12.5ms) Completed 500 Internal Server Error in 15ms  (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::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" 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 Completed 200 OK in 11ms (Views: 9.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#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 (5.1ms) Completed 500 Internal Server Error in 7ms  (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.1ms) 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.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 "updated_at" = '2012-09-28 09:00:00.000417', "fast_mode" = 't' 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 "updated_at" = '2012-09-28 09:00:00.002565', "confirmed" = 'f' 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 Fri Sep 28 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-09-28 09:00:00.007009' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.007219' 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-09-28T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} #> /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activemodel-3.2.8/lib/active_model/attribute_methods.rb:407:in `method_missing' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/attribute_methods.rb:149:in `method_missing' /home/ohu/koodi/gems/advert_selector/app/models/advert_selector/banner.rb:100:in `all_helper_items' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:44:in `advert_selector_banner_try' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:16: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' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `__send__' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `each' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:15:in `advert_selector_initialize' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/activesupport-3.2.8/lib/active_support/tagged_logging.rb:25:in `tagged' [AdvertSelector] AdvertSelection finished Completed 200 OK in 10ms (Views: 9.7ms | 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.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 "updated_at" = '2012-09-28 09:00:00.000422', "fast_mode" = 't' 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 "updated_at" = '2012-09-28 09:00:00.002802', "confirmed" = 'f' 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.0ms) ROLLBACK TO 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 "updated_at" = '2012-09-28 09:00:00.000395', "fast_mode" = 't' 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 "updated_at" = '2012-09-28 09:00:00.002504', "confirmed" = 'f' 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 "updated_at" = '2012-09-28 09:00:00.000299', "frequency" = 2 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.003664' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.003851' 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-09-28T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} #> /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activemodel-3.2.8/lib/active_model/attribute_methods.rb:407:in `method_missing' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/attribute_methods.rb:149:in `method_missing' /home/ohu/koodi/gems/advert_selector/app/models/advert_selector/banner.rb:100:in `all_helper_items' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:44:in `advert_selector_banner_try' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:16: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' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `__send__' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `each' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:15:in `advert_selector_initialize' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/activesupport-3.2.8/lib/active_support/tagged_logging.rb:25:in `tagged' [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  (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.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.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.000457', "fast_mode" = 't' 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 "updated_at" = '2012-09-28 09:00:00.002610', "confirmed" = 'f' 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 Fri Sep 28 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-09-28 09:00:00.002386' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.002573' 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-09-28T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} #> /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activemodel-3.2.8/lib/active_model/attribute_methods.rb:407:in `method_missing' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/attribute_methods.rb:149:in `method_missing' /home/ohu/koodi/gems/advert_selector/app/models/advert_selector/banner.rb:100:in `all_helper_items' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:44:in `advert_selector_banner_try' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:16: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' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `__send__' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `each' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:15:in `advert_selector_initialize' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/activesupport-3.2.8/lib/active_support/tagged_logging.rb:25:in `tagged' [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" = 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 Fri Sep 28 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 Completed 500 Internal Server Error in 3ms  (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 "updated_at" = '2012-09-28 09:00:00.000420', "fast_mode" = 't' 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 "updated_at" = '2012-09-28 09:00:00.002525', "confirmed" = 'f' 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 "updated_at" = '2012-09-28 09:00:00.000474', "confirmed" = 't' 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 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.004019' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.004198' 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 parade_banner in placement Parade. 2012-09-28T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} #> /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activemodel-3.2.8/lib/active_model/attribute_methods.rb:407:in `method_missing' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/attribute_methods.rb:149:in `method_missing' /home/ohu/koodi/gems/advert_selector/app/models/advert_selector/banner.rb:100:in `all_helper_items' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:44:in `advert_selector_banner_try' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:16: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' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `__send__' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `each' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:15:in `advert_selector_initialize' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/activesupport-3.2.8/lib/active_support/tagged_logging.rb:25:in `tagged' [AdvertSelector] Error with banner Coke in placement Leaderboard. 2012-09-28T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} #> /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activemodel-3.2.8/lib/active_model/attribute_methods.rb:407:in `method_missing' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/attribute_methods.rb:149:in `method_missing' /home/ohu/koodi/gems/advert_selector/app/models/advert_selector/banner.rb:100:in `all_helper_items' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:44:in `advert_selector_banner_try' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:16: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' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `__send__' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `each' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:15:in `advert_selector_initialize' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/activesupport-3.2.8/lib/active_support/tagged_logging.rb:25:in `tagged' [AdvertSelector] AdvertSelection finished Completed 200 OK in 7ms (Views: 6.6ms | 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" = 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.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.000418', "fast_mode" = 't' 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 "updated_at" = '2012-09-28 09:00:00.002589', "confirmed" = 'f' 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 "updated_at" = '2012-09-28 09:00:00.000462', "confirmed" = 't' 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 "conflicting_placements_array" = '', "updated_at" = '2012-09-28 09:00:00.002754' 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 "conflicting_placements_array" = '', "updated_at" = '2012-09-28 09:00:00.004072' 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 "conflicting_placements_array" = '', "updated_at" = '2012-09-28 09:00:00.005791' 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 Fri Sep 28 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-09-28 09:00:00.009245' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.009427' 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 parade_banner in placement Parade. 2012-09-28T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} #> /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activemodel-3.2.8/lib/active_model/attribute_methods.rb:407:in `method_missing' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/attribute_methods.rb:149:in `method_missing' /home/ohu/koodi/gems/advert_selector/app/models/advert_selector/banner.rb:100:in `all_helper_items' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:44:in `advert_selector_banner_try' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:16: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' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `__send__' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `each' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:15:in `advert_selector_initialize' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/activesupport-3.2.8/lib/active_support/tagged_logging.rb:25:in `tagged' [AdvertSelector] Error with banner Coke in placement Leaderboard. 2012-09-28T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} #> /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activemodel-3.2.8/lib/active_model/attribute_methods.rb:407:in `method_missing' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/attribute_methods.rb:149:in `method_missing' /home/ohu/koodi/gems/advert_selector/app/models/advert_selector/banner.rb:100:in `all_helper_items' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:44:in `advert_selector_banner_try' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:16: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' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `__send__' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `each' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:15:in `advert_selector_initialize' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/activesupport-3.2.8/lib/active_support/tagged_logging.rb:25:in `tagged' [AdvertSelector] AdvertSelection finished Completed 200 OK in 7ms (Views: 6.7ms | 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" = 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.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.000427', "fast_mode" = 't' 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 "updated_at" = '2012-09-28 09:00:00.002625', "confirmed" = 'f' 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 Fri Sep 28 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-09-28 09:00:00.000242' 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] Error with banner Coke in placement Leaderboard. 2012-09-28T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} #> /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activemodel-3.2.8/lib/active_model/attribute_methods.rb:407:in `method_missing' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/attribute_methods.rb:149:in `method_missing' /home/ohu/koodi/gems/advert_selector/app/models/advert_selector/banner.rb:100:in `all_helper_items' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:44:in `advert_selector_banner_try' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:16: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' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `__send__' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `each' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:15:in `advert_selector_initialize' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/activesupport-3.2.8/lib/active_support/tagged_logging.rb:25:in `tagged' [AdvertSelector] AdvertSelection finished Completed 200 OK in 5ms (Views: 4.9ms | 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.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 "updated_at" = '2012-09-28 09:00:00.000428', "fast_mode" = 't' 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 "updated_at" = '2012-09-28 09:00:00.002614', "confirmed" = 'f' 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.2ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-09-28 09:00:00.001002', "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 Fri Sep 28 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-09-28 09:00:00.004059' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.004254' 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-09-28T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} #> /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activemodel-3.2.8/lib/active_model/attribute_methods.rb:407:in `method_missing' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/attribute_methods.rb:149:in `method_missing' /home/ohu/koodi/gems/advert_selector/app/models/advert_selector/banner.rb:100:in `all_helper_items' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:44:in `advert_selector_banner_try' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:16: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' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `__send__' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `each' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:15:in `advert_selector_initialize' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/activesupport-3.2.8/lib/active_support/tagged_logging.rb:25:in `tagged' [AdvertSelector] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.8ms | 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" = 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-09-28 09:00:00.002328' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.002511' 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 Pepsi in placement Leaderboard. 2012-09-28T12:00:00+03:00 - http://test.host/ - {"action"=>"index", "controller"=>"examples"} #> /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activemodel-3.2.8/lib/active_model/attribute_methods.rb:407:in `method_missing' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/attribute_methods.rb:149:in `method_missing' /home/ohu/koodi/gems/advert_selector/app/models/advert_selector/banner.rb:100:in `all_helper_items' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:44:in `advert_selector_banner_try' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:16: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' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `__send__' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `each' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:15:in `advert_selector_initialize' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/activesupport-3.2.8/lib/active_support/tagged_logging.rb:25:in `tagged' [AdvertSelector] Error with banner Coke in placement Leaderboard. 2012-09-28T12:00:00+03:00 - http://test.host/ - {"action"=>"index", "controller"=>"examples"} #> /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activemodel-3.2.8/lib/active_model/attribute_methods.rb:407:in `method_missing' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/attribute_methods.rb:149:in `method_missing' /home/ohu/koodi/gems/advert_selector/app/models/advert_selector/banner.rb:100:in `all_helper_items' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:44:in `advert_selector_banner_try' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:16: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' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `__send__' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `each' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:15:in `advert_selector_initialize' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/activesupport-3.2.8/lib/active_support/tagged_logging.rb:25:in `tagged' [AdvertSelector] AdvertSelection finished Completed 200 OK in 7ms (Views: 6.4ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 11:28:26', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:28:26', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:28:26', '2012-10-08 00:00:00', 't', '2012-09-28 11:28:26', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:28:26', '2012-10-08 00:00:00', 'f', '2012-09-28 11:28:26', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.3ms) 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-09-28 11:28:26', '2012-09-28 11:28:26', 960656439, 't', 394627963, '') 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-09-28 11:28:26', '2012-09-28 11:28:26', 929640376, 't', 814558298, '') 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-09-28 11:28:26', '2012-09-28 11:28:26', 281932184, 't', 207249520, '') 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-09-28 11:28:26', '2012-09-28 11:28:26', 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-09-28 11:28:26', '2012-09-28 11:28:26', '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-09-28 11:28:26', '2012-09-28 11:28:26', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-28 11:28:26', '2012-09-28 11:28:26', 'parade', 405688915)  (45.7ms) 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  (0.0ms) ROLLBACK TO 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.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-28 09:00:00.000081' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-28 09:00:00.001074' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.001200' 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-09-28 09:00:00.002072' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-09-28 09:00:00.002758' OR end_time IS NULL) AND (start_time < '2011-09-28 10:00:00.002866' 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.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.000914', "running_view_count" = 0 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 "updated_at" = '2012-09-28 09:00:00.006476', "running_view_count" = 551 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.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.000963', "running_view_count" = 0, "target_view_count" = 10 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 "updated_at" = '2012-09-28 09:00:00.004407', "running_view_count" = 10 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 "updated_at" = '2012-09-28 09:00:00.000425', "confirmed" = 'f' 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 "updated_at" = '2012-09-28 09:00:00.002372', "confirmed" = 't' 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.3ms) UPDATE "advert_selector_banners" SET "start_time" = '2012-09-27 21:00:00.000000', "end_time" = '2012-10-08 00:00:00.000000', "updated_at" = '2012-09-28 09:00:00.000803', "target_view_count" = 100 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 "updated_at" = '2012-09-28 09:00:00.002854', "running_view_count" = 0 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 Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 11:28:48', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:28:48', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:28:48', '2012-10-08 00:00:00', 't', '2012-09-28 11:28:48', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:28:48', '2012-10-08 00:00:00', 'f', '2012-09-28 11:28:48', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.3ms) 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-09-28 11:28:48', '2012-09-28 11:28:48', 960656439, 't', 394627963, '') 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-09-28 11:28:48', '2012-09-28 11:28:48', 929640376, 't', 814558298, '') 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-09-28 11:28:48', '2012-09-28 11:28:48', 281932184, 't', 207249520, '') 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-09-28 11:28:48', '2012-09-28 11:28:48', 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-09-28 11:28:48', '2012-09-28 11:28:48', '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-09-28 11:28:48', '2012-09-28 11:28:48', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-28 11:28:48', '2012-09-28 11:28:48', 'parade', 405688915)  (207.3ms) commit transaction  (0.2ms) 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.7ms) 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", nil], ["position", 2], ["updated_at", Fri, 28 Sep 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Fri, 28 Sep 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Fri, 28 Sep 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-09-28 09:00:00.000085' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-28 09:00:00.000924' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.001053' 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-09-28 09:00:00.002006' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-09-28 09:00:00.002708' OR end_time IS NULL) AND (start_time < '2011-09-28 10:00:00.002824' 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.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.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.000969', "running_view_count" = 0 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.1ms) 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 "updated_at" = '2012-09-28 09:00:00.006948', "running_view_count" = 551 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.2ms) 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 "target_view_count" = 10, "updated_at" = '2012-09-28 09:00:00.001031', "running_view_count" = 0 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 "updated_at" = '2012-09-28 09:00:00.004481', "running_view_count" = 10 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.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.000394', "confirmed" = 'f' 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 "updated_at" = '2012-09-28 09:00:00.002503', "confirmed" = 't' 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.3ms) UPDATE "advert_selector_banners" SET "target_view_count" = 100, "updated_at" = '2012-09-28 09:00:00.000833', "start_time" = '2012-09-27 21:00:00.000000', "end_time" = '2012-10-08 00:00:00.000000' 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 "updated_at" = '2012-09-28 09:00:00.002964', "running_view_count" = 0 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.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", 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 Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 11:28:54', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:28:54', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:28:54', '2012-10-08 00:00:00', 't', '2012-09-28 11:28:54', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:28:54', '2012-10-08 00:00:00', 'f', '2012-09-28 11:28:54', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.3ms) 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-09-28 11:28:54', '2012-09-28 11:28:54', 960656439, 't', 394627963, '') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "id", "content_for", "banner_id", "content") VALUES (1, 'banner_leaderboard', '2012-09-28 11:28:54', '2012-09-28 11:28:54', 929640376, 't', 814558298, '') 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-09-28 11:28:54', '2012-09-28 11:28:54', 281932184, 't', 207249520, '') 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-09-28 11:28:54', '2012-09-28 11:28:54', 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-09-28 11:28:54', '2012-09-28 11:28:54', '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-09-28 11:28:54', '2012-09-28 11:28:54', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-28 11:28:54', '2012-09-28 11:28:54', 'parade', 405688915)  (135.4ms) commit transaction  (0.0ms) 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]] 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.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items"  (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.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.3ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-09-28 09:00:00.001769', "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-09-28 09:00:00.003744', "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.1ms) 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.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.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 11:29:10', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:29:10', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:29:10', '2012-10-08 00:00:00', 't', '2012-09-28 11:29:10', 100, 394627963, 1000, 't', 0, '2012-09-28 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-09-28 11:29:10', '2012-10-08 00:00:00', 'f', '2012-09-28 11:29:10', 1000, 207249520, 1000, 't', 1, '2012-09-28 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-09-28 11:29:10', '2012-09-28 11:29:10', 960656439, 't', 394627963, '') 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-09-28 11:29:10', '2012-09-28 11:29:10', 929640376, 't', 814558298, '') 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-09-28 11:29:10', '2012-09-28 11:29:10', 281932184, 't', 207249520, '') 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-09-28 11:29:10', '2012-09-28 11:29:10', 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-09-28 11:29:10', '2012-09-28 11:29:10', '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-09-28 11:29:10', '2012-09-28 11:29:10', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-28 11:29:10', '2012-09-28 11:29:10', 'parade', 405688915)  (51.9ms) commit 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]] 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.1ms) 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.3ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = 'not_found,video', "updated_at" = '2012-09-28 09:00:00.001775' 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 "conflicting_placements_array" = '', "updated_at" = '2012-09-28 09:00:00.004398' 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.1ms) 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.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.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.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 11:29:23', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:29:23', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:29:23', '2012-10-08 00:00:00', 't', '2012-09-28 11:29:23', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:29:23', '2012-10-08 00:00:00', 'f', '2012-09-28 11:29:23', 1000, 207249520, 1000, 't', 1, '2012-09-28 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-09-28 11:29:23', '2012-09-28 11:29:23', 960656439, 't', 394627963, '') 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-09-28 11:29:23', '2012-09-28 11:29:23', 929640376, 't', 814558298, '') 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-09-28 11:29:23', '2012-09-28 11:29:23', 281932184, 't', 207249520, '') 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-09-28 11:29:23', '2012-09-28 11:29:23', 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-09-28 11:29:23', '2012-09-28 11:29:23', '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-09-28 11:29:23', '2012-09-28 11:29:23', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-28 11:29:23', '2012-09-28 11:29:23', 'parade', 405688915)  (225.6ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.7ms) 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", nil], ["position", 2], ["updated_at", Fri, 28 Sep 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Fri, 28 Sep 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Fri, 28 Sep 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-09-28 09:00:00.000086' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-28 09:00:00.000921' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.001054' 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-09-28 09:00:00.001935' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-09-28 09:00:00.002651' OR end_time IS NULL) AND (start_time < '2011-09-28 10:00:00.002769' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count)  (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) 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-09-28 09:00:00.000935' 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-09-28 09:00:00.007018' 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 "target_view_count" = 10, "running_view_count" = 0, "updated_at" = '2012-09-28 09:00:00.000919' 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-09-28 09:00:00.004414' 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.3ms) UPDATE "advert_selector_banners" SET "confirmed" = 'f', "updated_at" = '2012-09-28 09:00:00.000398' 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-09-28 09:00:00.002347' 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.3ms) UPDATE "advert_selector_banners" SET "target_view_count" = 100, "start_time" = '2012-09-27 21:00:00.000000', "updated_at" = '2012-09-28 09:00:00.000813', "end_time" = '2012-10-08 00:00:00.000000' 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" = 0, "updated_at" = '2012-09-28 09:00:00.002865' 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.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", 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", "end_time"=>"2012-10-08 00:00:00 UTC", "placement_id"=>"405688915", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-09-28 00:00:00 UTC"}}  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["end_time", Mon, 08 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", Fri, 28 Sep 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Fri, 28 Sep 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.9ms)  (0.1ms) 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.1ms) 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.4ms) 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.3ms) 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 5ms (ActiveRecord: 1.0ms)  (0.1ms) 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.1ms) 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 (128.2ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 145ms (Views: 143.2ms | ActiveRecord: 0.9ms)  (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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 11ms (Views: 9.9ms | 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]] 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 (19.0ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 27ms (Views: 26.1ms | 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]] 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.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  (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]] 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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 8ms (Views: 7.6ms | 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.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = 'not_found,video', "updated_at" = '2012-09-28 09:00:00.001647' 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 "conflicting_placements_array" = '', "updated_at" = '2012-09-28 09:00:00.003245' 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.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.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.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.1ms) SELECT COUNT(*) FROM "advert_selector_placements" Processing by AdvertSelector::PlacementsController#create as HTML Parameters: {"placement"=>{"name"=>"new placement"}}  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "advert_selector_placements" ("conflicting_placements_array", "created_at", "name", "only_once_per_session", "updated_at") VALUES (?, ?, ?, ?, ?) [["conflicting_placements_array", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Fri, 28 Sep 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.6ms)  (0.1ms) 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.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_placements"  Processing by AdvertSelector::PlacementsController#destroy as HTML Parameters: {"id"=>"405688915"} AdvertSelector::Placement Load (0.1ms) 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.3ms) 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.4ms)  (0.1ms) 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.1ms) 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 (8.2ms) Completed 500 Internal Server Error in 11ms  (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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 11ms (Views: 9.3ms | 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#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 (5.1ms) Completed 500 Internal Server Error in 7ms  (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", 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.1ms) 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 3ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.4ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]]  (0.1ms) rollback transaction  (0.1ms) 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.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.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-28 09:00:00.000449' 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-09-28 09:00:00.002664' 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 Fri Sep 28 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-09-28 09:00:00.006807' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.007013' 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-09-28T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} #> /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activemodel-3.2.8/lib/active_model/attribute_methods.rb:407:in `method_missing' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/attribute_methods.rb:149:in `method_missing' /home/ohu/koodi/gems/advert_selector/app/models/advert_selector/banner.rb:100:in `all_helper_items' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:44:in `advert_selector_banner_try' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:16: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' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `__send__' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `each' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:15:in `advert_selector_initialize' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/activesupport-3.2.8/lib/active_support/tagged_logging.rb:25:in `tagged' [AdvertSelector] AdvertSelection finished Completed 200 OK in 10ms (Views: 9.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  (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-09-28 09:00:00.000432' 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-09-28 09:00:00.002561' 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.3ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."banner_id" = 814558298 AND position >= 0) SQL (0.3ms) 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "raise_error"], ["position", 0], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.005060' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.005252' 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-09-28T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} #> /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activemodel-3.2.8/lib/active_model/attribute_methods.rb:407:in `method_missing' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/attribute_methods.rb:149:in `method_missing' /home/ohu/koodi/gems/advert_selector/app/models/advert_selector/banner.rb:100:in `all_helper_items' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:44:in `advert_selector_banner_try' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:16: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' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `__send__' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `each' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:15:in `advert_selector_initialize' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/activesupport-3.2.8/lib/active_support/tagged_logging.rb:25:in `tagged' [AdvertSelector] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.6ms | 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 Fri Sep 28 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"  CACHE (0.0ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 14ms (Views: 12.9ms | 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.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-28 09:00:00.000440' 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-09-28 09:00:00.002633' 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-09-28 09:00:00.000308' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.003268' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.003452' 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-09-28T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} #> /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activemodel-3.2.8/lib/active_model/attribute_methods.rb:407:in `method_missing' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/attribute_methods.rb:149:in `method_missing' /home/ohu/koodi/gems/advert_selector/app/models/advert_selector/banner.rb:100:in `all_helper_items' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:44:in `advert_selector_banner_try' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:16: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' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `__send__' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `each' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:15:in `advert_selector_initialize' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/activesupport-3.2.8/lib/active_support/tagged_logging.rb:25:in `tagged' [AdvertSelector] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.6ms | 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.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-09-28 09:00:00.000443' 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-09-28 09:00:00.002679' 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 Fri Sep 28 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-09-28 09:00:00.002231' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.002411' 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-09-28T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} #> /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activemodel-3.2.8/lib/active_model/attribute_methods.rb:407:in `method_missing' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/attribute_methods.rb:149:in `method_missing' /home/ohu/koodi/gems/advert_selector/app/models/advert_selector/banner.rb:100:in `all_helper_items' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:44:in `advert_selector_banner_try' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:16: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' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `__send__' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `each' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:15:in `advert_selector_initialize' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/activesupport-3.2.8/lib/active_support/tagged_logging.rb:25:in `tagged' [AdvertSelector] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.6ms | 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" = 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 Fri Sep 28 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 Completed 500 Internal Server Error in 3ms  (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-09-28 09:00:00.000452' 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-09-28 09:00:00.002757' 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-09-28 09:00:00.000456' 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 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.004105' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.004302' 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 parade_banner in placement Parade. 2012-09-28T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} #> /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activemodel-3.2.8/lib/active_model/attribute_methods.rb:407:in `method_missing' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/attribute_methods.rb:149:in `method_missing' /home/ohu/koodi/gems/advert_selector/app/models/advert_selector/banner.rb:100:in `all_helper_items' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:44:in `advert_selector_banner_try' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:16: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' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `__send__' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `each' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:15:in `advert_selector_initialize' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/activesupport-3.2.8/lib/active_support/tagged_logging.rb:25:in `tagged' [AdvertSelector] Error with banner Coke in placement Leaderboard. 2012-09-28T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} #> /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activemodel-3.2.8/lib/active_model/attribute_methods.rb:407:in `method_missing' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/attribute_methods.rb:149:in `method_missing' /home/ohu/koodi/gems/advert_selector/app/models/advert_selector/banner.rb:100:in `all_helper_items' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:44:in `advert_selector_banner_try' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:16: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' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `__send__' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `each' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:15:in `advert_selector_initialize' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/activesupport-3.2.8/lib/active_support/tagged_logging.rb:25:in `tagged' [AdvertSelector] AdvertSelection finished Completed 200 OK in 7ms (Views: 6.7ms | 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" = 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.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-28 09:00:00.000429' 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-09-28 09:00:00.002590' 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-09-28 09:00:00.000460' 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 "conflicting_placements_array" = '', "updated_at" = '2012-09-28 09:00:00.002746' 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 "conflicting_placements_array" = '', "updated_at" = '2012-09-28 09:00:00.004077' 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 "conflicting_placements_array" = '', "updated_at" = '2012-09-28 09:00:00.005758' 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 Fri Sep 28 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-09-28 09:00:00.009281' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.009464' 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 parade_banner in placement Parade. 2012-09-28T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} #> /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activemodel-3.2.8/lib/active_model/attribute_methods.rb:407:in `method_missing' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/attribute_methods.rb:149:in `method_missing' /home/ohu/koodi/gems/advert_selector/app/models/advert_selector/banner.rb:100:in `all_helper_items' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:44:in `advert_selector_banner_try' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:16: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' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `__send__' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `each' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:15:in `advert_selector_initialize' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/activesupport-3.2.8/lib/active_support/tagged_logging.rb:25:in `tagged' [AdvertSelector] Error with banner Coke in placement Leaderboard. 2012-09-28T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} #> /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activemodel-3.2.8/lib/active_model/attribute_methods.rb:407:in `method_missing' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/attribute_methods.rb:149:in `method_missing' /home/ohu/koodi/gems/advert_selector/app/models/advert_selector/banner.rb:100:in `all_helper_items' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:44:in `advert_selector_banner_try' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:16: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' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `__send__' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `each' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:15:in `advert_selector_initialize' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/activesupport-3.2.8/lib/active_support/tagged_logging.rb:25:in `tagged' [AdvertSelector] AdvertSelection finished Completed 200 OK in 7ms (Views: 6.7ms | 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" = 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.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.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-28 09:00:00.000433' 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-09-28 09:00:00.002604' 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 Fri Sep 28 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-09-28 09:00:00.000280' 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] Error with banner Coke in placement Leaderboard. 2012-09-28T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} #> /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activemodel-3.2.8/lib/active_model/attribute_methods.rb:407:in `method_missing' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/attribute_methods.rb:149:in `method_missing' /home/ohu/koodi/gems/advert_selector/app/models/advert_selector/banner.rb:100:in `all_helper_items' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:44:in `advert_selector_banner_try' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:16: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' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `__send__' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `each' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:15:in `advert_selector_initialize' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/activesupport-3.2.8/lib/active_support/tagged_logging.rb:25:in `tagged' [AdvertSelector] AdvertSelection finished Completed 200 OK in 5ms (Views: 5.0ms | 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" = 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-09-28 09:00:00.000432' 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-09-28 09:00:00.002912' 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.2ms) UPDATE "advert_selector_placements" SET "only_once_per_session" = 't', "updated_at" = '2012-09-28 09:00:00.001069' WHERE "advert_selector_placements"."id" = 405688915  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.004196' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.004392' 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-09-28T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} #> /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activemodel-3.2.8/lib/active_model/attribute_methods.rb:407:in `method_missing' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/attribute_methods.rb:149:in `method_missing' /home/ohu/koodi/gems/advert_selector/app/models/advert_selector/banner.rb:100:in `all_helper_items' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:44:in `advert_selector_banner_try' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:16: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' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `__send__' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `each' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:15:in `advert_selector_initialize' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/activesupport-3.2.8/lib/active_support/tagged_logging.rb:25:in `tagged' [AdvertSelector] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.7ms | 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.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-09-28 09:00:00.002433' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.002640' 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 Pepsi in placement Leaderboard. 2012-09-28T12:00:00+03:00 - http://test.host/ - {"action"=>"index", "controller"=>"examples"} #> /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activemodel-3.2.8/lib/active_model/attribute_methods.rb:407:in `method_missing' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/attribute_methods.rb:149:in `method_missing' /home/ohu/koodi/gems/advert_selector/app/models/advert_selector/banner.rb:100:in `all_helper_items' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:44:in `advert_selector_banner_try' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:16: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' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `__send__' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `each' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:15:in `advert_selector_initialize' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/activesupport-3.2.8/lib/active_support/tagged_logging.rb:25:in `tagged' [AdvertSelector] Error with banner Coke in placement Leaderboard. 2012-09-28T12:00:00+03:00 - http://test.host/ - {"action"=>"index", "controller"=>"examples"} #> /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activemodel-3.2.8/lib/active_model/attribute_methods.rb:407:in `method_missing' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/attribute_methods.rb:149:in `method_missing' /home/ohu/koodi/gems/advert_selector/app/models/advert_selector/banner.rb:100:in `all_helper_items' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:44:in `advert_selector_banner_try' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:16: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' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `__send__' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `each' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:15:in `advert_selector_initialize' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/activesupport-3.2.8/lib/active_support/tagged_logging.rb:25:in `tagged' [AdvertSelector] AdvertSelection finished Completed 200 OK in 7ms (Views: 6.7ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.3ms) 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-09-28 11:29:54', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:29:54', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:29:54', '2012-10-08 00:00:00', 't', '2012-09-28 11:29:54', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:29:54', '2012-10-08 00:00:00', 'f', '2012-09-28 11:29:54', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.3ms) 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-09-28 11:29:54', '2012-09-28 11:29:54', 960656439, 't', 394627963, '') 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-09-28 11:29:54', '2012-09-28 11:29:54', 929640376, 't', 814558298, '') 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-09-28 11:29:54', '2012-09-28 11:29:54', 281932184, 't', 207249520, '') 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-09-28 11:29:54', '2012-09-28 11:29:54', 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-09-28 11:29:54', '2012-09-28 11:29:54', '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-09-28 11:29:54', '2012-09-28 11:29:54', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-28 11:29:54', '2012-09-28 11:29:54', 'parade', 405688915)  (44.1ms) commit transaction  (0.0ms) 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.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.000890', "fast_mode" = 't' 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.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.015025', "confirmed" = 'f' 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 Fri Sep 28 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-09-28 09:00:00.029802' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.030011' 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] Error with banner Coke in placement Leaderboard. 2012-09-28T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} #> /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activemodel-3.2.8/lib/active_model/attribute_methods.rb:407:in `method_missing' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/attribute_methods.rb:149:in `method_missing' /home/ohu/koodi/gems/advert_selector/app/models/advert_selector/banner.rb:100:in `all_helper_items' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:44:in `advert_selector_banner_try' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:16: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' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `__send__' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `each' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:15:in `advert_selector_initialize' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/activesupport-3.2.8/lib/active_support/tagged_logging.rb:25:in `tagged' [AdvertSelector] AdvertSelection finished Rendered examples/index.html.erb within layouts/application (15.0ms) Completed 200 OK in 20ms (Views: 19.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" = 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 "updated_at" = '2012-09-28 09:00:00.000414', "fast_mode" = 't' 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 "updated_at" = '2012-09-28 09:00:00.002456', "confirmed" = 'f' 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.3ms) 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "raise_error"], ["position", 0], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.009354' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.009539' 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-09-28T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} #> /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activemodel-3.2.8/lib/active_model/attribute_methods.rb:407:in `method_missing' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/attribute_methods.rb:149:in `method_missing' /home/ohu/koodi/gems/advert_selector/app/models/advert_selector/banner.rb:100:in `all_helper_items' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:44:in `advert_selector_banner_try' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:16: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' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `__send__' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `each' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:15:in `advert_selector_initialize' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/activesupport-3.2.8/lib/active_support/tagged_logging.rb:25:in `tagged' [AdvertSelector] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.8ms | 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 Fri Sep 28 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"  CACHE (0.0ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 19ms (Views: 17.7ms | 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.000441', "fast_mode" = 't' 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 "updated_at" = '2012-09-28 09:00:00.002637', "confirmed" = 'f' 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 "updated_at" = '2012-09-28 09:00:00.004395', "frequency" = 2 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.007455' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.007649' 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-09-28T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} #> /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activemodel-3.2.8/lib/active_model/attribute_methods.rb:407:in `method_missing' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/attribute_methods.rb:149:in `method_missing' /home/ohu/koodi/gems/advert_selector/app/models/advert_selector/banner.rb:100:in `all_helper_items' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:44:in `advert_selector_banner_try' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:16: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' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `__send__' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `each' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:15:in `advert_selector_initialize' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/activesupport-3.2.8/lib/active_support/tagged_logging.rb:25:in `tagged' [AdvertSelector] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.7ms | 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.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 "updated_at" = '2012-09-28 09:00:00.000428', "fast_mode" = 't' 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 "updated_at" = '2012-09-28 09:00:00.002681', "confirmed" = 'f' 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 Fri Sep 28 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-09-28 09:00:00.006544' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.006738' 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-09-28T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} #> /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activemodel-3.2.8/lib/active_model/attribute_methods.rb:407:in `method_missing' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/attribute_methods.rb:149:in `method_missing' /home/ohu/koodi/gems/advert_selector/app/models/advert_selector/banner.rb:100:in `all_helper_items' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:44:in `advert_selector_banner_try' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:16: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' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `__send__' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `each' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:15:in `advert_selector_initialize' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/activesupport-3.2.8/lib/active_support/tagged_logging.rb:25:in `tagged' [AdvertSelector] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.6ms | 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" = 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 Fri Sep 28 12:00:00 +0300 2012 Processing by ExamplesController#index as HTML Parameters: {"advert_selector_force"=>"207249520"} [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = 207249520 LIMIT 1 [AdvertSelector] AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = 718799085 LIMIT 1 Completed 500 Internal Server Error in 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.000436', "fast_mode" = 't' 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 "updated_at" = '2012-09-28 09:00:00.002640', "confirmed" = 'f' 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 "updated_at" = '2012-09-28 09:00:00.004684', "confirmed" = 't' 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 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.009963' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.010154' 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] Error with banner parade_banner in placement Parade. 2012-09-28T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} #> /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activemodel-3.2.8/lib/active_model/attribute_methods.rb:407:in `method_missing' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/attribute_methods.rb:149:in `method_missing' /home/ohu/koodi/gems/advert_selector/app/models/advert_selector/banner.rb:100:in `all_helper_items' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:44:in `advert_selector_banner_try' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:16: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' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `__send__' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `each' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:15:in `advert_selector_initialize' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/activesupport-3.2.8/lib/active_support/tagged_logging.rb:25:in `tagged' [AdvertSelector] Error with banner Coke in placement Leaderboard. 2012-09-28T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} #> /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activemodel-3.2.8/lib/active_model/attribute_methods.rb:407:in `method_missing' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/attribute_methods.rb:149:in `method_missing' /home/ohu/koodi/gems/advert_selector/app/models/advert_selector/banner.rb:100:in `all_helper_items' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:44:in `advert_selector_banner_try' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:16: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' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `__send__' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `each' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:15:in `advert_selector_initialize' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/activesupport-3.2.8/lib/active_support/tagged_logging.rb:25:in `tagged' [AdvertSelector] AdvertSelection finished Completed 200 OK in 10ms (Views: 8.9ms | ActiveRecord: 0.5ms) 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  (0.2ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]]  (0.1ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.000686', "fast_mode" = 't' 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 "updated_at" = '2012-09-28 09:00:00.003854', "confirmed" = 'f' 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 "updated_at" = '2012-09-28 09:00:00.006474', "confirmed" = 't' 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-09-28 09:00:00.009970', "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-09-28 09:00:00.011967', "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-09-28 09:00:00.014386', "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 Fri Sep 28 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-09-28 09:00:00.018949' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.019156' 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 parade_banner in placement Parade. 2012-09-28T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} #> /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activemodel-3.2.8/lib/active_model/attribute_methods.rb:407:in `method_missing' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/attribute_methods.rb:149:in `method_missing' /home/ohu/koodi/gems/advert_selector/app/models/advert_selector/banner.rb:100:in `all_helper_items' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:44:in `advert_selector_banner_try' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:16: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' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `__send__' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `each' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:15:in `advert_selector_initialize' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/activesupport-3.2.8/lib/active_support/tagged_logging.rb:25:in `tagged' [AdvertSelector] Error with banner Coke in placement Leaderboard. 2012-09-28T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} #> /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activemodel-3.2.8/lib/active_model/attribute_methods.rb:407:in `method_missing' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/attribute_methods.rb:149:in `method_missing' /home/ohu/koodi/gems/advert_selector/app/models/advert_selector/banner.rb:100:in `all_helper_items' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:44:in `advert_selector_banner_try' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:16: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' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `__send__' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `each' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:15:in `advert_selector_initialize' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/activesupport-3.2.8/lib/active_support/tagged_logging.rb:25:in `tagged' [AdvertSelector] AdvertSelection finished Completed 200 OK in 7ms (Views: 6.9ms | 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" = 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.4ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.000527', "fast_mode" = 't' 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 "updated_at" = '2012-09-28 09:00:00.003147', "confirmed" = 'f' 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 Fri Sep 28 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-09-28 09:00:00.005339' OR end_time IS NULL) 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] Error with banner Coke in placement Leaderboard. 2012-09-28T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} #> /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activemodel-3.2.8/lib/active_model/attribute_methods.rb:407:in `method_missing' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/attribute_methods.rb:149:in `method_missing' /home/ohu/koodi/gems/advert_selector/app/models/advert_selector/banner.rb:100:in `all_helper_items' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:44:in `advert_selector_banner_try' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:16: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' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `__send__' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `each' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:15:in `advert_selector_initialize' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/activesupport-3.2.8/lib/active_support/tagged_logging.rb:25:in `tagged' [AdvertSelector] AdvertSelection finished Completed 200 OK in 7ms (Views: 6.1ms | ActiveRecord: 0.5ms) 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.2ms) rollback transaction  (0.1ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]]  (0.1ms) SAVEPOINT active_record_1  (0.5ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.000697', "fast_mode" = 't' WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.2ms) 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.1ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.005243', "confirmed" = 'f' 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 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.2ms) UPDATE "advert_selector_placements" SET "only_once_per_session" = 't', "updated_at" = '2012-09-28 09:00:00.009789' WHERE "advert_selector_placements"."id" = 405688915  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.013366' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.013594' 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-09-28T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} #> /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activemodel-3.2.8/lib/active_model/attribute_methods.rb:407:in `method_missing' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/attribute_methods.rb:149:in `method_missing' /home/ohu/koodi/gems/advert_selector/app/models/advert_selector/banner.rb:100:in `all_helper_items' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:44:in `advert_selector_banner_try' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:16: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' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `__send__' /home/ohu/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `each' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:15:in `advert_selector_initialize' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/gems/activesupport-3.2.8/lib/active_support/tagged_logging.rb:25:in `tagged' [AdvertSelector] AdvertSelection finished Completed 200 OK in 7ms (Views: 6.6ms | 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" = 814558298 AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.3ms) 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-09-28 11:32:08', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:32:08', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:32:08', '2012-10-08 00:00:00', 't', '2012-09-28 11:32:08', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:32:08', '2012-10-08 00:00:00', 'f', '2012-09-28 11:32:08', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.3ms) 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-09-28 11:32:08', '2012-09-28 11:32:08', 960656439, 't', 394627963, '') 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-09-28 11:32:08', '2012-09-28 11:32:08', 929640376, 't', 814558298, '') 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-09-28 11:32:08', '2012-09-28 11:32:08', 281932184, 't', 207249520, '') 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-09-28 11:32:08', '2012-09-28 11:32:08', 435138789, 'f', 394627963, 'pepsi=true') Fixture Delete (0.1ms) DELETE FROM "advert_selector_placements" Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Parade', '2012-09-28 11:32:08', '2012-09-28 11:32:08', '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-09-28 11:32:08', '2012-09-28 11:32:08', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-28 11:32:08', '2012-09-28 11:32:08', 'parade', 405688915)  (39.5ms) commit transaction  (0.0ms) 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.0ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.000861', "fast_mode" = 't' 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.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.016874', "confirmed" = 'f' 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 Fri Sep 28 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-09-28 09:00:00.033972' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.034187' 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 Rendered examples/index.html.erb within layouts/application (16.4ms) Completed 200 OK in 23ms (Views: 21.8ms | 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" = 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 "updated_at" = '2012-09-28 09:00:00.000499', "fast_mode" = 't' 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 "updated_at" = '2012-09-28 09:00:00.002938', "confirmed" = 'f' 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.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."banner_id" = 814558298 AND position >= 0) SQL (0.4ms) 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "raise_error"], ["position", 0], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.012112' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.012396' 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-09-28T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /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:48:in `send' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:48: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:44:in `advert_selector_banner_try' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:16: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 8ms (Views: 7.8ms | 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" = 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 Fri Sep 28 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"  CACHE (0.0ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 22ms (Views: 20.6ms | 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.000429', "fast_mode" = 't' 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 "updated_at" = '2012-09-28 09:00:00.002747', "confirmed" = 'f' 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-09-28 09:00:00.004761' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.007894' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.008103' 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 7ms (Views: 6.2ms | 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" = 814558298 AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.023359' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.023685' 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 7ms (Views: 6.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 Mon Oct 01 12:00:00 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 2ms (Views: 1.5ms | 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-01 09:00:00.000446', "fast_mode" = 't' 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 "updated_at" = '2012-10-01 09:00:00.002753', "confirmed" = 'f' 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 Mon Oct 01 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-01 09:00:00.006987' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.007188' 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 7ms (Views: 6.7ms | 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 Started GET "/?advert_selector_force=207249520" for 127.0.0.1 at Mon Oct 01 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 Completed 500 Internal Server Error in 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]]  (0.1ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-01 09:00:00.000564', "fast_mode" = 't' 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 "updated_at" = '2012-10-01 09:00:00.002949', "confirmed" = 'f' 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.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-01 09:00:00.005420', "confirmed" = 't' WHERE "advert_selector_banners"."id" = 207249520 AdvertSelector::HelperItem Load (0.2ms) 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 Started GET "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.010546' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.010762' 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] AdvertSelection finished Completed 200 OK in 7ms (Views: 6.5ms | 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 Started GET "/" for 127.0.0.1 at Mon Oct 01 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.7ms | 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" = 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.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 "updated_at" = '2012-10-01 09:00:00.000464', "fast_mode" = 't' WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.2ms) 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.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-01 09:00:00.003271', "confirmed" = 'f' 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.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-01 09:00:00.006623', "confirmed" = 't' 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 "conflicting_placements_array" = '', "updated_at" = '2012-10-01 09:00:00.010959' WHERE "advert_selector_placements"."id" = 718799085 AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE (LOWER(name) = 'leaderboard') LIMIT 1  (0.1ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = '', "updated_at" = '2012-10-01 09:00:00.013168' 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 "conflicting_placements_array" = '', "updated_at" = '2012-10-01 09:00:00.016386' 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 Mon Oct 01 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-01 09:00:00.020784' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.020990' 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 7ms (Views: 6.8ms | 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" = 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 "updated_at" = '2012-10-01 09:00:00.000441', "fast_mode" = 't' 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 "updated_at" = '2012-10-01 09:00:00.002726', "confirmed" = 'f' 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 Mon Oct 01 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-01 09:00:00.004673' 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.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.6ms | 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" = 814558298 AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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.6ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Mon Oct 01 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.5ms | 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.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-01 09:00:00.000420', "fast_mode" = 't' 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 "updated_at" = '2012-10-01 09:00:00.002729', "confirmed" = 'f' 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.2ms) UPDATE "advert_selector_placements" SET "only_once_per_session" = 't', "updated_at" = '2012-10-01 09:00:00.005581' WHERE "advert_selector_placements"."id" = 405688915  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.008779' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.008978' 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.8ms | 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" = 814558298 AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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.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 Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 11:33:02', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:33:02', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:33:02', '2012-10-08 00:00:00', 't', '2012-09-28 11:33:02', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:33:02', '2012-10-08 00:00:00', 'f', '2012-09-28 11:33:02', 1000, 207249520, 1000, 't', 1, '2012-09-28 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-09-28 11:33:02', '2012-09-28 11:33:02', 960656439, 't', 394627963, '') 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-09-28 11:33:02', '2012-09-28 11:33:02', 929640376, 't', 814558298, '') 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-09-28 11:33:02', '2012-09-28 11:33:02', 281932184, 't', 207249520, '') 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-09-28 11:33:02', '2012-09-28 11:33:02', 435138789, 'f', 394627963, 'pepsi=true') Fixture Delete (0.1ms) DELETE FROM "advert_selector_placements" Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Parade', '2012-09-28 11:33:02', '2012-09-28 11:33:02', '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-09-28 11:33:02', '2012-09-28 11:33:02', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-28 11:33:02', '2012-09-28 11:33:02', 'parade', 405688915)  (46.2ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.9ms) 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.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.000780', "fast_mode" = 't' 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 "updated_at" = '2012-09-28 09:00:00.015121', "confirmed" = 'f' 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 Fri Sep 28 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-09-28 09:00:00.030350' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.030686' 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 Rendered examples/index.html.erb within layouts/application (14.9ms) Completed 200 OK in 20ms (Views: 19.6ms | 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" = 814558298 AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."banner_id" = 814558298 AND position >= 0) SQL (0.3ms) 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "always_false"], ["position", 0], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.052828' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.053010' 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 Rendered examples/index.html.erb within layouts/application (3.6ms) Completed 200 OK in 5ms (Views: 4.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" = 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 "updated_at" = '2012-09-28 09:00:00.000424', "fast_mode" = 't' 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 "updated_at" = '2012-09-28 09:00:00.002424', "confirmed" = 'f' 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.3ms) 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "raise_error"], ["position", 0], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.008546' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.008831' 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-09-28T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /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:48:in `send' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:48: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:44:in `advert_selector_banner_try' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:16: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 7ms (Views: 6.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 Started GET "/advert_selector/placements" for 127.0.0.1 at Fri Sep 28 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"  CACHE (0.0ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 19ms (Views: 17.9ms | 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.000418', "fast_mode" = 't' 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 "updated_at" = '2012-09-28 09:00:00.002728', "confirmed" = 'f' 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 "updated_at" = '2012-09-28 09:00:00.004677', "frequency" = 2 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.008183' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.008418' 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 7ms (Views: 6.0ms | 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 Mon Oct 01 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-01 09:00:00.022715' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.022902' 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 Mon Oct 01 12:00:00 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 2ms (Views: 1.5ms | 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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-01 09:00:00.000424', "fast_mode" = 't' 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 "updated_at" = '2012-10-01 09:00:00.002490', "confirmed" = 'f' 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 Mon Oct 01 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-01 09:00:00.006230' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.006412' 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.8ms | 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 Started GET "/?advert_selector_force=207249520" for 127.0.0.1 at Mon Oct 01 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 finished Completed 200 OK in 6ms (Views: 5.3ms | 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" = 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 "updated_at" = '2012-10-01 09:00:00.000455', "fast_mode" = 't' 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 "updated_at" = '2012-10-01 09:00:00.002493', "confirmed" = 'f' 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 "updated_at" = '2012-10-01 09:00:00.004291', "confirmed" = 't' 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 Started GET "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.008413' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.008612' 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] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.7ms | 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" = 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 Mon Oct 01 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.9ms | 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" = 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.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-01 09:00:00.000404', "fast_mode" = 't' 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 "updated_at" = '2012-10-01 09:00:00.002443', "confirmed" = 'f' 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 "updated_at" = '2012-10-01 09:00:00.004232', "confirmed" = 't' 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-01 09:00:00.007350', "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-01 09:00:00.009129', "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-01 09:00:00.010989', "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 Mon Oct 01 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-01 09:00:00.014479' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.014643' 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 7ms (Views: 6.6ms | 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" = 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 "updated_at" = '2012-10-01 09:00:00.000409', "fast_mode" = 't' 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 "updated_at" = '2012-10-01 09:00:00.002419', "confirmed" = 'f' 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 Mon Oct 01 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-01 09:00:00.003924' 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 6ms (Views: 5.6ms | 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" = 814558298 AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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.4ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Mon Oct 01 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: 3.2ms | 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.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-01 09:00:00.000408', "fast_mode" = 't' 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 "updated_at" = '2012-10-01 09:00:00.002468', "confirmed" = 'f' 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.2ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-10-01 09:00:00.004892', "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 Mon Oct 01 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-01 09:00:00.009002' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.009200' 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 Mon Oct 01 12:00:00 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 2ms (Views: 1.5ms | 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 Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.5ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 11:33:07', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:33:07', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:33:07', '2012-10-08 00:00:00', 't', '2012-09-28 11:33:07', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:33:07', '2012-10-08 00:00:00', 'f', '2012-09-28 11:33:07', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.3ms) 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-09-28 11:33:07', '2012-09-28 11:33:07', 960656439, 't', 394627963, '') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "id", "content_for", "banner_id", "content") VALUES (1, 'banner_leaderboard', '2012-09-28 11:33:07', '2012-09-28 11:33:07', 929640376, 't', 814558298, '') 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-09-28 11:33:07', '2012-09-28 11:33:07', 281932184, 't', 207249520, '') 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-09-28 11:33:07', '2012-09-28 11:33:07', 435138789, 'f', 394627963, 'pepsi=true') Fixture Delete (0.1ms) DELETE FROM "advert_selector_placements" Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Parade', '2012-09-28 11:33:07', '2012-09-28 11:33:07', '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-09-28 11:33:07', '2012-09-28 11:33:07', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-28 11:33:07', '2012-09-28 11:33:07', 'parade', 405688915)  (35.9ms) commit 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) 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.7ms) 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", nil], ["position", 2], ["updated_at", Fri, 28 Sep 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Fri, 28 Sep 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Fri, 28 Sep 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-09-28 09:00:00.000085' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-28 09:00:00.000998' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.001179' 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-09-28 09:00:00.002121' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-09-28 09:00:00.002874' OR end_time IS NULL) AND (start_time < '2011-09-28 10:00:00.002991' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count)  (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) 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 "updated_at" = '2012-09-28 09:00:00.001091', "running_view_count" = 0 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.1ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.008002', "running_view_count" = 551 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 "target_view_count" = 10, "updated_at" = '2012-09-28 09:00:00.000927', "running_view_count" = 0 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 "updated_at" = '2012-09-28 09:00:00.004442', "running_view_count" = 10 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 AdvertSelector::Banner Load (0.1ms) 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.3ms) UPDATE "advert_selector_banners" SET "confirmed" = 'f', "updated_at" = '2012-09-28 09:00:00.000402' 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-09-28 09:00:00.002452' 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.4ms) UPDATE "advert_selector_banners" SET "target_view_count" = 100, "start_time" = '2012-09-27 21:00:00.000000', "updated_at" = '2012-09-28 09:00:00.000935', "end_time" = '2012-10-08 00:00:00.000000' 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 "updated_at" = '2012-09-28 09:00:00.003579', "running_view_count" = 0 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-08 00:00:00 UTC", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-09-28 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["end_time", Mon, 08 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", Fri, 28 Sep 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Fri, 28 Sep 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.8ms)  (0.1ms) 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.1ms) SELECT COUNT(*) FROM "advert_selector_banners" Processing by AdvertSelector::BannersController#destroy 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"]]  (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 (129.2ms) 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" 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 Completed 200 OK in 146ms (Views: 144.7ms | ActiveRecord: 1.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#index as HTML AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners"  AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 12ms (Views: 11.1ms | 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]] 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 (20.8ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 29ms (Views: 28.3ms | 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.3ms)  (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.1ms) 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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 8ms (Views: 7.3ms | 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.2ms) rollback transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.3ms) 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.1ms) 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.3ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = 'not_found,video', "updated_at" = '2012-09-28 09:00:00.001652' 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 "conflicting_placements_array" = '', "updated_at" = '2012-09-28 09:00:00.003272' 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.1ms) 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.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.1ms) 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.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]] 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.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.1ms) 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.5ms) INSERT INTO "advert_selector_placements" ("conflicting_placements_array", "created_at", "name", "only_once_per_session", "updated_at") VALUES (?, ?, ?, ?, ?) [["conflicting_placements_array", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Fri, 28 Sep 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.1ms) SELECT COUNT(*) FROM "advert_selector_placements"  Processing by AdvertSelector::PlacementsController#destroy as HTML Parameters: {"id"=>"405688915"} AdvertSelector::Placement Load (0.1ms) 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.3ms) 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.4ms)  (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 (7.2ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 17ms (Views: 15.3ms | 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.1ms) 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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 11ms (Views: 9.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#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.9ms) 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" 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 Completed 200 OK in 13ms (Views: 12.2ms | 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.1ms) 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 0ms (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.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", "405688915"]]  (0.1ms) 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.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.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-09-28 09:00:00.000430' 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-09-28 09:00:00.002663' 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 Fri Sep 28 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-09-28 09:00:00.007262' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.007473' 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.5ms | 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" = 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.3ms) 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "always_false"], ["position", 0], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.021735' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.021922' 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 5ms (Views: 4.3ms | 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.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-09-28 09:00:00.000554' 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-09-28 09:00:00.002937' 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "raise_error"], ["position", 0], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.004396' OR end_time IS NULL) AND (start_time < '2012-09-28 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.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] Error with banner Coke in placement Leaderboard. 2012-09-28T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /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:48:in `send' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:48: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:44:in `advert_selector_banner_try' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:16: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.6ms | 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 Fri Sep 28 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"  CACHE (0.0ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 15ms (Views: 14.1ms | ActiveRecord: 0.5ms)  (0.2ms) 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-09-28 09:00:00.000420' 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-09-28 09:00:00.002879' 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-09-28 09:00:00.000331' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.003422' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.003613' 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.6ms | 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 Mon Oct 01 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-01 09:00:00.017960' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.018150' 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.7ms | 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 Mon Oct 01 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.1ms) 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-01 09:00:00.000405' 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-01 09:00:00.002849' 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 Mon Oct 01 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-01 09:00:00.002335' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.002506' 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.3ms | 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" = 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 Mon Oct 01 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 finished Completed 200 OK in 6ms (Views: 5.4ms | 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" = 207249520 AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1  (0.2ms) 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.4ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-01 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-01 09:00:00.002640' 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-01 09:00:00.000478' 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 Started GET "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.004237' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.004479' 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] AdvertSelection finished Completed 200 OK in 7ms (Views: 6.0ms | 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" = 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 Mon Oct 01 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.6ms | 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" = 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.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-01 09:00:00.000410' 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-01 09:00:00.002615' 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-01 09:00:00.000782' 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 "conflicting_placements_array" = '', "updated_at" = '2012-10-01 09:00:00.003863' 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 "conflicting_placements_array" = '', "updated_at" = '2012-10-01 09:00:00.005683' 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 "conflicting_placements_array" = '', "updated_at" = '2012-10-01 09:00:00.007845' 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.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.012605' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.012819' 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.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" = 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-01 09:00:00.000412' 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-01 09:00:00.002686' 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 Mon Oct 01 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-01 09:00:00.000258' 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.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 "/" for 127.0.0.1 at Mon Oct 01 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 Mon Oct 01 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.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-01 09:00:00.000414' WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.3ms) 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.1ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_banners" SET "confirmed" = 'f', "updated_at" = '2012-10-01 09:00:00.005454' WHERE "advert_selector_banners"."id" = 394627963 AdvertSelector::HelperItem Load (0.3ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 394627963 ORDER BY position  (0.1ms) RELEASE SAVEPOINT active_record_1 AdvertSelector::Placement Load (0.3ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = 405688915 LIMIT 1  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_placements" SET "only_once_per_session" = 't', "updated_at" = '2012-10-01 09:00:00.002899' WHERE "advert_selector_placements"."id" = 405688915  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.006296' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.006532' 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 Mon Oct 01 12:00:00 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 2ms (Views: 1.5ms | 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]] 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-01 09:00:00.002343' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.002528' 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.5ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 11:39:27', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:39:27', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:39:27', '2012-10-08 00:00:00', 't', '2012-09-28 11:39:27', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:39:27', '2012-10-08 00:00:00', 'f', '2012-09-28 11:39:27', 1000, 207249520, 1000, 't', 1, '2012-09-28 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-09-28 11:39:27', '2012-09-28 11:39:27', 960656439, 't', 394627963, '') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "id", "content_for", "banner_id", "content") VALUES (1, 'banner_leaderboard', '2012-09-28 11:39:27', '2012-09-28 11:39:27', 929640376, 't', 814558298, '') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "id", "content_for", "banner_id", "content") VALUES ('banner_parade', 1, '2012-09-28 11:39:27', '2012-09-28 11:39:27', 281932184, 't', 207249520, '') 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-09-28 11:39:27', '2012-09-28 11:39:27', 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-09-28 11:39:27', '2012-09-28 11:39:27', '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-09-28 11:39:27', '2012-09-28 11:39:27', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-28 11:39:27', '2012-09-28 11:39:27', 'parade', 405688915)  (45.0ms) commit 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) 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.6ms) 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", nil], ["position", 2], ["updated_at", Fri, 28 Sep 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Fri, 28 Sep 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Fri, 28 Sep 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-09-28 09:00:00.000076' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-28 09:00:00.000938' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.001056' 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-09-28 09:00:00.001924' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-09-28 09:00:00.002621' OR end_time IS NULL) AND (start_time < '2011-09-28 10:00:00.002740' 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.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.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.000870', "running_view_count" = 0 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.1ms) 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 "updated_at" = '2012-09-28 09:00:00.007080', "running_view_count" = 551 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.1ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.001004', "running_view_count" = 0, "target_view_count" = 10 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 "updated_at" = '2012-09-28 09:00:00.004700', "running_view_count" = 10 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.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.000419', "confirmed" = 'f' 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 "updated_at" = '2012-09-28 09:00:00.002606', "confirmed" = 't' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 AdvertSelector::Banner Load (0.1ms) 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.5ms) UPDATE "advert_selector_banners" SET "start_time" = '2012-09-27 21:00:00.000000', "updated_at" = '2012-09-28 09:00:00.000947', "end_time" = '2012-10-08 00:00:00.000000', "target_view_count" = 100 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 "updated_at" = '2012-09-28 09:00:00.003836', "running_view_count" = 0 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 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.1ms) 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", 814558298]] 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.1ms) 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", 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", "end_time"=>"2012-10-08 00:00:00 UTC", "placement_id"=>"405688915", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-09-28 00:00:00 UTC"}}  (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["end_time", Mon, 08 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", Fri, 28 Sep 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]] AdvertSelector::HelperItem Load (0.2ms) 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 7ms (ActiveRecord: 1.1ms)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners"  (0.1ms) rollback transaction  (0.1ms) 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.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_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.4ms) 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.4ms) DELETE FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? [["id", 394627963]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/banners Completed 302 Found in 6ms (ActiveRecord: 1.2ms)  (0.1ms) 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.1ms) 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 (128.8ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 146ms (Views: 144.0ms | ActiveRecord: 0.9ms)  (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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 11ms (Views: 9.7ms | 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]] 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 (19.5ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 27ms (Views: 26.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]] 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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 8ms (Views: 7.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]] 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.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.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-09-28 09:00:00.001563', "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-09-28 09:00:00.003117', "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.1ms) 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.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.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.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.1ms) 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Fri, 28 Sep 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.1ms) 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.3ms) 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.4ms)  (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 (6.1ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 15ms (Views: 13.8ms | 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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 10ms (Views: 8.6ms | 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.1ms) 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", 405688915]] Processing by AdvertSelector::PlacementsController#new as HTML AdvertSelector::Placement Load (0.2ms) 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 (7.5ms) 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" 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 Completed 200 OK in 17ms (Views: 15.5ms | 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#show as HTML Parameters: {"id"=>"405688915"} Redirected to http://test.host/advert_selector/placements/405688915/edit Completed 302 Found in 0ms (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 "updated_at" = '2012-09-28 09:00:00.000392', "fast_mode" = 't' 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 "updated_at" = '2012-09-28 09:00:00.002369', "confirmed" = 'f' 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 Fri Sep 28 12:00:00 +0300 2012 Processing by ExamplesController#index as HTML Completed 500 Internal Server Error in 17ms  (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 "updated_at" = '2012-09-28 09:00:00.000438', "fast_mode" = 't' 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 "updated_at" = '2012-09-28 09:00:00.002437', "confirmed" = 'f' 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "raise_error"], ["position", 0], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 12:00:00 +0300 2012 Processing by ExamplesController#index as HTML Completed 500 Internal Server Error in 12ms  (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 "updated_at" = '2012-09-28 09:00:00.000409', "fast_mode" = 't' 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 "updated_at" = '2012-09-28 09:00:00.002406', "confirmed" = 'f' 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 "updated_at" = '2012-09-28 09:00:00.000287', "frequency" = 2 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 12:00:00 +0300 2012 Processing by ExamplesController#index as HTML Completed 500 Internal Server Error in 12ms  (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 "updated_at" = '2012-09-28 09:00:00.000446', "fast_mode" = 't' 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 "updated_at" = '2012-09-28 09:00:00.002598', "confirmed" = 'f' 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 Fri Sep 28 12:00:00 +0300 2012 Processing by ExamplesController#index as HTML Completed 500 Internal Server Error in 12ms  (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 "updated_at" = '2012-09-28 09:00:00.000407', "fast_mode" = 't' 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 "updated_at" = '2012-09-28 09:00:00.002374', "confirmed" = 'f' 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 "updated_at" = '2012-09-28 09:00:00.000450', "confirmed" = 't' 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 Started GET "/" for 127.0.0.1 at Fri Sep 28 12:00:00 +0300 2012 Processing by ExamplesController#index as HTML Completed 500 Internal Server Error in 12ms  (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 "updated_at" = '2012-09-28 09:00:00.000400', "fast_mode" = 't' 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 "updated_at" = '2012-09-28 09:00:00.002391', "confirmed" = 'f' 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 "updated_at" = '2012-09-28 09:00:00.000431', "confirmed" = 't' 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.1ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-09-28 09:00:00.002543', "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.0ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-09-28 09:00:00.003753', "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.0ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-09-28 09:00:00.005282', "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 Fri Sep 28 12:00:00 +0300 2012 Processing by ExamplesController#index as HTML Completed 500 Internal Server Error in 12ms  (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 "updated_at" = '2012-09-28 09:00:00.000424', "fast_mode" = 't' 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 "updated_at" = '2012-09-28 09:00:00.002476', "confirmed" = 'f' 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 Fri Sep 28 12:00:00 +0300 2012 Processing by ExamplesController#index as HTML Completed 500 Internal Server Error in 12ms  (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 "updated_at" = '2012-09-28 09:00:00.000457', "fast_mode" = 't' 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 "updated_at" = '2012-09-28 09:00:00.002579', "confirmed" = 'f' 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 "only_once_per_session" = 't', "updated_at" = '2012-09-28 09:00:00.000958' WHERE "advert_selector_placements"."id" = 405688915  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 12:00:00 +0300 2012 Processing by ExamplesController#index as HTML Completed 500 Internal Server Error in 12ms  (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 Completed 500 Internal Server Error in 8ms  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 11:39:45', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:39:45', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:39:45', '2012-10-08 00:00:00', 't', '2012-09-28 11:39:45', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:39:45', '2012-10-08 00:00:00', 'f', '2012-09-28 11:39:45', 1000, 207249520, 1000, 't', 1, '2012-09-28 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-09-28 11:39:45', '2012-09-28 11:39:45', 960656439, 't', 394627963, '') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "id", "content_for", "banner_id", "content") VALUES (1, 'banner_leaderboard', '2012-09-28 11:39:45', '2012-09-28 11:39:45', 929640376, 't', 814558298, '') 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-09-28 11:39:45', '2012-09-28 11:39:45', 281932184, 't', 207249520, '') 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-09-28 11:39:45', '2012-09-28 11:39:45', 435138789, 'f', 394627963, 'pepsi=true') Fixture Delete (0.1ms) DELETE FROM "advert_selector_placements" Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Parade', '2012-09-28 11:39:45', '2012-09-28 11:39:45', '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-09-28 11:39:45', '2012-09-28 11:39:45', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-28 11:39:45', '2012-09-28 11:39:45', 'parade', 405688915)  (34.4ms) commit transaction  (0.0ms) 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) 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.7ms) 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", nil], ["position", 2], ["updated_at", Fri, 28 Sep 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Fri, 28 Sep 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Fri, 28 Sep 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-09-28 09:00:00.000075' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-28 09:00:00.000957' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.001082' 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-09-28 09:00:00.002030' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-09-28 09:00:00.002762' OR end_time IS NULL) AND (start_time < '2011-09-28 10:00:00.002882' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count)  (0.1ms) rollback transaction  (0.1ms) 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-09-28 09:00:00.001087' 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.1ms) 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-09-28 09:00:00.008763' 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.4ms) UPDATE "advert_selector_banners" SET "target_view_count" = 10, "running_view_count" = 0, "updated_at" = '2012-09-28 09:00:00.001003' WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.2ms) 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 "running_view_count" = 10, "updated_at" = '2012-09-28 09:00:00.006252' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 AdvertSelector::Banner Load (0.1ms) 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.4ms) UPDATE "advert_selector_banners" SET "confirmed" = 'f', "updated_at" = '2012-09-28 09:00:00.000416' WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.2ms) 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" = 't', "updated_at" = '2012-09-28 09:00:00.003571' 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.4ms) UPDATE "advert_selector_banners" SET "target_view_count" = 100, "end_time" = '2012-10-08 00:00:00.000000', "start_time" = '2012-09-27 21:00:00.000000', "updated_at" = '2012-09-28 09:00:00.000896' 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 "running_view_count" = 0, "updated_at" = '2012-09-28 09:00:00.003888' 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.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", 814558298]]  (0.1ms) rollback transaction  (0.1ms) 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", "end_time"=>"2012-10-08 00:00:00 UTC", "placement_id"=>"405688915", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-09-28 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["end_time", Mon, 08 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", Fri, 28 Sep 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Fri, 28 Sep 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 6ms (ActiveRecord: 0.9ms)  (0.1ms) 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.1ms) 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.2ms) 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 6ms (ActiveRecord: 1.0ms)  (0.1ms) 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.1ms) 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 (153.7ms) AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 175ms (Views: 172.7ms | ActiveRecord: 1.1ms)  (0.1ms) rollback transaction  (0.1ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) 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.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners"  AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 16ms (Views: 14.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#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 (21.4ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 30ms (Views: 29.0ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.1ms) 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.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  (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.1ms) 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.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]] Processing by AdvertSelector::MainController#index as HTML AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 9ms (Views: 7.9ms | 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.1ms) 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.3ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = 'not_found,video', "updated_at" = '2012-09-28 09:00:00.001620' 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 "conflicting_placements_array" = '', "updated_at" = '2012-09-28 09:00:00.003429' 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.1ms) 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.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.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.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]] 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.1ms) 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", 405688915]]  (0.1ms) 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.5ms) INSERT INTO "advert_selector_placements" ("conflicting_placements_array", "created_at", "name", "only_once_per_session", "updated_at") VALUES (?, ?, ?, ?, ?) [["conflicting_placements_array", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Fri, 28 Sep 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.6ms)  (0.1ms) 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.1ms) SELECT COUNT(*) FROM "advert_selector_placements"  Processing by AdvertSelector::PlacementsController#destroy as HTML Parameters: {"id"=>"405688915"} AdvertSelector::Placement Load (0.1ms) 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.3ms) 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.4ms)  (0.1ms) 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 (6.5ms) 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" 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 Completed 200 OK in 17ms (Views: 15.1ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) 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", 405688915]] Processing by AdvertSelector::PlacementsController#index as HTML AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  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" 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 Completed 200 OK in 16ms (Views: 14.0ms | 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]] 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 (5.5ms) 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" 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 Completed 200 OK in 17ms (Views: 15.6ms | ActiveRecord: 0.9ms)  (0.1ms) rollback transaction  (0.1ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) 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", 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.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", "405688915"]]  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/405688915 Completed 302 Found in 3ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]]  (0.1ms) rollback transaction  (0.1ms) 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-09-28 09:00:00.000441' 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-09-28 09:00:00.002591' 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 Fri Sep 28 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-09-28 09:00:00.006696' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.006896' 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.0ms | 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.3ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."banner_id" = 814558298 AND position >= 0) SQL (0.3ms) 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "always_false"], ["position", 0], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.020723' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.020901' 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 5ms (Views: 4.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  (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-09-28 09:00:00.000430' 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-09-28 09:00:00.002641' 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.3ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."banner_id" = 814558298 AND position >= 0) SQL (0.3ms) 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "raise_error"], ["position", 0], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.004573' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.004758' 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-09-28T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /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:50:in `send' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:50: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:46:in `advert_selector_banner_try' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:17: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.8ms | 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 Fri Sep 28 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"  CACHE (0.0ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 14ms (Views: 13.3ms | 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.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-28 09:00:00.000414' 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-09-28 09:00:00.002484' 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-09-28 09:00:00.000300' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.003152' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.003331' 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.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 "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.017835' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.018024' 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.6ms | 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 Mon Oct 01 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.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-01 09:00:00.000428' 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-01 09:00:00.002594' 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 Mon Oct 01 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-01 09:00:00.002287' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.002472' 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" = 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 Mon Oct 01 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 finished Completed 200 OK in 6ms (Views: 5.6ms | 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" = 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.4ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-01 09:00:00.000450' 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-01 09:00:00.003768' 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-01 09:00:00.000740' 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 Mon Oct 01 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-01 09:00:00.006010' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.006294' 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.3ms) 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 10ms (Views: 9.4ms | ActiveRecord: 0.7ms) 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 Started GET "/" for 127.0.0.1 at Mon Oct 01 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.4ms | 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-01 09:00:00.000447' 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-01 09:00:00.002908' 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-01 09:00:00.000519' 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 AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = 718799085 LIMIT 1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = '', "updated_at" = '2012-10-01 09:00:00.004532' WHERE "advert_selector_placements"."id" = 718799085 AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE (LOWER(name) = 'leaderboard') LIMIT 1  (0.1ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = '', "updated_at" = '2012-10-01 09:00:00.007482' 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 "conflicting_placements_array" = '', "updated_at" = '2012-10-01 09:00:00.010594' 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 Mon Oct 01 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-01 09:00:00.015990' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.016295' 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] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 12ms (Views: 11.0ms | ActiveRecord: 0.7ms) 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.2ms) 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-01 09:00:00.000485' 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-01 09:00:00.003024' 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.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.000372' 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 6ms (Views: 5.0ms | 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" = 814558298 AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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.4ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Mon Oct 01 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.0ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-01 09:00:00.000418' 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-01 09:00:00.002708' 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-01 09:00:00.000932', "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 Mon Oct 01 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-01 09:00:00.003904' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.004094' 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 Mon Oct 01 12:00:00 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 2ms (Views: 1.5ms | 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]] 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-01 09:00:00.002343' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.002529' 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.5ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.5ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 11:40:50', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:40:50', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:40:50', '2012-10-08 00:00:00', 't', '2012-09-28 11:40:50', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:40:50', '2012-10-08 00:00:00', 'f', '2012-09-28 11:40:50', 1000, 207249520, 1000, 't', 1, '2012-09-28 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-09-28 11:40:50', '2012-09-28 11:40:50', 960656439, 't', 394627963, '') 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-09-28 11:40:50', '2012-09-28 11:40:50', 929640376, 't', 814558298, '') 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-09-28 11:40:50', '2012-09-28 11:40:50', 281932184, 't', 207249520, '') 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-09-28 11:40:50', '2012-09-28 11:40:50', 435138789, 'f', 394627963, 'pepsi=true') Fixture Delete (0.1ms) DELETE FROM "advert_selector_placements" Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Parade', '2012-09-28 11:40:50', '2012-09-28 11:40:50', '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-09-28 11:40:50', '2012-09-28 11:40:50', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-28 11:40:50', '2012-09-28 11:40:50', 'parade', 405688915)  (90.1ms) commit transaction  (0.2ms) 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.6ms) 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", nil], ["position", 2], ["updated_at", Fri, 28 Sep 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Fri, 28 Sep 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Fri, 28 Sep 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-09-28 09:00:00.000075' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-28 09:00:00.000873' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.000996' 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-09-28 09:00:00.001875' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-09-28 09:00:00.002597' OR end_time IS NULL) AND (start_time < '2011-09-28 10:00:00.002709' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count)  (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.4ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.000851', "running_view_count" = 0 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.1ms) 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 "updated_at" = '2012-09-28 09:00:00.007198', "running_view_count" = 551 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 "updated_at" = '2012-09-28 09:00:00.000957', "target_view_count" = 10, "running_view_count" = 0 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 "updated_at" = '2012-09-28 09:00:00.004373', "running_view_count" = 10 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.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.000414', "confirmed" = 'f' 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 "updated_at" = '2012-09-28 09:00:00.002528', "confirmed" = 't' 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.4ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.000829', "target_view_count" = 100, "start_time" = '2012-09-27 21:00:00.000000', "end_time" = '2012-10-08 00:00:00.000000' 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 "updated_at" = '2012-09-28 09:00:00.003208', "running_view_count" = 0 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.1ms) 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", 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", "end_time"=>"2012-10-08 00:00:00 UTC", "placement_id"=>"405688915", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-09-28 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["end_time", Mon, 08 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", Fri, 28 Sep 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Fri, 28 Sep 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.8ms)  (0.1ms) 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.1ms) 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 5ms (ActiveRecord: 0.9ms)  (0.1ms) 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.1ms) 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.1ms) 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 (131.4ms) 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" 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 Completed 200 OK in 148ms (Views: 146.4ms | ActiveRecord: 0.9ms)  (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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 11ms (Views: 9.9ms | 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]] 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 (19.7ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 28ms (Views: 27.0ms | 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.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  (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]] 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::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" 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 Completed 200 OK in 9ms (Views: 7.9ms | 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.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.3ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-09-28 09:00:00.001742', "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-09-28 09:00:00.003455', "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.1ms) 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.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.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.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.1ms) 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.6ms) INSERT INTO "advert_selector_placements" ("conflicting_placements_array", "created_at", "name", "only_once_per_session", "updated_at") VALUES (?, ?, ?, ?, ?) [["conflicting_placements_array", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Fri, 28 Sep 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.6ms)  (0.1ms) 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.1ms) SELECT COUNT(*) FROM "advert_selector_placements"  Processing by AdvertSelector::PlacementsController#destroy as HTML Parameters: {"id"=>"405688915"} AdvertSelector::Placement Load (0.1ms) 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.3ms) 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.4ms)  (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.1ms) 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 (6.3ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 15ms (Views: 14.1ms | ActiveRecord: 0.7ms)  (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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 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.4ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 12ms (Views: 11.6ms | 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.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 "updated_at" = '2012-09-28 09:00:00.000414', "fast_mode" = 't' 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 "updated_at" = '2012-09-28 09:00:00.002952', "confirmed" = 'f' 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 Fri Sep 28 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-09-28 09:00:00.006898' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.007101' 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: 8.9ms | 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.3ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."banner_id" = 814558298 AND position >= 0) SQL (0.3ms) 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "always_false"], ["position", 0], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.020490' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.020665' 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 5ms (Views: 4.0ms | 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" = 814558298 AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1  (0.2ms) rollback transaction  (0.1ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]]  (0.1ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.000664', "fast_mode" = 't' WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.2ms) 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 "updated_at" = '2012-09-28 09:00:00.004324', "confirmed" = 'f' 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  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."banner_id" = 814558298 AND position >= 0) SQL (0.3ms) 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "raise_error"], ["position", 0], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.004512' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.004691' 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-09-28T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /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:50:in `send' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:50: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:46:in `advert_selector_banner_try' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:17: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.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 Started GET "/advert_selector/placements" for 127.0.0.1 at Fri Sep 28 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"  CACHE (0.0ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 15ms (Views: 13.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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.000426', "fast_mode" = 't' 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 "updated_at" = '2012-09-28 09:00:00.002871', "confirmed" = 'f' 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 "updated_at" = '2012-09-28 09:00:00.000360', "frequency" = 2 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.003342' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.003555' 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.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 "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.017239' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.017422' 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.3ms | 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 Mon Oct 01 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.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-01 09:00:00.000423', "fast_mode" = 't' 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 "updated_at" = '2012-10-01 09:00:00.002713', "confirmed" = 'f' 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 Mon Oct 01 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-01 09:00:00.002241' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.002429' 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" = 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 Mon Oct 01 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 finished Completed 200 OK in 7ms (Views: 6.3ms | 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" = 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.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-01 09:00:00.000413', "fast_mode" = 't' 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 "updated_at" = '2012-10-01 09:00:00.002567', "confirmed" = 'f' 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 "updated_at" = '2012-10-01 09:00:00.000489', "confirmed" = 't' 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 Started GET "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.004236' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.004441' 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] AdvertSelection finished Completed 200 OK in 7ms (Views: 6.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" = 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 Mon Oct 01 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.6ms | 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" = 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.1ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-01 09:00:00.000638', "fast_mode" = 't' 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 "updated_at" = '2012-10-01 09:00:00.002872', "confirmed" = 'f' 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 "updated_at" = '2012-10-01 09:00:00.000465', "confirmed" = 't' 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-01 09:00:00.002731', "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-01 09:00:00.004253', "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-01 09:00:00.005942', "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 Mon Oct 01 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-01 09:00:00.009686' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.009896' 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 7ms (Views: 6.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" = 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.6ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-01 09:00:00.000498', "fast_mode" = 't' WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.2ms) 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.1ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-01 09:00:00.005613', "confirmed" = 'f' 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 Mon Oct 01 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-01 09:00:00.000304' 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.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 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" = 814558298 AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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.5ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Mon Oct 01 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 4ms (Views: 4.2ms | ActiveRecord: 0.0ms)  (0.2ms) rollback transaction  (0.1ms) 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 "updated_at" = '2012-10-01 09:00:00.000481', "fast_mode" = 't' 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 "updated_at" = '2012-10-01 09:00:00.002725', "confirmed" = 'f' 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.2ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-10-01 09:00:00.001221', "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 Mon Oct 01 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-01 09:00:00.005227' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.005443' 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.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 7ms (Views: 6.5ms | 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" = 814558298 AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Mon Oct 01 12:00:00 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 2ms (Views: 1.5ms | 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]] 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-01 09:00:00.002412' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.002603' 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.9ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 11:44:59', 100, '2012-10-03 00:00:00', 't', '2012-09-28 11:44:59', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 11:44:59', '2012-10-08 00:00:00', 't', '2012-09-28 11:44:59', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 11:44:59', '2012-10-08 00:00:00', 'f', '2012-09-28 11:44:59', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.3ms) 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-09-28 11:44:59', '2012-09-28 11:44:59', 960656439, 't', 394627963, '') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "id", "content_for", "banner_id", "content") VALUES (1, 'banner_leaderboard', '2012-09-28 11:44:59', '2012-09-28 11:44:59', 929640376, 't', 814558298, '') 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-09-28 11:44:59', '2012-09-28 11:44:59', 281932184, 't', 207249520, '') 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-09-28 11:44:59', '2012-09-28 11:44:59', 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-09-28 11:44:59', '2012-09-28 11:44:59', '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-09-28 11:44:59', '2012-09-28 11:44:59', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-28 11:44:59', '2012-09-28 11:44:59', 'parade', 405688915)  (33.1ms) commit transaction  (0.0ms) 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) 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.6ms) 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", nil], ["position", 2], ["updated_at", Fri, 28 Sep 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Fri, 28 Sep 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Fri, 28 Sep 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.2ms) 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-09-28 09:00:00.000075' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-28 09:00:00.000939' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.001067' 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-09-28 09:00:00.001986' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-09-28 09:00:00.002824' OR end_time IS NULL) AND (start_time < '2011-09-28 10:00:00.002956' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count)  (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) 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 "running_view_count" = 0, "updated_at" = '2012-09-28 09:00:00.001312' 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.1ms) 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-09-28 09:00:00.008068' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 AdvertSelector::Banner Load (0.1ms) 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.3ms) UPDATE "advert_selector_banners" SET "running_view_count" = 0, "target_view_count" = 10, "updated_at" = '2012-09-28 09:00:00.001004' 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-09-28 09:00:00.004797' 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.3ms) UPDATE "advert_selector_banners" SET "confirmed" = 'f', "updated_at" = '2012-09-28 09:00:00.000418' 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-09-28 09:00:00.002547' 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.4ms) UPDATE "advert_selector_banners" SET "end_time" = '2012-10-08 00:00:00.000000', "start_time" = '2012-09-27 21:00:00.000000', "target_view_count" = 100, "updated_at" = '2012-09-28 09:00:00.000871' 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" = 0, "updated_at" = '2012-09-28 09:00:00.003364' 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.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", 814558298]] 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", 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", "end_time"=>"2012-10-08 00:00:00 UTC", "placement_id"=>"405688915", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-09-28 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["end_time", Mon, 08 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", Fri, 28 Sep 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Fri, 28 Sep 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 6ms (ActiveRecord: 0.8ms)  (0.1ms) 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.1ms) 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 5ms (ActiveRecord: 0.9ms)  (0.1ms) 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.1ms) 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 (128.6ms) 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" 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 Completed 200 OK in 145ms (Views: 143.8ms | ActiveRecord: 0.9ms)  (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::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 12ms (Views: 10.5ms | ActiveRecord: 0.7ms)  (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 (19.9ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 28ms (Views: 27.5ms | 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]] 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.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  (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]] 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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 9ms (Views: 8.0ms | 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.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 718799085]] AdvertSelector::Placement Load (0.1ms) 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.3ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-09-28 09:00:00.001759', "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-09-28 09:00:00.003466', "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.1ms) 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.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.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.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]] 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.1ms) 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.1ms) SELECT COUNT(*) FROM "advert_selector_placements" Processing by AdvertSelector::PlacementsController#create as HTML Parameters: {"placement"=>{"name"=>"new placement"}}  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "advert_selector_placements" ("conflicting_placements_array", "created_at", "name", "only_once_per_session", "updated_at") VALUES (?, ?, ?, ?, ?) [["conflicting_placements_array", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Fri, 28 Sep 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.6ms)  (0.1ms) 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.1ms) 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.3ms) 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.4ms)  (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 (6.3ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 16ms (Views: 14.2ms | ActiveRecord: 0.7ms)  (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::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 10ms (Views: 9.2ms | 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#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.4ms) 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" 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 Completed 200 OK in 14ms (Views: 12.7ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.2ms) 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.1ms) 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 "fast_mode" = 't', "updated_at" = '2012-09-28 09:00:00.000522' 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-09-28 09:00:00.003130' 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 Fri Sep 28 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-09-28 09:00:00.006829' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.007038' 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 Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 11ms (Views: 10.4ms | ActiveRecord: 0.6ms) 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.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."banner_id" = 814558298 AND position >= 0) SQL (0.3ms) 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "always_false"], ["position", 0], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.022778' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.022960' 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 5ms (Views: 4.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  (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-09-28 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.2ms) UPDATE "advert_selector_banners" SET "confirmed" = 'f', "updated_at" = '2012-09-28 09:00:00.002879' 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  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."banner_id" = 814558298 AND position >= 0) SQL (0.3ms) 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "raise_error"], ["position", 0], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.005173' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.005468' 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-09-28T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /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:50:in `send' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:50: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:46:in `advert_selector_banner_try' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:17: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.6ms | 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 Fri Sep 28 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"  CACHE (0.0ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 17ms (Views: 16.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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-28 09:00:00.000443' 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-09-28 09:00:00.003117' 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-09-28 09:00:00.000411' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.003939' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.004149' 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.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 "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.018248' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.018458' 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 7ms (Views: 6.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 Started GET "/" for 127.0.0.1 at Mon Oct 01 12:00:00 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 2ms (Views: 1.8ms | 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-01 09:00:00.000408' 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-01 09:00:00.002413' 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 Mon Oct 01 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-01 09:00:00.002295' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.002535' 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 7ms (Views: 6.6ms | 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 Started GET "/?advert_selector_force=207249520" for 127.0.0.1 at Mon Oct 01 12:00:00 +0300 2012 Processing by ExamplesController#index as HTML Parameters: {"advert_selector_force"=>"207249520"} [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelector::Banner Load (0.2ms) 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 finished Completed 200 OK in 7ms (Views: 6.0ms | 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" = 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.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-01 09:00:00.000533' 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-01 09:00:00.003163' 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-01 09:00:00.000543' 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 Started GET "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.004930' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.005185' 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] AdvertSelection finished Completed 200 OK in 7ms (Views: 6.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 Started GET "/" for 127.0.0.1 at Mon Oct 01 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) 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.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-01 09:00:00.000486' 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-01 09:00:00.002887' 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.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "confirmed" = 't', "updated_at" = '2012-10-01 09:00:00.000824' 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.1ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-10-01 09:00:00.004626', "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-01 09:00:00.006023', "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-01 09:00:00.007713', "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 Mon Oct 01 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-01 09:00:00.011362' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.011558' 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 9ms (Views: 8.0ms | 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" = 207249520 AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 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.2ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]]  (0.1ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-01 09:00:00.000618' 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-01 09:00:00.003675' 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 Mon Oct 01 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-01 09:00:00.000339' OR end_time IS NULL) 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 Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 10ms (Views: 9.0ms | ActiveRecord: 0.7ms) 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 Started GET "/" for 127.0.0.1 at Mon Oct 01 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.5ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Mon Oct 01 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 4ms (Views: 3.6ms | ActiveRecord: 0.0ms)  (0.2ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]]  (0.1ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-01 09:00:00.000936' 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-01 09:00:00.004355' 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.2ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-10-01 09:00:00.001655', "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 Mon Oct 01 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-01 09:00:00.006130' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.006420' 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 Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 10ms (Views: 9.3ms | ActiveRecord: 0.7ms) 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 Started GET "/" for 127.0.0.1 at Mon Oct 01 12:00:00 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 3ms (Views: 2.5ms | 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.2ms) 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.1ms) 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.3ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time > '2012-10-01 09:00:00.004602' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.004946' 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 Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 11ms (Views: 10.3ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml Connecting to database specified by database.yml Connecting to database specified by database.yml Connecting to database specified by database.yml Connecting to database specified by database.yml Connecting to database specified by database.yml  (276.7ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.3ms) INSERT INTO "advert_selector_banners" ("name", "start_time", "end_time", "target_view_count", "running_view_count", "frequency", "fast_mode", "comment", "confirmed", "priority", "created_at", "updated_at", "id", "placement_id") VALUES ('Coke', '2012-09-23 00:00:00.000000', '2012-10-03 00:00:00.000000', 1000, 100, 0, 'f', 'Coke banner', 't', 50, '2012-09-28 11:52:36', '2012-09-28 11:52:36', 814558298, 405688915) Fixture Insert (0.1ms) INSERT INTO "advert_selector_banners" ("name", "start_time", "end_time", "target_view_count", "frequency", "comment", "fast_mode", "confirmed", "priority", "created_at", "updated_at", "id", "placement_id") VALUES ('Pepsi', '2012-09-28 00:00:00.000000', '2012-10-08 00:00:00.000000', 1000, 0, 'Pepsi banner', 't', 't', 100, '2012-09-28 11:52:36', '2012-09-28 11:52:36', 394627963, 405688915) Fixture Insert (0.1ms) INSERT INTO "advert_selector_banners" ("name", "start_time", "end_time", "target_view_count", "frequency", "fast_mode", "confirmed", "priority", "created_at", "updated_at", "id", "placement_id") VALUES ('parade_banner', '2012-09-28 00:00:00.000000', '2012-10-08 00:00:00.000000', 1000, 1, 't', 'f', 1000, '2012-09-28 11:52:36', '2012-09-28 11:52:36', 207249520, 718799085) Fixture Delete (0.2ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "content_for", "content", "position", "created_at", "updated_at", "id", "banner_id") VALUES ('banner_leaderboard', 't', '', 1, '2012-09-28 11:52:36', '2012-09-28 11:52:36', 929640376, 814558298) Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "content_for", "content", "created_at", "updated_at", "id", "banner_id") VALUES ('request_params_include?', 'f', 'pepsi=true', '2012-09-28 11:52:36', '2012-09-28 11:52:36', 435138789, 394627963) Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "content_for", "content", "created_at", "updated_at", "id", "banner_id") VALUES (2, 'banner_leaderboard', 't', '', '2012-09-28 11:52:36', '2012-09-28 11:52:36', 960656439, 394627963) Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "content_for", "content", "created_at", "updated_at", "id", "banner_id") VALUES (1, 'banner_parade', 't', '', '2012-09-28 11:52:36', '2012-09-28 11:52:36', 281932184, 207249520) Fixture Delete (0.1ms) DELETE FROM "advert_selector_placements" Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "conflicting_placements_array", "created_at", "updated_at", "id") VALUES ('Parade', 'leaderboard,video', '2012-09-28 11:52:36', '2012-09-28 11:52:36', 718799085) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "conflicting_placements_array", "created_at", "updated_at", "id") VALUES ('Leaderboard', 'parade', '2012-09-28 11:52:36', '2012-09-28 11:52:36', 405688915) Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "only_once_per_session", "conflicting_placements_array", "created_at", "updated_at", "id") VALUES ('Video', 't', 'parade', '2012-09-28 11:52:36', '2012-09-28 11:52:36', 1019730477)  (72.1ms) commit 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) SELECT COUNT(*) FROM "advert_selector_helper_items"  (0.1ms) SAVEPOINT active_record_1 AdvertSelector::HelperItem Load (0.2ms) 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.6ms) 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", nil], ["position", 2], ["updated_at", Fri, 28 Sep 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Fri, 28 Sep 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.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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Fri, 28 Sep 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-09-28 09:00:00.000091' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-28 09:00:00.000823' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.000952' 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-09-28 09:00:00.001728' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-09-28 09:00:00.002284' OR end_time IS NULL) AND (start_time < '2011-09-28 10:00:00.002407' 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.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.3ms) UPDATE "advert_selector_banners" SET "running_view_count" = 0, "updated_at" = '2012-09-28 09:00:00.000808' 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-09-28 09:00:00.006352' 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-09-28 09:00:00.000730' 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-09-28 09:00:00.003593' 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-09-28 09:00:00.000364' 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-09-28 09:00:00.002088' 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.3ms) UPDATE "advert_selector_banners" SET "start_time" = '2012-09-27 21:00:00.000000', "end_time" = '2012-10-08 00:00:00.000000', "target_view_count" = 100, "updated_at" = '2012-09-28 09:00:00.000732' 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" = 0, "updated_at" = '2012-09-28 09:00:00.002563' 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.1ms) 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", "end_time"=>"2012-10-08 00:00:00 UTC", "frequency"=>"0", "name"=>"Pepsi", "placement_id"=>"405688915", "start_time"=>"2012-09-28 00:00:00 UTC", "target_view_count"=>"1000"}}  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["end_time", Mon, 08 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", Fri, 28 Sep 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Fri, 28 Sep 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 8ms (ActiveRecord: 0.9ms)  (0.1ms) 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.1ms) 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.9ms)  (0.1ms) 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.1ms) 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 (268.2ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 364ms (Views: 362.1ms | ActiveRecord: 0.9ms)  (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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 9ms (Views: 8.1ms | 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]] 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 (15.0ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 22ms (Views: 21.0ms | 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]] 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.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  (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.1ms) 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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 7ms (Views: 6.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.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.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.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]] 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.3ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = 'not_found,video', "updated_at" = '2012-09-28 09:00:00.001645' 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 "conflicting_placements_array" = '', "updated_at" = '2012-09-28 09:00:00.003379' 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.1ms) 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.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.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.1ms) rollback transaction  (0.1ms) 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.1ms) 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.5ms) INSERT INTO "advert_selector_placements" ("conflicting_placements_array", "created_at", "name", "only_once_per_session", "updated_at") VALUES (?, ?, ?, ?, ?) [["conflicting_placements_array", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/1019730478 Completed 302 Found in 4ms (ActiveRecord: 0.6ms)  (0.1ms) 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.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_placements"  Processing by AdvertSelector::PlacementsController#destroy as HTML Parameters: {"id"=>"405688915"} AdvertSelector::Placement Load (0.1ms) 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.3ms) 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.5ms)  (0.1ms) 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.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", "405688915"]] AdvertSelector::Placement Load (0.2ms) 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 (8.8ms) AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 22ms (Views: 19.3ms | ActiveRecord: 1.1ms)  (0.1ms) rollback transaction  (0.1ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) 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", 405688915]] Processing by AdvertSelector::PlacementsController#index as HTML AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  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" 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 Completed 200 OK in 11ms (Views: 9.3ms | ActiveRecord: 0.7ms)  (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.0ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 11ms (Views: 10.2ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) 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: {"placement"=>{"name"=>"Leaderboard"}, "id"=>"405688915"} AdvertSelector::Placement Load (0.1ms) 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.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-09-28 09:00:00.000522' 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-09-28 09:00:00.002751' 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 2012-09-28 12:00:00 +0300 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-09-28 09:00:00.020763' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.021005' 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 Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 56ms (Views: 55.0ms | 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" = 814558298 AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."banner_id" = 814558298 AND position >= 0) SQL (0.3ms) 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "always_false"], ["position", 0], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2012-09-28 12:00:00 +0300 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-09-28 09:00:00.080294' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.080487' 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.6ms | 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.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-09-28 09:00:00.000509' 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-09-28 09:00:00.002538' 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.3ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."banner_id" = 814558298 AND position >= 0) SQL (0.3ms) 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "raise_error"], ["position", 0], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2012-09-28 12:00:00 +0300 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-09-28 09:00:00.007883' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.008083' 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-09-28T12:00:00+03:00 - http://www.example.com/ - {"controller"=>"examples", "action"=>"index"} # /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:50:in `block in advert_selector_banner_try' /home/ohu/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.2.8/lib/active_record/associations/collection_proxy.rb:89:in `each' /home/ohu/.rvm/gems/ruby-1.9.2-p290/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:46:in `advert_selector_banner_try' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:17:in `block (2 levels) in advert_selector_initialize' /home/ohu/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `each' /home/ohu/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `each' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:15:in `block in advert_selector_initialize' [AdvertSelector] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.0ms | 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 2012-09-28 12:00:00 +0300 Processing by AdvertSelector::PlacementsController#index as HTML AdvertSelector::Placement Load (0.4ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  CACHE (0.0ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 67ms (Views: 65.0ms | ActiveRecord: 0.7ms)  (0.2ms) 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-09-28 09:00:00.000430' 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-09-28 09:00:00.002469' 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-09-28 09:00:00.003959' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2012-09-28 12:00:00 +0300 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-09-28 09:00:00.006741' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.006942' 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.0ms | 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 2012-10-01 12:00:00 +0300 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-01 09:00:00.017900' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.018091' 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 5ms (Views: 4.8ms | 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 2012-10-01 12:00:00 +0300 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 2ms (Views: 1.5ms | 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.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-01 09:00:00.000461' 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-01 09:00:00.002624' 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 2012-10-01 12:00:00 +0300 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-01 09:00:00.006089' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.006294' 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 5ms (Views: 4.6ms | 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" = 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 2012-10-01 12:00:00 +0300 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 finished Completed 200 OK in 4ms (Views: 3.5ms | 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" = 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.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-01 09:00:00.000437' 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-01 09:00:00.002521' 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-01 09:00:00.004166' 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 Started GET "/" for 127.0.0.1 at 2012-10-01 12:00:00 +0300 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-01 09:00:00.007454' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.007653' 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] AdvertSelection finished Completed 200 OK in 5ms (Views: 5.0ms | 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" = 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 2012-10-01 12:00:00 +0300 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 26ms (Views: 25.9ms | ActiveRecord: 0.0ms) AdvertSelector::HelperItem Load (0.7ms) 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.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-01 09:00:00.000441' 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-01 09:00:00.002453' 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-01 09:00:00.004151' 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 "conflicting_placements_array" = '', "updated_at" = '2012-10-01 09:00:00.006252' 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 "conflicting_placements_array" = '', "updated_at" = '2012-10-01 09:00:00.007493' 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 "conflicting_placements_array" = '', "updated_at" = '2012-10-01 09:00:00.008963' 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 2012-10-01 12:00:00 +0300 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-01 09:00:00.012324' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.012557' 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 6ms (Views: 5.7ms | 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" = 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.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-01 09:00:00.000430' 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-01 09:00:00.002425' 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 2012-10-01 12:00:00 +0300 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-01 09:00:00.003921' 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.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 2012-10-01 12:00:00 +0300 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 2ms (Views: 2.3ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at 2012-10-01 12:15:00 +0300 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 2ms (Views: 2.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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-01 09:00:00.000412' 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-01 09:00:00.002407' 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 "only_once_per_session" = 't', "updated_at" = '2012-10-01 09:00:00.004472' WHERE "advert_selector_placements"."id" = 405688915  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at 2012-10-01 12:00:00 +0300 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-01 09:00:00.007624' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.007854' 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 5ms (Views: 4.9ms | 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 2012-10-01 12:00:00 +0300 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]] 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-01 09:00:00.001967' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.002182' 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.0ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.5ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.3ms) 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-09-28 12:07:13', 100, '2012-10-03 00:00:00', 't', '2012-09-28 12:07:13', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 12:07:13', '2012-10-08 00:00:00', 't', '2012-09-28 12:07:13', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 12:07:13', '2012-10-08 00:00:00', 'f', '2012-09-28 12:07:13', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.3ms) 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-09-28 12:07:13', '2012-09-28 12:07:13', 960656439, 't', 394627963, '') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "id", "content_for", "banner_id", "content") VALUES (1, 'banner_leaderboard', '2012-09-28 12:07:13', '2012-09-28 12:07:13', 929640376, 't', 814558298, '') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "id", "content_for", "banner_id", "content") VALUES ('banner_parade', 1, '2012-09-28 12:07:13', '2012-09-28 12:07:13', 281932184, 't', 207249520, '') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "id", "content_for", "banner_id", "content") VALUES ('request_params_include?', '2012-09-28 12:07:13', '2012-09-28 12:07:13', 435138789, 'f', 394627963, 'pepsi=true') Fixture Delete (0.2ms) DELETE FROM "advert_selector_placements" Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Parade', '2012-09-28 12:07:13', '2012-09-28 12:07:13', 'leaderboard,video', 718799085) Fixture Insert (0.2ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "only_once_per_session", "id") VALUES ('Video', '2012-09-28 12:07:13', '2012-09-28 12:07:13', 'parade', 't', 1019730477) Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-28 12:07:13', '2012-09-28 12:07:13', 'parade', 405688915)  (274.9ms) commit 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) 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", nil], ["position", 2], ["updated_at", Fri, 28 Sep 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]] 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.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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Fri, 28 Sep 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-09-28 09:00:00.000066' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-28 09:00:00.000953' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.001084' 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-09-28 09:00:00.001990' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-09-28 09:00:00.002759' OR end_time IS NULL) AND (start_time < '2011-09-28 10:00:00.002885' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count)  (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) 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 "updated_at" = '2012-09-28 09:00:00.001182', "running_view_count" = 0 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.1ms) 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 "updated_at" = '2012-09-28 09:00:00.008106', "running_view_count" = 551 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 "updated_at" = '2012-09-28 09:00:00.000951', "target_view_count" = 10, "running_view_count" = 0 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 "updated_at" = '2012-09-28 09:00:00.004560', "running_view_count" = 10 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.1ms) 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 "confirmed" = 'f', "updated_at" = '2012-09-28 09:00:00.000409' 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-09-28 09:00:00.002867' 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.3ms) UPDATE "advert_selector_banners" SET "start_time" = '2012-09-27 21:00:00.000000', "end_time" = '2012-10-08 00:00:00.000000', "updated_at" = '2012-09-28 09:00:00.000841', "target_view_count" = 100 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 "updated_at" = '2012-09-28 09:00:00.003028', "running_view_count" = 0 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.1ms) 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", 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) 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", "end_time"=>"2012-10-08 00:00:00 UTC", "placement_id"=>"405688915", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-09-28 00:00:00 UTC"}} Rendered text template (0.0ms) Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 5ms (Views: 4.2ms | ActiveRecord: 0.0ms)  (0.1ms) 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.1ms) SELECT COUNT(*) FROM "advert_selector_banners" Processing by AdvertSelector::BannersController#destroy as HTML Parameters: {"id"=>"394627963"} Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)  (0.1ms) 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"} Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 1ms (Views: 0.3ms | 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#index as HTML Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 1ms (Views: 0.3ms | 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#new as HTML Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 1ms (Views: 0.3ms | 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.1ms) 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"} Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 1ms (Views: 0.3ms | 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"} Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 1ms (Views: 0.3ms | 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 Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 1ms (Views: 0.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]] Processing by AdvertSelector::MainController#index as HTML Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 1ms (Views: 0.2ms | 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.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]] 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.1ms) 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.4ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = 'not_found,video', "updated_at" = '2012-09-28 09:00:00.000815' 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.2ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = '', "updated_at" = '2012-09-28 09:00:00.002983' 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.1ms) 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.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.1ms) 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.1ms) 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.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]] 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", 405688915]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_placements" Processing by AdvertSelector::PlacementsController#create as HTML Parameters: {"placement"=>{"name"=>"new placement"}} Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 1ms (Views: 0.5ms | ActiveRecord: 0.0ms)  (0.1ms) 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.1ms) SELECT COUNT(*) FROM "advert_selector_placements" Processing by AdvertSelector::PlacementsController#destroy as HTML Parameters: {"id"=>"405688915"} Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_placements"   (0.1ms) rollback transaction  (0.1ms) 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"} Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 1ms (Views: 0.3ms | 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.1ms) 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 Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 0ms (Views: 0.2ms | 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#new as HTML Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 1ms (Views: 0.2ms | 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#show as HTML Parameters: {"id"=>"405688915"} Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 1ms (Views: 0.2ms | 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"}} Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 1ms (Views: 0.2ms | 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) rollback transaction  (0.1ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]]  (0.1ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-28 09:00:00.000699' 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-09-28 09:00:00.004222' 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.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.012519' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.012849' 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 Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 20ms (Views: 18.9ms | ActiveRecord: 0.7ms) 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) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."banner_id" = 814558298 AND position >= 0) SQL (0.4ms) 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "always_false"], ["position", 0], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.037640' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.037966' 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] AdvertSelection finished Completed 200 OK in 8ms (Views: 7.0ms | ActiveRecord: 0.7ms) 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.2ms) rollback transaction  (0.1ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]]  (0.1ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-28 09:00:00.000718' 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-09-28 09:00:00.004278' 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.4ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."banner_id" = 814558298 AND position >= 0) SQL (0.4ms) 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "raise_error"], ["position", 0], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.007161' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.007450' 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] Error with banner Coke in placement Leaderboard. 2012-09-28T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /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:50:in `send' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:50: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:46:in `advert_selector_banner_try' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:17: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 9ms (Views: 8.3ms | ActiveRecord: 0.6ms) 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 Started GET "/advert_selector/placements" for 127.0.0.1 at Fri Sep 28 12:00:00 +0300 2012 Processing by AdvertSelector::PlacementsController#index as HTML Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)  (0.2ms) rollback transaction  (0.1ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]]  (0.1ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-28 09:00:00.000690' WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.2ms) 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.2ms) UPDATE "advert_selector_banners" SET "confirmed" = 'f', "updated_at" = '2012-09-28 09:00:00.004353' 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.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "frequency" = 2, "updated_at" = '2012-09-28 09:00:00.000550' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.005609' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.005914' 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 10ms (Views: 9.1ms | ActiveRecord: 0.6ms) 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 Started GET "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.030649' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.030950' 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 Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 10ms (Views: 9.1ms | ActiveRecord: 0.7ms) 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 Started GET "/" for 127.0.0.1 at Mon Oct 01 12:00:00 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 3ms (Views: 2.3ms | 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.2ms) rollback transaction  (0.1ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]]  (0.1ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-01 09:00:00.000681' WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.2ms) 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.2ms) UPDATE "advert_selector_banners" SET "confirmed" = 'f', "updated_at" = '2012-10-01 09:00:00.005855' 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.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.003527' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.003825' 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 Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 10ms (Views: 9.1ms | ActiveRecord: 0.7ms) 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 Mon Oct 01 12:00:00 +0300 2012 Processing by ExamplesController#index as HTML Parameters: {"advert_selector_force"=>"207249520"} [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelector::Banner Load (0.2ms) 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.2ms) 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 finished Completed 200 OK in 9ms (Views: 8.7ms | ActiveRecord: 0.5ms) 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  (0.2ms) rollback transaction  (0.1ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]]  (0.1ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-01 09:00:00.000648' 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-01 09:00:00.004091' 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.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "confirmed" = 't', "updated_at" = '2012-10-01 09:00:00.000841' WHERE "advert_selector_banners"."id" = 207249520 AdvertSelector::HelperItem Load (0.2ms) 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 Started GET "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.008792' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.009141' 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.4ms) 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 12ms (Views: 10.6ms | ActiveRecord: 0.9ms) 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 Started GET "/" for 127.0.0.1 at Mon Oct 01 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: 4.1ms | 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.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.2ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]]  (0.1ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-01 09:00:00.000763' WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.2ms) 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-01 09:00:00.004479' 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  (0.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "confirmed" = 't', "updated_at" = '2012-10-01 09:00:00.000768' 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 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 "conflicting_placements_array" = '', "updated_at" = '2012-10-01 09:00:00.004931' 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 "conflicting_placements_array" = '', "updated_at" = '2012-10-01 09:00:00.007236' 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 "conflicting_placements_array" = '', "updated_at" = '2012-10-01 09:00:00.010260' 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.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.016199' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.016510' 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 (4.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] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 15ms (Views: 10.3ms | ActiveRecord: 4.7ms) 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.1ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]]  (0.0ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-01 09:00:00.000621' 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.2ms) UPDATE "advert_selector_banners" SET "confirmed" = 'f', "updated_at" = '2012-10-01 09:00:00.006908' 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 Mon Oct 01 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-01 09:00:00.000327' OR end_time IS NULL) 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 Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 10ms (Views: 9.3ms | ActiveRecord: 0.7ms) 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 Started GET "/" for 127.0.0.1 at Mon Oct 01 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.8ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Mon Oct 01 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 4ms (Views: 3.7ms | 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.0ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-01 09:00:00.000550' 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-01 09:00:00.003912' 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.2ms) UPDATE "advert_selector_placements" SET "only_once_per_session" = 't', "updated_at" = '2012-10-01 09:00:00.001631' WHERE "advert_selector_placements"."id" = 405688915  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.006413' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.006687' 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 9ms (Views: 7.8ms | ActiveRecord: 0.6ms) 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 Started GET "/" for 127.0.0.1 at Mon Oct 01 12:00:00 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 2ms (Views: 2.1ms | 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.1ms) 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.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]] 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-01 09:00:00.003738' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.004129' 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 9ms (Views: 8.4ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 12:10:02', 100, '2012-10-03 00:00:00', 't', '2012-09-28 12:10:02', 50, 814558298, 1000, 'f', 0, '2012-09-23 00:00:00') Fixture Insert (0.0ms) 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-09-28 12:10:02', '2012-10-08 00:00:00', 't', '2012-09-28 12:10:02', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 12:10:02', '2012-10-08 00:00:00', 'f', '2012-09-28 12:10:02', 1000, 207249520, 1000, 't', 1, '2012-09-28 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-09-28 12:10:02', '2012-09-28 12:10:02', 960656439, 't', 394627963, '') 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-09-28 12:10:02', '2012-09-28 12:10:02', 929640376, 't', 814558298, '') 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-09-28 12:10:02', '2012-09-28 12:10:02', 281932184, 't', 207249520, '') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "id", "content_for", "banner_id", "content") VALUES ('request_params_include?', '2012-09-28 12:10:02', '2012-09-28 12:10:02', 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-09-28 12:10:02', '2012-09-28 12:10:02', '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-09-28 12:10:02', '2012-09-28 12:10:02', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-28 12:10:02', '2012-09-28 12:10:02', 'parade', 405688915)  (39.9ms) 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.6ms) 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", nil], ["position", 2], ["updated_at", Fri, 28 Sep 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Fri, 28 Sep 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Fri, 28 Sep 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-09-28 09:00:00.000070' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-28 09:00:00.000949' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.001072' 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-09-28 09:00:00.001970' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-09-28 09:00:00.002693' OR end_time IS NULL) AND (start_time < '2011-09-28 10:00:00.002813' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count)  (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) 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-09-28 09:00:00.000918' 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-09-28 09:00:00.007044' 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-09-28 09:00:00.001017' 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-09-28 09:00:00.004810' 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-09-28 09:00:00.000396' 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-09-28 09:00:00.002403' 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.3ms) UPDATE "advert_selector_banners" SET "target_view_count" = 100, "updated_at" = '2012-09-28 09:00:00.000831', "end_time" = '2012-10-08 00:00:00.000000', "start_time" = '2012-09-27 21:00:00.000000' 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" = 0, "updated_at" = '2012-09-28 09:00:00.002964' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 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", 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.1ms) 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-08 00:00:00 UTC", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-09-28 00:00:00 UTC"}} Rendered text template (0.0ms) Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 4ms (Views: 3.6ms | ActiveRecord: 0.0ms)  (0.1ms) 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.1ms) SELECT COUNT(*) FROM "advert_selector_banners" Processing by AdvertSelector::BannersController#destroy as HTML Parameters: {"id"=>"394627963"} Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 1ms (Views: 0.2ms | ActiveRecord: 0.0ms)  (0.1ms) 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"} Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 1ms (Views: 0.2ms | 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#index as HTML Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 1ms (Views: 0.2ms | 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#new as HTML Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 1ms (Views: 0.2ms | 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#show as HTML Parameters: {"id"=>"394627963"} Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 1ms (Views: 0.2ms | 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"} Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 1ms (Views: 0.2ms | 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 Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 1ms (Views: 0.5ms | 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 Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 1ms (Views: 0.2ms | 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::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" 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 Completed 200 OK in 14ms (Views: 13.6ms | 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.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.3ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = 'not_found,video', "updated_at" = '2012-09-28 09:00:00.001089' 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 "conflicting_placements_array" = '', "updated_at" = '2012-09-28 09:00:00.002875' 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.1ms) 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.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.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.1ms) rollback transaction  (0.1ms) 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.1ms) SELECT COUNT(*) FROM "advert_selector_placements" Processing by AdvertSelector::PlacementsController#create as HTML Parameters: {"placement"=>{"name"=>"new placement"}}  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "advert_selector_placements" ("conflicting_placements_array", "created_at", "name", "only_once_per_session", "updated_at") VALUES (?, ?, ?, ?, ?) [["conflicting_placements_array", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Fri, 28 Sep 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.6ms)  (0.1ms) 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.1ms) 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 (20.3ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 30ms (Views: 28.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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 10ms (Views: 8.6ms | 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.3ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 11ms (Views: 10.6ms | 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 0ms (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.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-09-28 09:00:00.000380' 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-09-28 09:00:00.002437' 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 Fri Sep 28 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-09-28 09:00:00.006257' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.006445' 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 9ms (Views: 8.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  (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.3ms) 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "always_false"], ["position", 0], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.019077' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.019237' 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.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-28 09:00:00.000389' 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-09-28 09:00:00.002282' 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "raise_error"], ["position", 0], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.004095' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.004272' 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-09-28T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /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:50:in `send' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:50: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:46:in `advert_selector_banner_try' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:17: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.3ms | 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 Fri Sep 28 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"  CACHE (0.0ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 13ms (Views: 12.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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-28 09:00:00.000414' 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-09-28 09:00:00.002453' 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-09-28 09:00:00.000352' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.003297' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.003489' 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.6ms | 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 Mon Oct 01 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-01 09:00:00.017196' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.017376' 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.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 Mon Oct 01 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-01 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-01 09:00:00.002449' 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 Mon Oct 01 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-01 09:00:00.002175' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.002362' 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.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 Started GET "/?advert_selector_force=207249520" for 127.0.0.1 at Mon Oct 01 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 finished Completed 200 OK in 6ms (Views: 5.1ms | 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" = 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-01 09:00:00.000463' 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-01 09:00:00.002512' 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.1ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "confirmed" = 't', "updated_at" = '2012-10-01 09:00:00.000497' 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 Started GET "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.004023' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.004230' 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] 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" = 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 Mon Oct 01 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.8ms | 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" = 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-01 09:00:00.000433' 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-01 09:00:00.003099' 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-01 09:00:00.000732' 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 "conflicting_placements_array" = '', "updated_at" = '2012-10-01 09:00:00.004628' 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 "conflicting_placements_array" = '', "updated_at" = '2012-10-01 09:00:00.006937' 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.2ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = '', "updated_at" = '2012-10-01 09:00:00.010002' 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 Mon Oct 01 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-01 09:00:00.014733' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.014944' 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 7ms (Views: 6.7ms | 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" = 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.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-01 09:00:00.000421' 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-01 09:00:00.002506' 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 Mon Oct 01 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-01 09:00:00.000275' OR end_time IS NULL) 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.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.3ms | 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" = 814558298 AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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.6ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Mon Oct 01 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.5ms | 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.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-01 09:00:00.000421' 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-01 09:00:00.002514' 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 "only_once_per_session" = 't', "updated_at" = '2012-10-01 09:00:00.000978' WHERE "advert_selector_placements"."id" = 405688915  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.004022' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.004212' 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.6ms | 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 Mon Oct 01 12:00:00 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 2ms (Views: 1.5ms | 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]] 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-01 09:00:00.002374' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.002573' 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.5ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 12:10:19', 100, '2012-10-03 00:00:00', 't', '2012-09-28 12:10:19', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 12:10:19', '2012-10-08 00:00:00', 't', '2012-09-28 12:10:19', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 12:10:19', '2012-10-08 00:00:00', 'f', '2012-09-28 12:10:19', 1000, 207249520, 1000, 't', 1, '2012-09-28 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-09-28 12:10:19', '2012-09-28 12:10:19', 960656439, 't', 394627963, '') 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-09-28 12:10:19', '2012-09-28 12:10:19', 929640376, 't', 814558298, '') 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-09-28 12:10:19', '2012-09-28 12:10:19', 281932184, 't', 207249520, '') 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-09-28 12:10:19', '2012-09-28 12:10:19', 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-09-28 12:10:19', '2012-09-28 12:10:19', '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-09-28 12:10:19', '2012-09-28 12:10:19', 'parade', 't', 1019730477) Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-28 12:10:19', '2012-09-28 12:10:19', 'parade', 405688915)  (34.5ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.7ms) 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.6ms) 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", nil], ["position", 2], ["updated_at", Fri, 28 Sep 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Fri, 28 Sep 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Fri, 28 Sep 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-09-28 09:00:00.000069' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-28 09:00:00.000919' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.001039' 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-09-28 09:00:00.001947' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-09-28 09:00:00.002703' OR end_time IS NULL) AND (start_time < '2011-09-28 10:00:00.002823' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count)  (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) 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-09-28 09:00:00.000904' 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.1ms) 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-09-28 09:00:00.007193' 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.3ms) UPDATE "advert_selector_banners" SET "running_view_count" = 0, "updated_at" = '2012-09-28 09:00:00.000885', "target_view_count" = 10 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-09-28 09:00:00.004277' 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.3ms) UPDATE "advert_selector_banners" SET "confirmed" = 'f', "updated_at" = '2012-09-28 09:00:00.000407' 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-09-28 09:00:00.002645' 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.4ms) UPDATE "advert_selector_banners" SET "end_time" = '2012-10-08 00:00:00.000000', "start_time" = '2012-09-27 21:00:00.000000', "updated_at" = '2012-09-28 09:00:00.000833', "target_view_count" = 100 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" = 0, "updated_at" = '2012-09-28 09:00:00.002921' 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-08 00:00:00 UTC", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-09-28 00:00:00 UTC"}}  (0.0ms) SAVEPOINT active_record_1 SQL (0.7ms) 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["end_time", Mon, 08 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", Fri, 28 Sep 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Fri, 28 Sep 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.8ms)  (0.1ms) 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.1ms) 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.2ms) 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.9ms)  (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.1ms) 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 (125.3ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 141ms (Views: 139.4ms | 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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 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 (19.1ms) AdvertSelector::Placement Load (0.4ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 31ms (Views: 29.8ms | 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#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]] Processing by AdvertSelector::MainController#index as HTML AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 8ms (Views: 7.4ms | 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]] 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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 6ms (Views: 5.9ms | 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.3ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = 'not_found,video', "updated_at" = '2012-09-28 09:00:00.000812' 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 "conflicting_placements_array" = '', "updated_at" = '2012-09-28 09:00:00.002370' 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.1ms) 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.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.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.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.1ms) 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Fri, 28 Sep 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.1ms) 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.3ms) 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.4ms)  (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 (6.0ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 14ms (Views: 13.3ms | 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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 10ms (Views: 8.6ms | 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.1ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 11ms (Views: 10.3ms | 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.1ms) 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 "fast_mode" = 't', "updated_at" = '2012-09-28 09:00:00.000422' 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-09-28 09:00:00.002536' 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 Fri Sep 28 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-09-28 09:00:00.006609' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.006910' 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.5ms) 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.3ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."banner_id" = 814558298 AND position >= 0) SQL (0.3ms) 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "always_false"], ["position", 0], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.020314' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.020483' 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.9ms | 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.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-09-28 09:00:00.000409' 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-09-28 09:00:00.002413' 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.3ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."banner_id" = 814558298 AND position >= 0) SQL (0.3ms) 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "raise_error"], ["position", 0], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.004469' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.004647' 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-09-28T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /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:50:in `send' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:50: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:46:in `advert_selector_banner_try' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:17: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.3ms | 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 "/advert_selector/placements" for 127.0.0.1 at Fri Sep 28 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"  CACHE (0.0ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 13ms (Views: 12.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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-28 09:00:00.000399' 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-09-28 09:00:00.002458' 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-09-28 09:00:00.000265' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.003037' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.003217' 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" = 814558298 AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.017245' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.017490' 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 Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 8ms (Views: 7.4ms | ActiveRecord: 0.7ms) 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 Started GET "/" for 127.0.0.1 at Mon Oct 01 12:00:00 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 2ms (Views: 1.5ms | 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.2ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]]  (0.1ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-01 09:00:00.000652' WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.2ms) 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-01 09:00:00.003748' 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 Mon Oct 01 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-01 09:00:00.002659' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.002867' 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.7ms | 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" = 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 Mon Oct 01 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 finished Completed 200 OK in 7ms (Views: 6.7ms | 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" = 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-01 09:00:00.000414' 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-01 09:00:00.002486' 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-01 09:00:00.000471' 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 Started GET "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.004836' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.005087' 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 parade_banner in placement Parade [AdvertSelector] AdvertSelection finished Completed 200 OK in 8ms (Views: 7.2ms | 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 Started GET "/" for 127.0.0.1 at Mon Oct 01 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.7ms | 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" = 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) 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-01 09:00:00.000598' 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-01 09:00:00.002832' 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-01 09:00:00.000486' 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.1ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = '', "updated_at" = '2012-10-01 09:00:00.002735' 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 "conflicting_placements_array" = '', "updated_at" = '2012-10-01 09:00:00.004028' 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 "conflicting_placements_array" = '', "updated_at" = '2012-10-01 09:00:00.005728' 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 Mon Oct 01 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-01 09:00:00.009195' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.009369' 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 9ms (Views: 8.0ms | 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" = 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-01 09:00:00.000421' 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-01 09:00:00.002523' 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 Mon Oct 01 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-01 09:00:00.000240' 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.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 7ms (Views: 6.0ms | ActiveRecord: 0.5ms) 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 Started GET "/" for 127.0.0.1 at Mon Oct 01 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.7ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Mon Oct 01 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.0ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-01 09:00:00.000497' 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-01 09:00:00.003445' 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.1ms) 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.2ms) UPDATE "advert_selector_placements" SET "only_once_per_session" = 't', "updated_at" = '2012-10-01 09:00:00.001212' WHERE "advert_selector_placements"."id" = 405688915  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.004378' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.004564' 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 Mon Oct 01 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]] 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-01 09:00:00.002277' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.002458' 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.5ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 12:10:58', 100, '2012-10-03 00:00:00', 't', '2012-09-28 12:10:58', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 12:10:58', '2012-10-08 00:00:00', 't', '2012-09-28 12:10:58', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 12:10:58', '2012-10-08 00:00:00', 'f', '2012-09-28 12:10:58', 1000, 207249520, 1000, 't', 1, '2012-09-28 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-09-28 12:10:58', '2012-09-28 12:10:58', 960656439, 't', 394627963, '') 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-09-28 12:10:58', '2012-09-28 12:10:58', 929640376, 't', 814558298, '') 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-09-28 12:10:58', '2012-09-28 12:10:58', 281932184, 't', 207249520, '') 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-09-28 12:10:58', '2012-09-28 12:10:58', 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-09-28 12:10:58', '2012-09-28 12:10:58', '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-09-28 12:10:58', '2012-09-28 12:10:58', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-28 12:10:58', '2012-09-28 12:10:58', 'parade', 405688915)  (45.2ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.7ms) 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", nil], ["position", 2], ["updated_at", Fri, 28 Sep 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Fri, 28 Sep 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Fri, 28 Sep 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-09-28 09:00:00.000070' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-28 09:00:00.000913' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.001032' 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-09-28 09:00:00.001908' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-09-28 09:00:00.002630' OR end_time IS NULL) AND (start_time < '2011-09-28 10:00:00.002756' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count)  (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) 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 "updated_at" = '2012-09-28 09:00:00.000868', "running_view_count" = 0 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.1ms) 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 "updated_at" = '2012-09-28 09:00:00.007417', "running_view_count" = 551 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 "updated_at" = '2012-09-28 09:00:00.000931', "target_view_count" = 10, "running_view_count" = 0 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 "updated_at" = '2012-09-28 09:00:00.004368', "running_view_count" = 10 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.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.000400', "confirmed" = 'f' 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 "updated_at" = '2012-09-28 09:00:00.002612', "confirmed" = 't' 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.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.000829', "target_view_count" = 100, "end_time" = '2012-10-08 00:00:00.000000', "start_time" = '2012-09-27 21:00:00.000000' 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 "updated_at" = '2012-09-28 09:00:00.002906', "running_view_count" = 0 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-08 00:00:00 UTC", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-09-28 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["end_time", Mon, 08 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", Fri, 28 Sep 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Fri, 28 Sep 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.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]]  (0.1ms) 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.3ms) 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 5ms (ActiveRecord: 0.9ms)  (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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", "394627963"]] AdvertSelector::Placement Load (0.2ms) 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 (127.6ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 144ms (Views: 142.0ms | 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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 11ms (Views: 10.0ms | 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]] 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.6ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 26ms (Views: 25.5ms | 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]] Processing by AdvertSelector::MainController#index as HTML Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 1ms (Views: 1.0ms | 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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 8ms (Views: 7.0ms | 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.3ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = 'not_found,video', "updated_at" = '2012-09-28 09:00:00.000796' 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 "conflicting_placements_array" = '', "updated_at" = '2012-09-28 09:00:00.002360' 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.1ms) 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.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.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.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.1ms) 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.5ms) INSERT INTO "advert_selector_placements" ("conflicting_placements_array", "created_at", "name", "only_once_per_session", "updated_at") VALUES (?, ?, ?, ?, ?) [["conflicting_placements_array", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Fri, 28 Sep 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.1ms) 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.1ms) 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.3ms) 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.4ms)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_placements"   (0.1ms) rollback transaction  (0.1ms) 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 (6.0ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 14ms (Views: 13.2ms | 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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 10ms (Views: 8.5ms | 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.1ms) 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" 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 Completed 200 OK in 12ms (Views: 11.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#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.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", "405688915"]]  (0.1ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/405688915 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.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-09-28 09:00:00.000413' 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 "updated_at" = '2012-09-28 09:00:00.002484', "confirmed" = 'f' 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 Fri Sep 28 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-09-28 09:00:00.006551' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.006758' 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 9ms (Views: 8.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  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."banner_id" = 814558298 AND position >= 0) SQL (0.3ms) 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "always_false"], ["position", 0], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.019588' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.019755' 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: 4.0ms | 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.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-09-28 09:00:00.000408' 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 "updated_at" = '2012-09-28 09:00:00.002383', "confirmed" = 'f' 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "raise_error"], ["position", 0], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.004145' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.004318' 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-09-28T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /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:50:in `send' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:50: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:46:in `advert_selector_banner_try' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:17: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.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 "/advert_selector/placements" for 127.0.0.1 at Fri Sep 28 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" CACHE (0.0ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 14ms (Views: 12.9ms | 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-09-28 09:00:00.000402' 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 "updated_at" = '2012-09-28 09:00:00.002401', "confirmed" = 'f' 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-09-28 09:00:00.000291' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.003260' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.003444' 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.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 Mon Oct 01 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-01 09:00:00.016436' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.016597' 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 5ms (Views: 4.9ms | 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 Mon Oct 01 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.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-01 09:00:00.000439' 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 "updated_at" = '2012-10-01 09:00:00.002448', "confirmed" = 'f' 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 Mon Oct 01 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-01 09:00:00.002266' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.002444' 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.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 Started GET "/?advert_selector_force=207249520" for 127.0.0.1 at Mon Oct 01 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 finished Completed 200 OK in 6ms (Views: 5.4ms | 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" = 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.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-01 09:00:00.000431' 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 "updated_at" = '2012-10-01 09:00:00.002516', "confirmed" = 'f' 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 "updated_at" = '2012-10-01 09:00:00.000458', "confirmed" = 't' 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 Started GET "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.003985' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.004159' 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] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.8ms | 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" = 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 Mon Oct 01 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.7ms | 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" = 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-01 09:00:00.000458' 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 "updated_at" = '2012-10-01 09:00:00.002578', "confirmed" = 'f' 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 "updated_at" = '2012-10-01 09:00:00.000454', "confirmed" = 't' 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.1ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = '', "updated_at" = '2012-10-01 09:00:00.002691' 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 "conflicting_placements_array" = '', "updated_at" = '2012-10-01 09:00:00.003948' 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 "conflicting_placements_array" = '', "updated_at" = '2012-10-01 09:00:00.005909' 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 Mon Oct 01 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-01 09:00:00.009848' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.010041' 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 7ms (Views: 6.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" = 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.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-01 09:00:00.000420' 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 "updated_at" = '2012-10-01 09:00:00.002446', "confirmed" = 'f' 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 Mon Oct 01 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-01 09:00:00.000243' 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.4ms) 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.0ms | ActiveRecord: 0.7ms) 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 Mon Oct 01 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 Mon Oct 01 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.4ms | 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.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-01 09:00:00.000417' 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 "updated_at" = '2012-10-01 09:00:00.002447', "confirmed" = 'f' 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.1ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_placements" SET "only_once_per_session" = 't', "updated_at" = '2012-10-01 09:00:00.001294' WHERE "advert_selector_placements"."id" = 405688915  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.004416' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.004590' 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.3ms | 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 Mon Oct 01 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]] 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-01 09:00:00.002226' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.002406' 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.6ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 12:12:42', 100, '2012-10-03 00:00:00', 't', '2012-09-28 12:12:42', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 12:12:42', '2012-10-08 00:00:00', 't', '2012-09-28 12:12:42', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 12:12:42', '2012-10-08 00:00:00', 'f', '2012-09-28 12:12:42', 1000, 207249520, 1000, 't', 1, '2012-09-28 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-09-28 12:12:42', '2012-09-28 12:12:42', 960656439, 't', 394627963, '') 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-09-28 12:12:42', '2012-09-28 12:12:42', 929640376, 't', 814558298, '') 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-09-28 12:12:42', '2012-09-28 12:12:42', 281932184, 't', 207249520, '') 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-09-28 12:12:42', '2012-09-28 12:12:42', 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-09-28 12:12:42', '2012-09-28 12:12:42', '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-09-28 12:12:42', '2012-09-28 12:12:42', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-28 12:12:42', '2012-09-28 12:12:42', 'parade', 405688915)  (49.8ms) commit transaction  (0.2ms) 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.2ms) 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.6ms) 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", nil], ["position", 2], ["updated_at", Fri, 28 Sep 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]] 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.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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Fri, 28 Sep 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-09-28 09:00:00.000078' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-28 09:00:00.001010' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.001131' 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-09-28 09:00:00.002036' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-09-28 09:00:00.002763' OR end_time IS NULL) AND (start_time < '2011-09-28 10:00:00.002892' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count)  (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) 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-09-28 09:00:00.001025' 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-09-28 09:00:00.007087' 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, "updated_at" = '2012-09-28 09:00:00.000885', "target_view_count" = 10 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-09-28 09:00:00.004302' 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 "updated_at" = '2012-09-28 09:00:00.000409', "confirmed" = 'f' 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 "updated_at" = '2012-09-28 09:00:00.002422', "confirmed" = 't' 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.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.000872', "end_time" = '2012-10-08 00:00:00.000000', "start_time" = '2012-09-27 21:00:00.000000', "target_view_count" = 100 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" = 0, "updated_at" = '2012-09-28 09:00:00.002957' 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.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", 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.0ms) 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-08 00:00:00 UTC", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-09-28 00:00:00 UTC"}}  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["end_time", Mon, 08 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", Fri, 28 Sep 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Fri, 28 Sep 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.9ms)  (0.1ms) 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.1ms) SELECT COUNT(*) FROM "advert_selector_banners" Processing by AdvertSelector::BannersController#destroy 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"]]  (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.4ms) 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.3ms) 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.9ms)  (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.1ms) 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 (135.0ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 151ms (Views: 150.0ms | 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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 11ms (Views: 10.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]] 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 (19.0ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 27ms (Views: 26.1ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) 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]] Processing by AdvertSelector::MainController#index as HTML Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 1ms (Views: 0.9ms | 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::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" 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 Completed 200 OK in 10ms (Views: 9.1ms | 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.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.3ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = 'not_found,video', "updated_at" = '2012-09-28 09:00:00.000806' 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 "conflicting_placements_array" = '', "updated_at" = '2012-09-28 09:00:00.002408' 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.1ms) 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.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.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.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.1ms) 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.5ms) INSERT INTO "advert_selector_placements" ("conflicting_placements_array", "created_at", "name", "only_once_per_session", "updated_at") VALUES (?, ?, ?, ?, ?) [["conflicting_placements_array", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Fri, 28 Sep 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.6ms)  (0.1ms) 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.1ms) 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.3ms) 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.4ms)  (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 (6.1ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 10ms (Views: 8.7ms | 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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 12ms (Views: 10.9ms | 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.1ms) 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.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 "updated_at" = '2012-09-28 09:00:00.000392', "fast_mode" = 't' 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 "updated_at" = '2012-09-28 09:00:00.002391', "confirmed" = 'f' 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 Fri Sep 28 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.6ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time > '2012-09-28 09:00:00.010867' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.011505' 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 18ms (Views: 17.4ms | ActiveRecord: 0.8ms) 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.3ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."banner_id" = 814558298 AND position >= 0) SQL (0.3ms) 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "always_false"], ["position", 0], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.030030' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.030233' 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 6ms (Views: 5.0ms | 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" = 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.5ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.000481', "fast_mode" = 't' 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 "updated_at" = '2012-09-28 09:00:00.003553', "confirmed" = 'f' 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.3ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."banner_id" = 814558298 AND position >= 0) SQL (0.3ms) 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "raise_error"], ["position", 0], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.005607' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.005907' 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-09-28T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /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:50:in `send' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:50: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:46:in `advert_selector_banner_try' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:17: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 7ms (Views: 6.1ms | 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" = 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 Fri Sep 28 12:00:00 +0300 2012 Processing by AdvertSelector::PlacementsController#index as HTML AdvertSelector::Placement Load (0.3ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" CACHE (0.0ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.3ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" ORDER BY priority desc LIMIT 10 AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = 718799085 LIMIT 1 AdvertSelector::Placement Load (0.2ms) 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 Completed 200 OK in 27ms (Views: 24.2ms | ActiveRecord: 0.9ms)  (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 "updated_at" = '2012-09-28 09:00:00.000547', "fast_mode" = 't' 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 "updated_at" = '2012-09-28 09:00:00.003321', "confirmed" = 'f' 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.2ms) UPDATE "advert_selector_banners" SET "frequency" = 2, "updated_at" = '2012-09-28 09:00:00.000381' WHERE "advert_selector_banners"."id" = 814558298  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.005142' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.005378' 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 7ms (Views: 6.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 "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.022217' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.022419' 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.7ms | 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" = 814558298 AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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.2ms) 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 "updated_at" = '2012-10-01 09:00:00.000425', "fast_mode" = 't' 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 "updated_at" = '2012-10-01 09:00:00.003198', "confirmed" = 'f' 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 Mon Oct 01 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-01 09:00:00.002639' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.002859' 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 7ms (Views: 6.6ms | ActiveRecord: 0.5ms) 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 Mon Oct 01 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 finished Completed 200 OK in 7ms (Views: 6.1ms | 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" = 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.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-01 09:00:00.000430', "fast_mode" = 't' WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.2ms) 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 "updated_at" = '2012-10-01 09:00:00.003037', "confirmed" = 'f' 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 "updated_at" = '2012-10-01 09:00:00.000470', "confirmed" = 't' 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 Started GET "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.004929' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.005142' 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] AdvertSelection finished Completed 200 OK in 7ms (Views: 6.3ms | 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" = 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 Mon Oct 01 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.8ms | 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" = 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.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 "updated_at" = '2012-10-01 09:00:00.000450', "fast_mode" = 't' 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 "updated_at" = '2012-10-01 09:00:00.002582', "confirmed" = 'f' 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 "updated_at" = '2012-10-01 09:00:00.000473', "confirmed" = 't' 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.1ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = '', "updated_at" = '2012-10-01 09:00:00.002816' 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 "conflicting_placements_array" = '', "updated_at" = '2012-10-01 09:00:00.004275' 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 "conflicting_placements_array" = '', "updated_at" = '2012-10-01 09:00:00.006349' 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 Mon Oct 01 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-01 09:00:00.010430' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.010633' 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.5ms | ActiveRecord: 0.5ms) 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.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.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-01 09:00:00.000459', "fast_mode" = 't' 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 "updated_at" = '2012-10-01 09:00:00.002913', "confirmed" = 'f' 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 Mon Oct 01 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-01 09:00:00.000246' 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.5ms) 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 8ms (Views: 6.7ms | ActiveRecord: 0.9ms) 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 Mon Oct 01 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.6ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Mon Oct 01 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 "updated_at" = '2012-10-01 09:00:00.000618', "fast_mode" = 't' 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 "updated_at" = '2012-10-01 09:00:00.003170', "confirmed" = 'f' 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 "only_once_per_session" = 't', "updated_at" = '2012-10-01 09:00:00.001147' WHERE "advert_selector_placements"."id" = 405688915  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.004397' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.004596' 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.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 "/" for 127.0.0.1 at Mon Oct 01 12:00:00 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 2ms (Views: 1.7ms | 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.2ms) rollback transaction  (0.1ms) 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-01 09:00:00.002403' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.002605' 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.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 7ms (Views: 6.7ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 15:09:37', 100, '2012-10-03 00:00:00', 't', '2012-09-28 15:09:37', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 15:09:37', '2012-10-08 00:00:00', 't', '2012-09-28 15:09:37', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 15:09:37', '2012-10-08 00:00:00', 'f', '2012-09-28 15:09:37', 1000, 207249520, 1000, 't', 1, '2012-09-28 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-09-28 15:09:37', '2012-09-28 15:09:37', 960656439, 't', 394627963, '') 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-09-28 15:09:37', '2012-09-28 15:09:37', 929640376, 't', 814558298, '') 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-09-28 15:09:37', '2012-09-28 15:09:37', 281932184, 't', 207249520, '') 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-09-28 15:09:37', '2012-09-28 15:09:37', 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-09-28 15:09:37', '2012-09-28 15:09:37', '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-09-28 15:09:37', '2012-09-28 15:09:37', 'parade', 't', 1019730477) Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-28 15:09:37', '2012-09-28 15:09:37', 'parade', 405688915)  (38.3ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.7ms) 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.6ms) 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", nil], ["position", 2], ["updated_at", Fri, 28 Sep 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Fri, 28 Sep 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Fri, 28 Sep 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-09-28 09:00:00.000070' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-28 09:00:00.000942' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.001074' 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-09-28 09:00:00.001991' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-09-28 09:00:00.002720' OR end_time IS NULL) AND (start_time < '2011-09-28 10:00:00.002835' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count)  (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) 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 "updated_at" = '2012-09-28 09:00:00.000889', "running_view_count" = 0 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 "updated_at" = '2012-09-28 09:00:00.006984', "running_view_count" = 551 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 "updated_at" = '2012-09-28 09:00:00.000974', "target_view_count" = 10, "running_view_count" = 0 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 "updated_at" = '2012-09-28 09:00:00.004395', "running_view_count" = 10 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-09-28 09:00:00.000414' 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-09-28 09:00:00.002484' 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.3ms) UPDATE "advert_selector_banners" SET "end_time" = '2012-10-08 00:00:00.000000', "updated_at" = '2012-09-28 09:00:00.000846', "target_view_count" = 100, "start_time" = '2012-09-27 21:00:00.000000' 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 "updated_at" = '2012-09-28 09:00:00.002922', "running_view_count" = 0 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.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", 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-08 00:00:00 UTC", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-09-28 00:00:00 UTC"}}  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["end_time", Mon, 08 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", Fri, 28 Sep 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Fri, 28 Sep 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.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]]  (0.1ms) 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 5ms (ActiveRecord: 0.9ms)  (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 (126.7ms) 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" 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 Completed 200 OK in 145ms (Views: 143.3ms | ActiveRecord: 0.9ms)  (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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 11ms (Views: 9.3ms | 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.5ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 26ms (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.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  (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]] Processing by AdvertSelector::MainController#index as HTML Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 1ms (Views: 1.0ms | 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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 8ms (Views: 7.0ms | 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-09-28 09:00:00.000786', "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-09-28 09:00:00.002288', "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.1ms) 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.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.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.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#create as HTML Parameters: {"placement"=>{"name"=>"new placement"}}  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "advert_selector_placements" ("conflicting_placements_array", "created_at", "name", "only_once_per_session", "updated_at") VALUES (?, ?, ?, ?, ?) [["conflicting_placements_array", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Fri, 28 Sep 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.1ms) 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.3ms) 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.4ms)  (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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 15ms (Views: 13.4ms | 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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 9ms (Views: 8.3ms | 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.9ms) 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" 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 Completed 200 OK in 15ms (Views: 14.0ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) 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.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-09-28 09:00:00.000404' 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-09-28 09:00:00.002433' 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 Fri Sep 28 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-09-28 09:00:00.007115' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.007359' 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: 8.9ms | 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.3ms) 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "always_false"], ["position", 0], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.020150' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.020325' 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.9ms | 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.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-28 09:00:00.000403' 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-09-28 09:00:00.002534' 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "raise_error"], ["position", 0], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.004151' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.004324' 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-09-28T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /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:50:in `send' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:50: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:46:in `advert_selector_banner_try' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:17: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.1ms | 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 "/advert_selector/placements" for 127.0.0.1 at Fri Sep 28 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" CACHE (0.0ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 15ms (Views: 13.7ms | 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-09-28 09:00:00.000405' 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-09-28 09:00:00.002341' 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-09-28 09:00:00.000306' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.003104' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.003270' 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.3ms | 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 Mon Oct 01 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-01 09:00:00.016189' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.016352' 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.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 Mon Oct 01 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.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-01 09:00:00.000424' 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-01 09:00:00.002573' 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 Mon Oct 01 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-01 09:00:00.002406' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.002613' 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.7ms | 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 Mon Oct 01 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 finished Completed 200 OK in 7ms (Views: 6.0ms | 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" = 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.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-01 09:00:00.000507' 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-01 09:00:00.003043' 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-01 09:00:00.000525' 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 Mon Oct 01 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-01 09:00:00.004538' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.004728' 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 parade_banner in placement Parade [AdvertSelector] AdvertSelection finished Completed 200 OK in 7ms (Views: 6.5ms | 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 Started GET "/" for 127.0.0.1 at Mon Oct 01 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.7ms | 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" = 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.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-01 09:00:00.000419' 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-01 09:00:00.002422' 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-01 09:00:00.000437' 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.1ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-10-01 09:00:00.002635', "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-01 09:00:00.003947', "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-01 09:00:00.005615', "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 Mon Oct 01 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-01 09:00:00.009135' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.009330' 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 7ms (Views: 6.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" = 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.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-01 09:00:00.000423' 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-01 09:00:00.002456' 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 Mon Oct 01 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-01 09:00:00.000223' 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: 5.0ms | 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 Mon Oct 01 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 Mon Oct 01 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.5ms | 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.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-01 09:00:00.000479' 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-01 09:00:00.002520' 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-01 09:00:00.000909', "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 Mon Oct 01 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-01 09:00:00.003902' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.004078' 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.3ms | 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 Mon Oct 01 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]] 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-01 09:00:00.002332' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.002520' 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.5ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml Connecting to database specified by database.yml Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 16:22:13', 100, '2012-10-03 00:00:00', 't', '2012-09-28 16:22:13', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 16:22:13', '2012-10-08 00:00:00', 't', '2012-09-28 16:22:13', 100, 394627963, 1000, 't', 0, '2012-09-28 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-09-28 16:22:13', '2012-10-08 00:00:00', 'f', '2012-09-28 16:22:13', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.3ms) 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-09-28 16:22:13', '2012-09-28 16:22:13', 960656439, 't', 394627963, '') 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-09-28 16:22:13', '2012-09-28 16:22:13', 929640376, 't', 814558298, '') 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-09-28 16:22:13', '2012-09-28 16:22:13', 281932184, 't', 207249520, '') 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-09-28 16:22:13', '2012-09-28 16:22:13', 435138789, 'f', 394627963, 'pepsi=true') Fixture Delete (0.2ms) 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-09-28 16:22:13', '2012-09-28 16:22:13', '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-09-28 16:22:13', '2012-09-28 16:22:13', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-28 16:22:13', '2012-09-28 16:22:13', 'parade', 405688915)  (47.5ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.7ms) 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.6ms) 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", nil], ["position", 2], ["updated_at", Fri, 28 Sep 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Fri, 28 Sep 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Fri, 28 Sep 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-09-28 09:00:00.000069' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-28 09:00:00.000897' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.001007' 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-09-28 09:00:00.001865' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-09-28 09:00:00.002586' OR end_time IS NULL) AND (start_time < '2011-09-28 10:00:00.002708' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count)  (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) 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-09-28 09:00:00.000894' 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-09-28 09:00:00.006848' 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, "updated_at" = '2012-09-28 09:00:00.000889', "target_view_count" = 10 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-09-28 09:00:00.004280' 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.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.000396', "confirmed" = 'f' 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 "updated_at" = '2012-09-28 09:00:00.002561', "confirmed" = 't' 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.3ms) UPDATE "advert_selector_banners" SET "end_time" = '2012-10-08 00:00:00.000000', "updated_at" = '2012-09-28 09:00:00.000857', "start_time" = '2012-09-27 21:00:00.000000', "target_view_count" = 100 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" = 0, "updated_at" = '2012-09-28 09:00:00.002967' 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.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", 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-08 00:00:00 UTC", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-09-28 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["end_time", Mon, 08 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", Fri, 28 Sep 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Fri, 28 Sep 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.8ms)  (0.1ms) 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.1ms) SELECT COUNT(*) FROM "advert_selector_banners" Processing by AdvertSelector::BannersController#destroy 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"]]  (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.9ms)  (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.1ms) 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 (127.3ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 143ms (Views: 141.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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 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.5ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 26ms (Views: 25.3ms | 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]] Processing by AdvertSelector::MainController#index as HTML Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 1ms (Views: 1.0ms | 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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 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-09-28 09:00:00.000804', "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-09-28 09:00:00.002349', "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.1ms) 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.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.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.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.1ms) 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.5ms) INSERT INTO "advert_selector_placements" ("conflicting_placements_array", "created_at", "name", "only_once_per_session", "updated_at") VALUES (?, ?, ?, ?, ?) [["conflicting_placements_array", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Fri, 28 Sep 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.3ms) 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.4ms)  (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.1ms) 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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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.2ms) 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 Completed 200 OK in 15ms (Views: 13.2ms | ActiveRecord: 0.7ms)  (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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 10ms (Views: 8.5ms | 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.1ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 12ms (Views: 10.7ms | 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 0ms (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.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 "updated_at" = '2012-09-28 09:00:00.000404', "fast_mode" = 't' 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 "updated_at" = '2012-09-28 09:00:00.002476', "confirmed" = 'f' 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 Fri Sep 28 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-09-28 09:00:00.006424' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.006616' 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 9ms (Views: 8.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  (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.3ms) 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "always_false"], ["position", 0], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.019336' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.019492' 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.9ms | 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.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.000410', "fast_mode" = 't' 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 "updated_at" = '2012-09-28 09:00:00.002394', "confirmed" = 'f' 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "raise_error"], ["position", 0], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.004224' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.004441' 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-09-28T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /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:50:in `send' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:50: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:46:in `advert_selector_banner_try' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:17: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.3ms | 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 Fri Sep 28 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" CACHE (0.0ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 13ms (Views: 12.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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.000410', "fast_mode" = 't' 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 "updated_at" = '2012-09-28 09:00:00.002588', "confirmed" = 'f' 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 "updated_at" = '2012-09-28 09:00:00.000293', "frequency" = 2 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.003065' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.003233' 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.3ms | 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 Mon Oct 01 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-01 09:00:00.016529' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.016693' 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.1ms | 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 Mon Oct 01 12:00:00 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 1ms (Views: 1.3ms | 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.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-01 09:00:00.000432', "fast_mode" = 't' 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 "updated_at" = '2012-10-01 09:00:00.002461', "confirmed" = 'f' 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 Mon Oct 01 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-01 09:00:00.002260' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.002434' 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" = 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 Mon Oct 01 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 finished Completed 200 OK in 6ms (Views: 5.4ms | 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" = 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.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-01 09:00:00.000447', "fast_mode" = 't' 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 "updated_at" = '2012-10-01 09:00:00.002530', "confirmed" = 'f' 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 "updated_at" = '2012-10-01 09:00:00.000478', "confirmed" = 't' 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 Started GET "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.004204' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.004388' 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] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.9ms | 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" = 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 Mon Oct 01 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.6ms | 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" = 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.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-01 09:00:00.000423', "fast_mode" = 't' 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 "updated_at" = '2012-10-01 09:00:00.002425', "confirmed" = 'f' 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 "updated_at" = '2012-10-01 09:00:00.000446', "confirmed" = 't' 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-01 09:00:00.002638', "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-01 09:00:00.004090', "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-01 09:00:00.005824', "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 Mon Oct 01 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-01 09:00:00.009283' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.009454' 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 7ms (Views: 6.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" = 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.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-01 09:00:00.000422', "fast_mode" = 't' 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 "updated_at" = '2012-10-01 09:00:00.002458', "confirmed" = 'f' 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 Mon Oct 01 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-01 09:00:00.000228' 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 6ms (Views: 5.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 Started GET "/" for 127.0.0.1 at Mon Oct 01 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.6ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Mon Oct 01 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.5ms | 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.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-01 09:00:00.000416', "fast_mode" = 't' 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 "updated_at" = '2012-10-01 09:00:00.002465', "confirmed" = 'f' 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.2ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-10-01 09:00:00.000942', "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 Mon Oct 01 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-01 09:00:00.003993' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.004209' 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.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 Mon Oct 01 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]] 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-01 09:00:00.002267' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.002464' 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.5ms | ActiveRecord: 0.3ms)  (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-09-28 17:34:40', 100, '2012-10-03 00:00:00', 't', '2012-09-28 17:34:40', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 17:34:40', '2012-10-08 00:00:00', 't', '2012-09-28 17:34:40', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 17:34:40', '2012-10-08 00:00:00', 'f', '2012-09-28 17:34:40', 1000, 207249520, 1000, 't', 1, '2012-09-28 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-09-28 17:34:40', '2012-09-28 17:34:40', 960656439, 't', 394627963, '') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "id", "content_for", "banner_id", "content") VALUES (1, 'banner_leaderboard', '2012-09-28 17:34:40', '2012-09-28 17:34:40', 929640376, 't', 814558298, '') 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-09-28 17:34:40', '2012-09-28 17:34:40', 281932184, 't', 207249520, '') 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-09-28 17:34:40', '2012-09-28 17:34:40', 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-09-28 17:34:40', '2012-09-28 17:34:40', '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-09-28 17:34:40', '2012-09-28 17:34:40', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-28 17:34:40', '2012-09-28 17:34:40', 'parade', 405688915)  (43.3ms) 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.6ms) 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", nil], ["position", 2], ["updated_at", Fri, 28 Sep 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Fri, 28 Sep 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Fri, 28 Sep 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.2ms) rollback transaction  (0.1ms) 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-09-28 09:00:00.000133' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-28 09:00:00.001458' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.001623' 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-09-28 09:00:00.002738' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-09-28 09:00:00.003666' OR end_time IS NULL) AND (start_time < '2011-09-28 10:00:00.003810' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count)  (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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) 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 "updated_at" = '2012-09-28 09:00:00.001091', "running_view_count" = 0 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]]  (0.1ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.009402', "running_view_count" = 551 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 AdvertSelector::Banner Load (0.1ms) 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) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.001103', "target_view_count" = 10, "running_view_count" = 0 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.1ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.005405', "running_view_count" = 10 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.1ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_banners" SET "confirmed" = 'f', "updated_at" = '2012-09-28 09:00:00.000640' 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" = 't', "updated_at" = '2012-09-28 09:00:00.003266' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 AdvertSelector::Banner Load (0.1ms) 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.4ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-28 09:00:00.000988', "target_view_count" = 100, "end_time" = '2012-10-08 00:00:00.000000', "start_time" = '2012-09-27 21:00:00.000000' 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 "updated_at" = '2012-09-28 09:00:00.003465', "running_view_count" = 0 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 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.1ms) 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", 814558298]] 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.1ms) 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", 814558298]]  (0.1ms) rollback transaction  (0.1ms) 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-08 00:00:00 UTC", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-09-28 00:00:00 UTC"}}  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["end_time", Mon, 08 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", Fri, 28 Sep 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Fri, 28 Sep 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 6ms (ActiveRecord: 0.9ms)  (0.1ms) 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.1ms) 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.2ms) 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 5ms (ActiveRecord: 1.0ms)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners"   (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]] Processing by AdvertSelector::BannersController#edit 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"]] 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 (196.0ms) AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 216ms (Views: 213.4ms | ActiveRecord: 1.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#index as HTML AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners"  AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 11ms (Views: 10.0ms | 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]] 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 (20.1ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 28ms (Views: 27.5ms | 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.1ms) 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.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  (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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) 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.9ms | 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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 9ms (Views: 8.0ms | 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.1ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) 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.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.1ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-09-28 09:00:00.001162', "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.2ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-09-28 09:00:00.004214', "conflicting_placements_array" = '' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::Placement Load (0.2ms) 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.1ms) 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.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 718799085]] AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.1ms) rollback transaction  (0.1ms) 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.1ms) 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.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.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.1ms) 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Fri, 28 Sep 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.1ms) 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.1ms) SELECT COUNT(*) FROM "advert_selector_placements" Processing by AdvertSelector::PlacementsController#destroy as HTML Parameters: {"id"=>"405688915"} AdvertSelector::Placement Load (0.1ms) 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.3ms) 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.4ms)  (0.1ms) 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.1ms) 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 (7.1ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 17ms (Views: 15.4ms | ActiveRecord: 0.7ms)  (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::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 12ms (Views: 10.2ms | ActiveRecord: 0.7ms)  (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.4ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 12ms (Views: 10.9ms | ActiveRecord: 0.5ms)  (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.2ms) 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", 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.1ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) 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", 405688915]] Processing by AdvertSelector::PlacementsController#update as HTML Parameters: {"id"=>"405688915", "placement"=>{"name"=>"Leaderboard"}} AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", "405688915"]]  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/405688915 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.1ms) rollback transaction  (0.1ms) 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-09-28 09:00:00.000406' 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-09-28 09:00:00.002503' 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 Fri Sep 28 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-09-28 09:00:00.010509' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.010839' 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.3ms) 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 15ms (Views: 13.9ms | ActiveRecord: 0.8ms) 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.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.3ms) 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "always_false"], ["position", 0], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.028193' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.028458' 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] AdvertSelection finished Completed 200 OK in 8ms (Views: 6.8ms | ActiveRecord: 0.6ms) 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.1ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]]  (0.1ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-28 09:00:00.000788' 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-09-28 09:00:00.004597' 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  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."banner_id" = 814558298 AND position >= 0) 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "raise_error"], ["position", 0], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.007852' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.008188' 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.3ms) 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-09-28T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /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:51:in `send' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:51: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:47:in `advert_selector_banner_try' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:18: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 13ms (Views: 11.5ms | ActiveRecord: 0.8ms) 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 Started GET "/advert_selector/placements" for 127.0.0.1 at Fri Sep 28 12:00:00 +0300 2012 Processing by AdvertSelector::PlacementsController#index as HTML AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" CACHE (0.0ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.3ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 25ms (Views: 23.0ms | ActiveRecord: 0.7ms)  (0.2ms) rollback transaction  (0.1ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]]  (0.1ms) SAVEPOINT active_record_1  (0.5ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-28 09:00:00.000754' WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.2ms) 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.1ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "confirmed" = 'f', "updated_at" = '2012-09-28 09:00:00.005829' 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.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "frequency" = 2, "updated_at" = '2012-09-28 09:00:00.001166' WHERE "advert_selector_banners"."id" = 814558298  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.006489' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.006812' 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 Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 10ms (Views: 9.2ms | ActiveRecord: 0.7ms) 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 Started GET "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.026768' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.026967' 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 7ms (Views: 6.1ms | 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" = 814558298 AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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.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-01 09:00:00.000420' 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-01 09:00:00.002608' 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 Mon Oct 01 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-01 09:00:00.002319' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.002519' 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 7ms (Views: 6.2ms | 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 Started GET "/?advert_selector_force=207249520" for 127.0.0.1 at Mon Oct 01 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.2ms) 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-01 09:00:00.019415' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.019638' 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 11ms (Views: 10.3ms | ActiveRecord: 0.9ms) 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.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-01 09:00:00.000456' 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-01 09:00:00.002915' 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.1ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "confirmed" = 't', "updated_at" = '2012-10-01 09:00:00.000958' 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 Started GET "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.005537' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.005739' 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 parade_banner in placement Parade [AdvertSelector] AdvertSelection finished Completed 200 OK in 7ms (Views: 6.6ms | 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 Started GET "/" for 127.0.0.1 at Mon Oct 01 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: 3.1ms | 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" = 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) 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-01 09:00:00.000468' 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-01 09:00:00.002728' 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.1ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "confirmed" = 't', "updated_at" = '2012-10-01 09:00:00.000935' 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 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-01 09:00:00.005282', "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-01 09:00:00.006954', "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-01 09:00:00.009405', "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 Mon Oct 01 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-01 09:00:00.015690' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.015903' 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 parade_banner in placement Parade [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 9ms (Views: 8.2ms | ActiveRecord: 0.5ms) 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.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-01 09:00:00.000422' 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-01 09:00:00.002541' 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 Mon Oct 01 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-01 09:00:00.000242' 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 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 Mon Oct 01 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.6ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Mon Oct 01 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.5ms | 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.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-01 09:00:00.000414' 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-01 09:00:00.002479' 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 "only_once_per_session" = 't', "updated_at" = '2012-10-01 09:00:00.001013' WHERE "advert_selector_placements"."id" = 405688915  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.004987' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.005196' 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.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 "/" for 127.0.0.1 at Mon Oct 01 12:00:00 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 2ms (Views: 1.5ms | 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.1ms) 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.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]] 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-01 09:00:00.002514' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.002769' 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 7ms (Views: 6.0ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 17:35:08', 100, '2012-10-03 00:00:00', 't', '2012-09-28 17:35:08', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 17:35:08', '2012-10-08 00:00:00', 't', '2012-09-28 17:35:08', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 17:35:08', '2012-10-08 00:00:00', 'f', '2012-09-28 17:35:08', 1000, 207249520, 1000, 't', 1, '2012-09-28 00:00:00') Fixture Delete (0.3ms) 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-09-28 17:35:08', '2012-09-28 17:35:08', 960656439, 't', 394627963, '') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "id", "content_for", "banner_id", "content") VALUES (1, 'banner_leaderboard', '2012-09-28 17:35:08', '2012-09-28 17:35:08', 929640376, 't', 814558298, '') 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-09-28 17:35:08', '2012-09-28 17:35:08', 281932184, 't', 207249520, '') 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-09-28 17:35:08', '2012-09-28 17:35:08', 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-09-28 17:35:08', '2012-09-28 17:35:08', '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-09-28 17:35:08', '2012-09-28 17:35:08', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-28 17:35:08', '2012-09-28 17:35:08', 'parade', 405688915)  (42.6ms) 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.6ms) 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", nil], ["position", 2], ["updated_at", Fri, 28 Sep 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Fri, 28 Sep 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Fri, 28 Sep 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-09-28 09:00:00.000077' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-28 09:00:00.000961' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.001078' 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-09-28 09:00:00.001972' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-09-28 09:00:00.002696' OR end_time IS NULL) AND (start_time < '2011-09-28 10:00:00.002813' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count)  (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) 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-09-28 09:00:00.000861' 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-09-28 09:00:00.006979' 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-09-28 09:00:00.000873' 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-09-28 09:00:00.004564' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 AdvertSelector::Banner Load (0.1ms) 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.3ms) UPDATE "advert_selector_banners" SET "confirmed" = 'f', "updated_at" = '2012-09-28 09:00:00.000406' 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-09-28 09:00:00.002801' 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.3ms) UPDATE "advert_selector_banners" SET "target_view_count" = 100, "end_time" = '2012-10-08 00:00:00.000000', "start_time" = '2012-09-27 21:00:00.000000', "updated_at" = '2012-09-28 09:00:00.000832' 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" = 0, "updated_at" = '2012-09-28 09:00:00.002995' 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-08 00:00:00 UTC", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-09-28 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["end_time", Mon, 08 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", Fri, 28 Sep 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Fri, 28 Sep 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.8ms)  (0.0ms) SELECT COUNT(*) FROM "advert_selector_banners"  (0.3ms) rollback transaction  (0.1ms) 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#destroy 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"]]  (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.9ms)  (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 (136.5ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 152ms (Views: 150.8ms | 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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 10ms (Views: 9.1ms | ActiveRecord: 0.5ms)  (0.2ms) rollback transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.3ms) 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.1ms) 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.4ms) 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" 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 Completed 200 OK in 27ms (Views: 25.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]] 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.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 Redirected to http://test.host/advert_selector/banners/394627963 Completed 302 Found in 3ms (ActiveRecord: 0.3ms)  (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 1ms (Views: 1.0ms | 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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 8ms (Views: 7.0ms | ActiveRecord: 0.4ms)  (0.2ms) 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.3ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-09-28 09:00:00.000817', "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-09-28 09:00:00.002356', "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.1ms) 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.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.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.1ms) rollback transaction  (0.1ms) 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.1ms) 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.5ms) INSERT INTO "advert_selector_placements" ("conflicting_placements_array", "created_at", "name", "only_once_per_session", "updated_at") VALUES (?, ?, ?, ?, ?) [["conflicting_placements_array", nil], ["created_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Fri, 28 Sep 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.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_placements" Processing by AdvertSelector::PlacementsController#destroy as HTML Parameters: {"id"=>"405688915"} AdvertSelector::Placement Load (0.1ms) 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.3ms) 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.4ms)  (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 (13.3ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 27ms (Views: 25.4ms | 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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 9ms (Views: 8.3ms | 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.9ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 12ms (Views: 11.3ms | 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.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-09-28 09:00:00.000398' 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-09-28 09:00:00.002396' 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 Fri Sep 28 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-09-28 09:00:00.006887' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.007094' 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 10ms (Views: 9.5ms | 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" = 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.3ms) 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "always_false"], ["position", 0], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.021302' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.021487' 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 5ms (Views: 4.0ms | 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-09-28 09:00:00.000412' 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-09-28 09:00:00.002442' 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "raise_error"], ["position", 0], ["updated_at", Fri, 28 Sep 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.004347' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.004554' 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-09-28T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /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.7ms | 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 Fri Sep 28 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" CACHE (0.0ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 13ms (Views: 12.4ms | 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-09-28 09:00:00.000404' 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-09-28 09:00:00.002372' 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 "updated_at" = '2012-09-28 09:00:00.000291', "frequency" = 2 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.003503' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.003698' 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.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 "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.017178' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.017346' 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.3ms | 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 Mon Oct 01 12:00:00 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 2ms (Views: 1.5ms | 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.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-01 09:00:00.000426' 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-01 09:00:00.002459' 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 Mon Oct 01 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-01 09:00:00.002258' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.002435' 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.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 Started GET "/?advert_selector_force=207249520" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.015490' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.015659' 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 9ms (Views: 7.7ms | 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-01 09:00:00.000421' 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 "confirmed" = 'f', "updated_at" = '2012-10-01 09:00:00.002671' 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-01 09:00:00.000456' 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 Started GET "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.004386' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.004627' 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] AdvertSelection finished Completed 200 OK in 7ms (Views: 6.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" = 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 Mon Oct 01 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.7ms | 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" = 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.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-01 09:00:00.000431' 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-01 09:00:00.002499' 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-01 09:00:00.000462' 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-01 09:00:00.002653', "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-01 09:00:00.004492', "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.0ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-10-01 09:00:00.006233', "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 Mon Oct 01 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-01 09:00:00.009688' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.009862' 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 7ms (Views: 6.3ms | 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" = 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-01 09:00:00.000421' 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-01 09:00:00.002429' 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 Mon Oct 01 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-01 09:00:00.000238' 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: 5.0ms | 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 Mon Oct 01 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 Mon Oct 01 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.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-01 09:00:00.000415' 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-01 09:00:00.002415' 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 "only_once_per_session" = 't', "updated_at" = '2012-10-01 09:00:00.001021' WHERE "advert_selector_placements"."id" = 405688915  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.004026' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.004192' 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.3ms | 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 Mon Oct 01 12:00:00 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 2ms (Views: 1.5ms | 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]] 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-01 09:00:00.002241' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.002426' 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.5ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-28 18:02:21', 100, '2012-10-03 00:00:00', 't', '2012-09-28 18:02:21', 50, 814558298, 1000, 'f', 0, '2012-09-23 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-09-28 18:02:21', '2012-10-08 00:00:00', 't', '2012-09-28 18:02:21', 100, 394627963, 1000, 't', 0, '2012-09-28 00:00:00') Fixture Insert (0.1ms) 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-09-28 18:02:21', '2012-10-08 00:00:00', 'f', '2012-09-28 18:02:21', 1000, 207249520, 1000, 't', 1, '2012-09-28 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-09-28 18:02:21', '2012-09-28 18:02:21', 960656439, 't', 394627963, '') 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-09-28 18:02:21', '2012-09-28 18:02:21', 929640376, 't', 814558298, '') 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-09-28 18:02:21', '2012-09-28 18:02:21', 281932184, 't', 207249520, '') 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-09-28 18:02:21', '2012-09-28 18:02:21', 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-09-28 18:02:21', '2012-09-28 18:02:21', '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-09-28 18:02:21', '2012-09-28 18:02:21', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-28 18:02:21', '2012-09-28 18:02:21', 'parade', 405688915)  (41.1ms) 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.6ms) 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", nil], ["position", 2], ["updated_at", Fri, 28 Sep 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Fri, 28 Sep 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", Fri, 28 Sep 2012 09:00:00 UTC +00:00], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Fri, 28 Sep 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-09-28 09:00:00.000068' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-28 09:00:00.000916' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.001040' 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-09-28 09:00:00.001895' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-09-28 09:00:00.002585' OR end_time IS NULL) AND (start_time < '2011-09-28 10:00:00.002704' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count)  (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) 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-09-28 09:00:00.000892' 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-09-28 09:00:00.006856' 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.3ms) UPDATE "advert_selector_banners" SET "running_view_count" = 0, "target_view_count" = 10, "updated_at" = '2012-09-28 09:00:00.000956' 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-09-28 09:00:00.004541' 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-09-28 09:00:00.000397' 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-09-28 09:00:00.002363' 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.4ms) UPDATE "advert_selector_banners" SET "start_time" = '2012-09-27 21:00:00.000000', "end_time" = '2012-10-08 00:00:00.000000', "target_view_count" = 100, "updated_at" = '2012-09-28 09:00:00.000888' 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" = 0, "updated_at" = '2012-09-28 09:00:00.003137' 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", "end_time"=>"2012-10-08 00:00:00 UTC", "placement_id"=>"405688915", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-09-28 00:00:00 UTC"}}  (0.1ms) SAVEPOINT active_record_1 SQL (2.1ms) 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", Fri, 28 Sep 2012 12:00:00 EEST +03:00], ["end_time", Mon, 08 Oct 2012 03:00:00 EEST +03:00], ["fast_mode", false], ["frequency", 0], ["name", "Pepsi"], ["placement_id", 405688915], ["priority", 0], ["running_view_count", 0], ["start_time", Fri, 28 Sep 2012 03:00:00 EEST +03:00], ["target_view_count", 1000], ["updated_at", Fri, 28 Sep 2012 12:00:00 EEST +03: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 7ms (ActiveRecord: 2.2ms)  (0.1ms) 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.1ms) SELECT COUNT(*) FROM "advert_selector_banners" Processing by AdvertSelector::BannersController#destroy 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"]]  (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" = 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.9ms)  (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.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]] Processing by AdvertSelector::BannersController#edit 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"]] 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 (133.3ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 150ms (Views: 148.3ms | 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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 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.8ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 27ms (Views: 25.5ms | 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]] Processing by AdvertSelector::MainController#index as HTML Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 1ms (Views: 0.9ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) 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 2ms (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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 8ms (Views: 7.0ms | 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.3ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = 'not_found,video', "updated_at" = '2012-09-28 09:00:00.000833' 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 "conflicting_placements_array" = '', "updated_at" = '2012-09-28 09:00:00.002359' 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.2ms) rollback transaction  (0.1ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) 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.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.1ms) rollback transaction  (0.1ms) 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.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]] AdvertSelector::Placement Load (0.0ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_placements"  Processing by AdvertSelector::PlacementsController#create as HTML Parameters: {"placement"=>{"name"=>"new placement"}}  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "advert_selector_placements" ("conflicting_placements_array", "created_at", "name", "only_once_per_session", "updated_at") VALUES (?, ?, ?, ?, ?) [["conflicting_placements_array", nil], ["created_at", Fri, 28 Sep 2012 12:00:00 EEST +03:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Fri, 28 Sep 2012 12:00:00 EEST +03:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/1019730478 Completed 302 Found in 3ms (ActiveRecord: 0.6ms)  (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.1ms) 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.3ms) 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.4ms)  (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 (6.0ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 15ms (Views: 13.4ms | 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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 10ms (Views: 8.7ms | 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.1ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 11ms (Views: 10.3ms | 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.1ms) rollback transaction  (0.1ms) 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.5ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-28 09:00:00.000786' 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-09-28 09:00:00.004165' 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 Fri Sep 28 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-09-28 09:00:00.014084' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.014310' 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 11ms (Views: 10.6ms | 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" = 814558298 AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."banner_id" = 814558298 AND position >= 0) SQL (0.4ms) 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", Fri, 28 Sep 2012 12:00:00 EEST +03:00], ["name", "always_false"], ["position", 0], ["updated_at", Fri, 28 Sep 2012 12:00:00 EEST +03:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.030204' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.030413' 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 5ms (Views: 4.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  (0.2ms) rollback transaction  (0.1ms) 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-09-28 09:00:00.000531' 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-09-28 09:00:00.002944' 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.3ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."banner_id" = 814558298 AND position >= 0) SQL (0.3ms) 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", Fri, 28 Sep 2012 12:00:00 EEST +03:00], ["name", "raise_error"], ["position", 0], ["updated_at", Fri, 28 Sep 2012 12:00:00 EEST +03:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.005040' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.005283' 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-09-28T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /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 7ms (Views: 5.9ms | 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 Fri Sep 28 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" CACHE (0.0ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 14ms (Views: 12.7ms | 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.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-28 09:00:00.000473' 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-09-28 09:00:00.002856' 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-09-28 09:00:00.000343' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Sep 28 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-09-28 09:00:00.003188' OR end_time IS NULL) AND (start_time < '2012-09-28 10:00:00.003366' 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.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 "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.017093' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.017272' 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.7ms | 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 Mon Oct 01 12:00:00 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 2ms (Views: 1.5ms | 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.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-01 09:00:00.000465' 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-01 09:00:00.002539' 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 Mon Oct 01 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-01 09:00:00.002320' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.002488' 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.6ms | 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" = 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 Mon Oct 01 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-01 09:00:00.015933' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.016126' 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 9ms (Views: 8.1ms | 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-01 09:00:00.000482' 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-01 09:00:00.002489' 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-01 09:00:00.000464' 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 Started GET "/" for 127.0.0.1 at Mon Oct 01 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-01 09:00:00.004053' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.004238' 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] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.6ms | 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" = 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 Mon Oct 01 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.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-01 09:00:00.000478' 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-01 09:00:00.002497' 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-01 09:00:00.000464' 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.1ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = '', "updated_at" = '2012-10-01 09:00:00.002699' 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 "conflicting_placements_array" = '', "updated_at" = '2012-10-01 09:00:00.004005' 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 "conflicting_placements_array" = '', "updated_at" = '2012-10-01 09:00:00.005682' 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 Mon Oct 01 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-01 09:00:00.009389' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.009657' 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 7ms (Views: 6.9ms | 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" = 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.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-01 09:00:00.000460' 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-01 09:00:00.002466' 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 Mon Oct 01 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-01 09:00:00.000391' 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 6ms (Views: 5.5ms | 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 Mon Oct 01 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 Mon Oct 01 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.2ms) 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-01 09:00:00.000460' 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-01 09:00:00.002491' 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.2ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-10-01 09:00:00.001306', "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 Mon Oct 01 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-01 09:00:00.004470' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.004645' 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.3ms | 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 Mon Oct 01 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.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]] 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-01 09:00:00.002626' OR end_time IS NULL) AND (start_time < '2012-10-01 10:00:00.002847' 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.9ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-30 11:53:57', 100, '2012-10-05 00:00:00', 't', '2012-09-30 11:53:57', 50, 814558298, 1000, 'f', 0, '2012-09-25 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-09-30 11:53:57', '2012-10-10 00:00:00', 't', '2012-09-30 11:53:57', 100, 394627963, 1000, 't', 0, '2012-09-30 00:00:00') Fixture Insert (0.1ms) 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-09-30 11:53:57', '2012-10-10 00:00:00', 'f', '2012-09-30 11:53:57', 1000, 207249520, 1000, 't', 1, '2012-09-30 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-09-30 11:53:57', '2012-09-30 11:53:57', 960656439, 't', 394627963, '') 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-09-30 11:53:57', '2012-09-30 11:53:57', 929640376, 't', 814558298, '') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "id", "content_for", "banner_id", "content") VALUES ('banner_parade', 1, '2012-09-30 11:53:57', '2012-09-30 11:53:57', 281932184, 't', 207249520, '') 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-09-30 11:53:57', '2012-09-30 11:53:57', 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-09-30 11:53:57', '2012-09-30 11:53:57', '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-09-30 11:53:57', '2012-09-30 11:53:57', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-30 11:53:57', '2012-09-30 11:53:57', 'parade', 405688915)  (42.9ms) 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, 30 Sep 2012 09:00:00 UTC +00:00], ["name", nil], ["position", 2], ["updated_at", Sun, 30 Sep 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, 30 Sep 2012 09:00:00 UTC +00:00], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Sun, 30 Sep 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, 30 Sep 2012 09:00:00 UTC +00:00], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Sun, 30 Sep 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-09-30 09:00:00.000073' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-30 09:00:00.000925' OR end_time IS NULL) AND (start_time < '2012-09-30 10:00:00.001042' 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-09-30 09:00:00.001898' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-09-30 09:00:00.002617' OR end_time IS NULL) AND (start_time < '2011-09-30 10:00:00.002733' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count)  (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) 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-09-30 09:00:00.001069' 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-09-30 09:00:00.007077' 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-09-30 09:00:00.000908' 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-09-30 09:00:00.004390' 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.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 "updated_at" = '2012-09-30 09:00:00.001008', "confirmed" = 'f' 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 "updated_at" = '2012-09-30 09:00:00.003367', "confirmed" = 't' 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.3ms) UPDATE "advert_selector_banners" SET "target_view_count" = 100, "updated_at" = '2012-09-30 09:00:00.000861', "end_time" = '2012-10-10 00:00:00.000000', "start_time" = '2012-09-29 21:00:00.000000' 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" = 0, "updated_at" = '2012-09-30 09:00:00.002949' 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.1ms) 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", "end_time"=>"2012-10-10 00:00:00 UTC", "placement_id"=>"405688915", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-09-30 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, 30 Sep 2012 09:00:00 UTC +00:00], ["end_time", Wed, 10 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, 30 Sep 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Sun, 30 Sep 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.8ms)  (0.1ms) 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.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_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.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" = 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.3ms) 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 5ms (ActiveRecord: 0.9ms)  (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 (158.1ms) 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" ORDER BY priority desc LIMIT 10 AdvertSelector::Placement Load (0.2ms) 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 Completed 200 OK in 178ms (Views: 175.8ms | ActiveRecord: 1.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#index as HTML AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners"  AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 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.4ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 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]] Processing by AdvertSelector::MainController#index as HTML Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 1ms (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::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 8ms (Views: 7.0ms | 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.3ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-09-30 09:00:00.000824', "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-09-30 09:00:00.002351', "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.1ms) 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.2ms) rollback transaction  (0.1ms) 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.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]] 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.1ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) 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.1ms) 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.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.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]] 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, 30 Sep 2012 09:00:00 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Sun, 30 Sep 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.3ms) 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.4ms)  (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 (6.0ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 15ms (Views: 13.6ms | ActiveRecord: 0.6ms)  (0.2ms) 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.1ms) 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", 405688915]] Processing by AdvertSelector::PlacementsController#index as HTML AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 10ms (Views: 8.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#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.6ms) AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 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.1ms) 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.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 09:00:00.000416', "fast_mode" = 't' 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 "updated_at" = '2012-09-30 09:00:00.002284', "confirmed" = 'f' 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 Sep 30 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-09-30 09:00:00.006829' OR end_time IS NULL) AND (start_time < '2012-09-30 10:00:00.007014' 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 9ms (Views: 8.8ms | 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.3ms) 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, 30 Sep 2012 09:00:00 UTC +00:00], ["name", "always_false"], ["position", 0], ["updated_at", Sun, 30 Sep 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 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-09-30 09:00:00.019757' OR end_time IS NULL) AND (start_time < '2012-09-30 10:00:00.019930' 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.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.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 "updated_at" = '2012-09-30 09:00:00.000401', "fast_mode" = 't' 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 "updated_at" = '2012-09-30 09:00:00.002271', "confirmed" = 'f' 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, 30 Sep 2012 09:00:00 UTC +00:00], ["name", "raise_error"], ["position", 0], ["updated_at", Sun, 30 Sep 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 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-09-30 09:00:00.004029' OR end_time IS NULL) AND (start_time < '2012-09-30 10:00:00.004204' 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-09-30T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /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 5ms (Views: 4.9ms | 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 Sep 30 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" CACHE (0.0ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 Completed 200 OK in 18ms (Views: 16.9ms | 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 "updated_at" = '2012-09-30 09:00:00.000417', "fast_mode" = 't' 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 "updated_at" = '2012-09-30 09:00:00.002234', "confirmed" = 'f' 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 "updated_at" = '2012-09-30 09:00:00.000264', "frequency" = 2 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 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-09-30 09:00:00.002980' OR end_time IS NULL) AND (start_time < '2012-09-30 10:00:00.003144' 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.0ms | 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 03 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-03 09:00:00.015970' OR end_time IS NULL) AND (start_time < '2012-10-03 10:00:00.016145' 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.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 03 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 "updated_at" = '2012-10-03 09:00:00.000391', "fast_mode" = 't' 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 "updated_at" = '2012-10-03 09:00:00.002234', "confirmed" = 'f' 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 03 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-03 09:00:00.002219' OR end_time IS NULL) AND (start_time < '2012-10-03 10:00:00.002397' 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.0ms | 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" = 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 03 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-03 09:00:00.016037' OR end_time IS NULL) AND (start_time < '2012-10-03 10:00:00.016219' 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 9ms (Views: 8.5ms | 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 "updated_at" = '2012-10-03 09:00:00.000401', "fast_mode" = 't' 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 "updated_at" = '2012-10-03 09:00:00.002285', "confirmed" = 'f' 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 "updated_at" = '2012-10-03 09:00:00.000410', "confirmed" = 't' 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 Started GET "/" for 127.0.0.1 at Wed Oct 03 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-03 09:00:00.004018' OR end_time IS NULL) AND (start_time < '2012-10-03 10:00:00.004198' 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] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.6ms | 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" = 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 03 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.6ms | 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" = 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.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-03 09:00:00.000392', "fast_mode" = 't' 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 "updated_at" = '2012-10-03 09:00:00.002246', "confirmed" = 'f' 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 "updated_at" = '2012-10-03 09:00:00.000410', "confirmed" = 't' 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.1ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-10-03 09:00:00.002416', "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-03 09:00:00.003685', "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-03 09:00:00.005446', "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 03 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-03 09:00:00.008850' OR end_time IS NULL) AND (start_time < '2012-10-03 10:00:00.009025' 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 7ms (Views: 6.2ms | 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" = 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.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-03 09:00:00.000426', "fast_mode" = 't' 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 "updated_at" = '2012-10-03 09:00:00.002483', "confirmed" = 'f' 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 03 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-03 09:00:00.000246' 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 6ms (Views: 5.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 Started GET "/" for 127.0.0.1 at Wed Oct 03 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: 4.1ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Wed Oct 03 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.8ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) 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 "updated_at" = '2012-10-03 09:00:00.000676', "fast_mode" = 't' 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 "updated_at" = '2012-10-03 09:00:00.002981', "confirmed" = 'f' 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 "only_once_per_session" = 't', "updated_at" = '2012-10-03 09:00:00.001042' WHERE "advert_selector_placements"."id" = 405688915  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Wed Oct 03 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-03 09:00:00.004170' OR end_time IS NULL) AND (start_time < '2012-10-03 10:00:00.004365' 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.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 "/" for 127.0.0.1 at Wed Oct 03 12:00:00 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 2ms (Views: 1.8ms | 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.2ms) 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.1ms) 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.3ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time > '2012-10-03 09:00:00.003722' OR end_time IS NULL) AND (start_time < '2012-10-03 10:00:00.004033' 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 9ms (Views: 8.4ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-09-30 12:11:54', 100, '2012-10-05 00:00:00', 't', '2012-09-30 12:11:54', 50, 814558298, 1000, 'f', 0, '2012-09-25 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-09-30 12:11:54', '2012-10-10 00:00:00', 't', '2012-09-30 12:11:54', 100, 394627963, 1000, 't', 0, '2012-09-30 00:00:00') Fixture Insert (0.1ms) 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-09-30 12:11:54', '2012-10-10 00:00:00', 'f', '2012-09-30 12:11:54', 1000, 207249520, 1000, 't', 1, '2012-09-30 00:00:00') Fixture Delete (0.4ms) 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-09-30 12:11:54', '2012-09-30 12:11:54', 960656439, 't', 394627963, '') 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-09-30 12:11:54', '2012-09-30 12:11:54', 929640376, 't', 814558298, '') 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-09-30 12:11:54', '2012-09-30 12:11:54', 281932184, 't', 207249520, '') 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-09-30 12:11:54', '2012-09-30 12:11:54', 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-09-30 12:11:54', '2012-09-30 12:11:54', '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-09-30 12:11:54', '2012-09-30 12:11:54', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-09-30 12:11:54', '2012-09-30 12:11:54', 'parade', 405688915)  (45.8ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.3ms) 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, 30 Sep 2012 09:00:00 UTC +00:00], ["name", nil], ["position", 2], ["updated_at", Sun, 30 Sep 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, 30 Sep 2012 09:00:00 UTC +00:00], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Sun, 30 Sep 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, 30 Sep 2012 09:00:00 UTC +00:00], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Sun, 30 Sep 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-09-30 09:00:00.000072' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-09-30 09:00:00.000897' OR end_time IS NULL) AND (start_time < '2012-09-30 10:00:00.001013' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count)  (0.2ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-09-30 09:00:00.001984' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-09-30 09:00:00.002920' OR end_time IS NULL) AND (start_time < '2011-09-30 10:00:00.003035' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count)  (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) 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 "updated_at" = '2012-09-30 09:00:00.000923', "running_view_count" = 0 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.1ms) 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 "updated_at" = '2012-09-30 09:00:00.007568', "running_view_count" = 551 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 "updated_at" = '2012-09-30 09:00:00.000964', "running_view_count" = 0, "target_view_count" = 10 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 "updated_at" = '2012-09-30 09:00:00.004449', "running_view_count" = 10 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 "updated_at" = '2012-09-30 09:00:00.000396', "confirmed" = 'f' 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 "updated_at" = '2012-09-30 09:00:00.002412', "confirmed" = 't' 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.1ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-09-30 09:00:00.000954', "start_time" = '2012-09-29 21:00:00.000000', "end_time" = '2012-10-10 00:00:00.000000', "target_view_count" = 100 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 "updated_at" = '2012-09-30 09:00:00.003372', "running_view_count" = 0 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.1ms) 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", 814558298]] 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", 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.1ms) 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", "end_time"=>"2012-10-10 00:00:00 UTC", "placement_id"=>"405688915", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-09-30 00:00:00 UTC"}}  (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) 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, 30 Sep 2012 09:00:00 UTC +00:00], ["end_time", Wed, 10 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, 30 Sep 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Sun, 30 Sep 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 6ms (ActiveRecord: 1.0ms)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners"  (0.2ms) rollback transaction  (0.1ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) 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#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.1ms) SAVEPOINT active_record_1 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 SQL (0.5ms) DELETE FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."id" = ? [["id", 435138789]] SQL (0.1ms) 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.4ms) DELETE FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? [["id", 394627963]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/banners Completed 302 Found in 9ms (ActiveRecord: 1.6ms)  (0.1ms) 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.1ms) 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.1ms) 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 (145.9ms) AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 164ms (Views: 162.0ms | 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" 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]] 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.6ms) AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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.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  (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]] Processing by AdvertSelector::MainController#index as HTML Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 1ms (Views: 1.0ms | 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" 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.0ms | 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.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.3ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = 'not_found,video', "updated_at" = '2012-09-30 09:00:00.000844' 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 "conflicting_placements_array" = '', "updated_at" = '2012-09-30 09:00:00.002525' 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.1ms) 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.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.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.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.1ms) SELECT COUNT(*) FROM "advert_selector_placements"  Processing by AdvertSelector::PlacementsController#create as HTML Parameters: {"placement"=>{"name"=>"new placement"}}  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) 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, 30 Sep 2012 09:00:00 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Sun, 30 Sep 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 4ms (ActiveRecord: 0.7ms)  (0.1ms) 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.1ms) 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.3ms) 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.4ms)  (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 (6.0ms) AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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.2ms | 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" 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: 8.7ms | 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.7ms) AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 13ms (Views: 12.2ms | 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#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.1ms) 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.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-09-30 09:00:00.000452' 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 "updated_at" = '2012-09-30 09:00:00.002406', "confirmed" = 'f' 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 Sep 30 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-09-30 09:00:00.006424' OR end_time IS NULL) AND (start_time < '2012-09-30 10:00:00.006618' 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 9ms (Views: 8.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  (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.3ms) 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, 30 Sep 2012 09:00:00 UTC +00:00], ["name", "always_false"], ["position", 0], ["updated_at", Sun, 30 Sep 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 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-09-30 09:00:00.019386' OR end_time IS NULL) AND (start_time < '2012-09-30 10:00:00.019544' 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.7ms | 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.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-09-30 09:00:00.000406' 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 "updated_at" = '2012-09-30 09:00:00.002491', "confirmed" = 'f' 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, 30 Sep 2012 09:00:00 UTC +00:00], ["name", "raise_error"], ["position", 0], ["updated_at", Sun, 30 Sep 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 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-09-30 09:00:00.004237' OR end_time IS NULL) AND (start_time < '2012-09-30 10:00:00.004417' 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-09-30T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /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.0ms | 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 "/advert_selector/placements" for 127.0.0.1 at Sun Sep 30 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 13ms (Views: 12.3ms | 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.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-09-30 09:00:00.000458' 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 "updated_at" = '2012-09-30 09:00:00.002677', "confirmed" = 'f' 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 "updated_at" = '2012-09-30 09:00:00.000294', "frequency" = 2 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Sep 30 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-09-30 09:00:00.003285' OR end_time IS NULL) AND (start_time < '2012-09-30 10:00:00.003487' 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.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 "/" for 127.0.0.1 at Wed Oct 03 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-03 09:00:00.017813' OR end_time IS NULL) AND (start_time < '2012-10-03 10:00:00.018011' 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 7ms (Views: 5.8ms | 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" = 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 03 12:00:00 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 2ms (Views: 1.5ms | 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.1ms) 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-03 09:00:00.000487' 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 "updated_at" = '2012-10-03 09:00:00.002887', "confirmed" = 'f' 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 03 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-03 09:00:00.002443' OR end_time IS NULL) AND (start_time < '2012-10-03 10:00:00.002657' 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.8ms | 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 Started GET "/?advert_selector_force=207249520" for 127.0.0.1 at Wed Oct 03 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-03 09:00:00.017675' OR end_time IS NULL) AND (start_time < '2012-10-03 10:00:00.017907' 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] AdvertSelection finished Completed 200 OK in 11ms (Views: 10.4ms | ActiveRecord: 0.8ms) 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  (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.4ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-03 09:00:00.000506' 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.4ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-03 09:00:00.003226', "confirmed" = 'f' 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 "updated_at" = '2012-10-03 09:00:00.000634', "confirmed" = 't' 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 Started GET "/" for 127.0.0.1 at Wed Oct 03 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-03 09:00:00.005154' OR end_time IS NULL) AND (start_time < '2012-10-03 10:00:00.005365' 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] 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 Started GET "/" for 127.0.0.1 at Wed Oct 03 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.9ms | 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" = 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-03 09:00:00.000467' 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 "updated_at" = '2012-10-03 09:00:00.002762', "confirmed" = 'f' 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 "updated_at" = '2012-10-03 09:00:00.000536', "confirmed" = 't' 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 "conflicting_placements_array" = '', "updated_at" = '2012-10-03 09:00:00.003410' 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 "conflicting_placements_array" = '', "updated_at" = '2012-10-03 09:00:00.005420' 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 "conflicting_placements_array" = '', "updated_at" = '2012-10-03 09:00:00.007640' 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 03 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.4ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time > '2012-10-03 09:00:00.011844' OR end_time IS NULL) AND (start_time < '2012-10-03 10:00:00.012056' 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 9ms (Views: 8.1ms | 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 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-03 09:00:00.000458' 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.4ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-03 09:00:00.002875', "confirmed" = 'f' 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 03 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-03 09:00:00.000261' 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 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 03 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.9ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Wed Oct 03 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.9ms | 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.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-03 09:00:00.000466' 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 "updated_at" = '2012-10-03 09:00:00.002586', "confirmed" = 'f' 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.2ms) UPDATE "advert_selector_placements" SET "only_once_per_session" = 't', "updated_at" = '2012-10-03 09:00:00.000947' WHERE "advert_selector_placements"."id" = 405688915  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Wed Oct 03 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-03 09:00:00.004047' OR end_time IS NULL) AND (start_time < '2012-10-03 10:00:00.004226' 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.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 "/" for 127.0.0.1 at Wed Oct 03 12:00:00 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 2ms (Views: 1.5ms | 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]] 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-03 09:00:00.002389' OR end_time IS NULL) AND (start_time < '2012-10-03 10:00:00.002566' 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)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-02 08:55:08', 100, '2012-10-07 00:00:00', 't', '2012-10-02 08:55:08', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-02 08:55:08', '2012-10-12 00:00:00', 't', '2012-10-02 08:55:08', 100, 394627963, 1000, 't', 0, '2012-10-02 00:00:00') Fixture Insert (0.1ms) 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-02 08:55:08', '2012-10-12 00:00:00', 'f', '2012-10-02 08:55:08', 1000, 207249520, 1000, 't', 1, '2012-10-02 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-02 08:55:08', '2012-10-02 08:55:08', 960656439, 't', 394627963, '') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "id", "content_for", "banner_id", "content") VALUES (1, 'banner_leaderboard', '2012-10-02 08:55:08', '2012-10-02 08:55:08', 929640376, 't', 814558298, '') 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-02 08:55:08', '2012-10-02 08:55:08', 281932184, 't', 207249520, '') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "id", "content_for", "banner_id", "content") VALUES ('request_params_include?', '2012-10-02 08:55:08', '2012-10-02 08:55:08', 435138789, 'f', 394627963, 'pepsi=true') Fixture Delete (0.1ms) DELETE FROM "advert_selector_placements" Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Parade', '2012-10-02 08:55:08', '2012-10-02 08:55:08', 'leaderboard,video', 718799085) Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "only_once_per_session", "id") VALUES ('Video', '2012-10-02 08:55:08', '2012-10-02 08:55:08', '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-02 08:55:08', '2012-10-02 08:55:08', 'parade', 405688915)  (40.0ms) commit transaction  (0.0ms) 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) SELECT COUNT(*) FROM "advert_selector_helper_items"  (0.1ms) SAVEPOINT active_record_1 AdvertSelector::HelperItem Load (0.2ms) 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.7ms) 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", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["name", nil], ["position", 2], ["updated_at", Tue, 02 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.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", true], ["created_at", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Tue, 02 Oct 2012 09:00:00 UTC +00:00]] 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.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", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Tue, 02 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-02 09:00:00.000070' OR end_time IS NULL)  (0.3ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-10-02 09:00:00.000895' OR end_time IS NULL) AND (start_time < '2012-10-02 10:00:00.001127' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count)  (0.3ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-10-02 09:00:00.004643' OR end_time IS NULL)  (0.3ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-10-02 09:00:00.007386' OR end_time IS NULL) AND (start_time < '2011-10-02 10:00:00.007836' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count)  (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) 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 "updated_at" = '2012-10-02 09:00:00.000949', "running_view_count" = 0 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.1ms) 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 "updated_at" = '2012-10-02 09:00:00.007113', "running_view_count" = 551 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 "updated_at" = '2012-10-02 09:00:00.000903', "running_view_count" = 0, "target_view_count" = 10 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 "updated_at" = '2012-10-02 09:00:00.004318', "running_view_count" = 10 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 "updated_at" = '2012-10-02 09:00:00.000397', "confirmed" = 'f' 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 "updated_at" = '2012-10-02 09:00:00.002381', "confirmed" = 't' 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 "updated_at" = '2012-10-02 09:00:00.000776', "start_time" = '2012-10-02 10:00:00.000357' 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.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 "updated_at" = '2012-10-02 09:00:00.000866', "end_time" = '2012-10-12 00:00:00.000000', "start_time" = '2012-10-01 21:00:00.000000', "target_view_count" = 100 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 "updated_at" = '2012-10-02 09:00:00.002980', "running_view_count" = 0 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.1ms) 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", 814558298]] AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]]  (0.1ms) rollback transaction  (0.1ms) 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", "end_time"=>"2012-10-12 00:00:00 UTC", "placement_id"=>"405688915", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-10-02 00:00:00 UTC"}}  (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) 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", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["end_time", Fri, 12 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", Tue, 02 Oct 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Tue, 02 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 6ms (ActiveRecord: 1.0ms)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners"   (0.2ms) 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#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.4ms) 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.3ms) 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 5ms (ActiveRecord: 1.0ms)  (0.1ms) 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 (72.4ms) AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 185ms (Views: 183.3ms | 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" 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]] 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.4ms) AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 26ms (Views: 25.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#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]] Processing by AdvertSelector::MainController#index as HTML Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 1ms (Views: 1.0ms | 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" 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.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" Completed 200 OK in 8ms (Views: 6.9ms | 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.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.3ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = 'not_found,video', "updated_at" = '2012-10-02 09:00:00.000814' 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 "conflicting_placements_array" = '', "updated_at" = '2012-10-02 09:00:00.002349' 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.1ms) 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.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.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.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.1ms) 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.5ms) INSERT INTO "advert_selector_placements" ("conflicting_placements_array", "created_at", "name", "only_once_per_session", "updated_at") VALUES (?, ?, ?, ?, ?) [["conflicting_placements_array", nil], ["created_at", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Tue, 02 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.6ms)  (0.1ms) 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.3ms) 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.4ms)  (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 (6.0ms) AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 16ms (Views: 14.9ms | ActiveRecord: 0.7ms)  (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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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: 8.6ms | 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.3ms) AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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: 10.8ms | 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.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]] 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.1ms) 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.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-02 09:00:00.000407' 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 "updated_at" = '2012-10-02 09:00:00.002393', "confirmed" = 'f' 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 Tue Oct 02 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-02 09:00:00.006904' OR end_time IS NULL) AND (start_time < '2012-10-02 10:00:00.007103' 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.0ms | 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.3ms) 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", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["name", "always_false"], ["position", 0], ["updated_at", Tue, 02 Oct 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Tue Oct 02 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-02 09:00:00.020092' OR end_time IS NULL) AND (start_time < '2012-10-02 10:00:00.020267' 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.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.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-02 09:00:00.000409' 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 "updated_at" = '2012-10-02 09:00:00.002365', "confirmed" = 'f' 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", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["name", "raise_error"], ["position", 0], ["updated_at", Tue, 02 Oct 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Tue Oct 02 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-02 09:00:00.004163' OR end_time IS NULL) AND (start_time < '2012-10-02 10:00:00.004354' 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-02T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /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.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 "/advert_selector/placements" for 127.0.0.1 at Tue Oct 02 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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.7ms | 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.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-02 09:00:00.000443' 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 "updated_at" = '2012-10-02 09:00:00.002393', "confirmed" = 'f' 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 "updated_at" = '2012-10-02 09:00:00.000280', "frequency" = 2 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Tue Oct 02 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-02 09:00:00.003144' OR end_time IS NULL) AND (start_time < '2012-10-02 10:00:00.003322' 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.3ms | 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 Fri Oct 05 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-05 09:00:00.016950' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.017139' 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.3ms | 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 Fri Oct 05 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-05 09:00:00.000419' 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 "updated_at" = '2012-10-05 09:00:00.002389', "confirmed" = 'f' 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 Fri Oct 05 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-05 09:00:00.002299' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.002507' 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.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 Started GET "/?advert_selector_force=207249520" for 127.0.0.1 at Fri Oct 05 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-05 09:00:00.016477' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.016668' 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 9ms (Views: 8.4ms | 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.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-05 09:00:00.000471' 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 "updated_at" = '2012-10-05 09:00:00.002781', "confirmed" = 'f' 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 "updated_at" = '2012-10-05 09:00:00.000525', "confirmed" = 't' 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 Started GET "/" for 127.0.0.1 at Fri Oct 05 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-05 09:00:00.004660' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.004875' 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] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.6ms | 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" = 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 Fri Oct 05 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) 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.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-05 09:00:00.000400' 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 "updated_at" = '2012-10-05 09:00:00.002434', "confirmed" = 'f' 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 "updated_at" = '2012-10-05 09:00:00.000440', "confirmed" = 't' 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.1ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = '', "updated_at" = '2012-10-05 09:00:00.002521' 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.0ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = '', "updated_at" = '2012-10-05 09:00:00.003739' 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.0ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = '', "updated_at" = '2012-10-05 09:00:00.005280' 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 Fri Oct 05 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-05 09:00:00.008608' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.008786' 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 7ms (Views: 6.0ms | 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" = 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.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-05 09:00:00.000723' 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 "updated_at" = '2012-10-05 09:00:00.002820', "confirmed" = 'f' 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 Fri Oct 05 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-05 09:00:00.000238' 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.6ms | 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 Fri Oct 05 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 Fri Oct 05 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.4ms | 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.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-05 09:00:00.000422' 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 "updated_at" = '2012-10-05 09:00:00.002459', "confirmed" = 'f' 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 "only_once_per_session" = 't', "updated_at" = '2012-10-05 09:00:00.000912' WHERE "advert_selector_placements"."id" = 405688915  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Oct 05 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-05 09:00:00.003812' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.003985' 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 5ms (Views: 5.0ms | 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 Fri Oct 05 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]] 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-05 09:00:00.002289' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.002480' 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)  (0.1ms) rollback transaction Connecting to database specified by database.yml Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-02 08:57:11', 100, '2012-10-07 00:00:00', 't', '2012-10-02 08:57:11', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-02 08:57:11', '2012-10-12 00:00:00', 't', '2012-10-02 08:57:11', 100, 394627963, 1000, 't', 0, '2012-10-02 00:00:00') Fixture Insert (0.1ms) 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-02 08:57:11', '2012-10-12 00:00:00', 'f', '2012-10-02 08:57:11', 1000, 207249520, 1000, 't', 1, '2012-10-02 00:00:00') Fixture Delete (0.2ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "id", "content_for", "banner_id", "content") VALUES ('banner_leaderboard', 2, '2012-10-02 08:57:11', '2012-10-02 08:57:11', 960656439, 't', 394627963, '') 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-02 08:57:11', '2012-10-02 08:57:11', 929640376, 't', 814558298, '') 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-02 08:57:11', '2012-10-02 08:57:11', 281932184, 't', 207249520, '') 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-02 08:57:11', '2012-10-02 08:57:11', 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-02 08:57:11', '2012-10-02 08:57:11', '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-02 08:57:11', '2012-10-02 08:57:11', '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-02 08:57:11', '2012-10-02 08:57:11', 'parade', 405688915)  (46.0ms) 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.6ms) 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", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["name", nil], ["position", 2], ["updated_at", Tue, 02 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", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Tue, 02 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", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Tue, 02 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-02 09:00:00.000068' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-10-02 09:00:00.000962' OR end_time IS NULL) AND (start_time < '2012-10-02 10:00:00.001084' 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-02 09:00:00.001968' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-10-02 09:00:00.002657' OR end_time IS NULL) AND (start_time < '2011-10-02 10:00:00.002770' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count)  (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) 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 "updated_at" = '2012-10-02 09:00:00.000875', "running_view_count" = 0 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]]  (0.1ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-02 09:00:00.009580', "running_view_count" = 551 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 AdvertSelector::Banner Load (0.1ms) 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.3ms) UPDATE "advert_selector_banners" SET "target_view_count" = 10, "updated_at" = '2012-10-02 09:00:00.000907', "running_view_count" = 0 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 "updated_at" = '2012-10-02 09:00:00.004430', "running_view_count" = 10 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.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-02 09:00:00.000413', "confirmed" = 'f' 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 "updated_at" = '2012-10-02 09:00:00.002409', "confirmed" = 't' 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.3ms) UPDATE "advert_selector_banners" SET "start_time" = '2012-10-02 10:00:00.000380', "updated_at" = '2012-10-02 09:00:00.000795' 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 "end_time" = '2012-10-02 08:00:00.002684', "start_time" = '2012-10-02 07:00:00.002606', "updated_at" = '2012-10-02 09:00:00.003030' 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 "end_time" = '2012-10-02 10:00:00.004113', "start_time" = NULL, "updated_at" = '2012-10-02 09:00:00.004430' 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 "target_view_count" = 100, "end_time" = '2012-10-12 00:00:00.000000', "start_time" = '2012-10-01 21:00:00.000000', "updated_at" = '2012-10-02 09:00:00.000910' 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 "updated_at" = '2012-10-02 09:00:00.003072', "running_view_count" = 0 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", "end_time"=>"2012-10-12 00:00:00 UTC", "placement_id"=>"405688915", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-10-02 00:00:00 UTC"}}  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) 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", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["end_time", Fri, 12 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", Tue, 02 Oct 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Tue, 02 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.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]]  (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 (44.6ms) AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 141ms (Views: 139.9ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction  (0.1ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) 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.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 14ms (Views: 12.0ms | 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]] 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.6ms) AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 26ms (Views: 25.3ms | 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]] Processing by AdvertSelector::MainController#index as HTML Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 1ms (Views: 1.0ms | 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" 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.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" Completed 200 OK in 7ms (Views: 6.7ms | 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.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.3ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-10-02 09:00:00.000815', "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-02 09:00:00.002383', "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.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.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.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#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", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Tue, 02 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 4ms (ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_placements"  (0.2ms) rollback transaction  (0.1ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) 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", 405688915]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_placements"  Processing by AdvertSelector::PlacementsController#destroy as HTML Parameters: {"id"=>"405688915"} AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", "405688915"]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) 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 4ms (ActiveRecord: 0.6ms)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_placements"  (0.1ms) rollback transaction  (0.1ms) 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.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]] AdvertSelector::Placement Load (0.1ms) 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.1ms) 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 (6.2ms) AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 16ms (Views: 14.5ms | 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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: 8.5ms | 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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: 10.8ms | 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.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", "405688915"]]  (0.1ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/405688915 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.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-02 09:00:00.000402' 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 "updated_at" = '2012-10-02 09:00:00.002449', "confirmed" = 'f' 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 Tue Oct 02 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-02 09:00:00.006456' OR end_time IS NULL) AND (start_time < '2012-10-02 10:00:00.006651' 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 9ms (Views: 8.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  (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.3ms) 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", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["name", "always_false"], ["position", 0], ["updated_at", Tue, 02 Oct 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Tue Oct 02 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-02 09:00:00.019416' OR end_time IS NULL) AND (start_time < '2012-10-02 10:00:00.019586' 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-02 09:00:00.000416' 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 "updated_at" = '2012-10-02 09:00:00.002474', "confirmed" = 'f' 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", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["name", "raise_error"], ["position", 0], ["updated_at", Tue, 02 Oct 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Tue Oct 02 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-02 09:00:00.004213' OR end_time IS NULL) AND (start_time < '2012-10-02 10:00:00.004404' 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-02T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /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.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 "/advert_selector/placements" for 127.0.0.1 at Tue Oct 02 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" 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 13ms (Views: 12.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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]]  (0.0ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-02 09:00:00.000608' 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 "updated_at" = '2012-10-02 09:00:00.003833', "confirmed" = 'f' 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-02 09:00:00.000461' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Tue Oct 02 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-02 09:00:00.004860' OR end_time IS NULL) AND (start_time < '2012-10-02 10:00:00.005130' 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 9ms (Views: 8.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" = 814558298 AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Fri Oct 05 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-05 09:00:00.023456' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.023634' 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.3ms | 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 Fri Oct 05 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-05 09:00:00.000419' 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 "updated_at" = '2012-10-05 09:00:00.002486', "confirmed" = 'f' 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 Fri Oct 05 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-05 09:00:00.002281' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.002463' 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.1ms | 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" = 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 Fri Oct 05 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-05 09:00:00.015473' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.015657' 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 9ms (Views: 7.8ms | 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.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-05 09:00:00.000413' 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 "updated_at" = '2012-10-05 09:00:00.002507', "confirmed" = 'f' 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 "updated_at" = '2012-10-05 09:00:00.000453', "confirmed" = 't' 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 Started GET "/" for 127.0.0.1 at Fri Oct 05 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-05 09:00:00.003989' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.004194' 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] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.6ms | 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" = 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 Fri Oct 05 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) 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.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-05 09:00:00.000422' 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 "updated_at" = '2012-10-05 09:00:00.002466', "confirmed" = 'f' 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 "updated_at" = '2012-10-05 09:00:00.000450', "confirmed" = 't' 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.1ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-10-05 09:00:00.002851', "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-05 09:00:00.004189', "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-05 09:00:00.005998', "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 Fri Oct 05 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-05 09:00:00.009409' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.009600' 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 7ms (Views: 6.2ms | 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" = 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.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-05 09:00:00.000729' 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 "updated_at" = '2012-10-05 09:00:00.002878', "confirmed" = 'f' 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 Fri Oct 05 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-05 09:00:00.000249' 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.6ms | 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 Fri Oct 05 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 Fri Oct 05 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.4ms | 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.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-05 09:00:00.000418' 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 "updated_at" = '2012-10-05 09:00:00.002544', "confirmed" = 'f' 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 "only_once_per_session" = 't', "updated_at" = '2012-10-05 09:00:00.000935' WHERE "advert_selector_placements"."id" = 405688915  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Oct 05 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-05 09:00:00.003945' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.004136' 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.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 Fri Oct 05 12:00:00 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 2ms (Views: 1.5ms | 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]] 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-05 09:00:00.002276' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.002463' 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.3ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-02 09:37:05', 100, '2012-10-07 00:00:00', 't', '2012-10-02 09:37:05', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-02 09:37:05', '2012-10-12 00:00:00', 't', '2012-10-02 09:37:05', 100, 394627963, 1000, 't', 0, '2012-10-02 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-02 09:37:05', '2012-10-12 00:00:00', 'f', '2012-10-02 09:37:05', 1000, 207249520, 1000, 't', 1, '2012-10-02 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-02 09:37:05', '2012-10-02 09:37:05', 960656439, 't', 394627963, '') 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-02 09:37:05', '2012-10-02 09:37:05', 929640376, 't', 814558298, '') 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-02 09:37:05', '2012-10-02 09:37:05', 281932184, 't', 207249520, '') 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-02 09:37:05', '2012-10-02 09:37:05', 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-02 09:37:05', '2012-10-02 09:37:05', '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-02 09:37:05', '2012-10-02 09:37:05', '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-02 09:37:05', '2012-10-02 09:37:05', 'parade', 405688915)  (44.0ms) commit 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) 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", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["name", nil], ["position", 2], ["updated_at", Tue, 02 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", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Tue, 02 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", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Tue, 02 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-02 09:00:00.000073' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-10-02 09:00:00.000888' OR end_time IS NULL) AND (start_time < '2012-10-02 10:00:00.001002' 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-02 09:00:00.001861' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-10-02 09:00:00.002533' OR end_time IS NULL) AND (start_time < '2011-10-02 10:00:00.002666' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count)  (0.1ms) rollback transaction  (0.1ms) 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.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) 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 "updated_at" = '2012-10-02 09:00:00.000938', "running_view_count" = 0 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 "updated_at" = '2012-10-02 09:00:00.006918', "running_view_count" = 551 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 "target_view_count" = 10, "updated_at" = '2012-10-02 09:00:00.001014', "running_view_count" = 0 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 "updated_at" = '2012-10-02 09:00:00.004392', "running_view_count" = 10 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.3ms) UPDATE "advert_selector_banners" SET "confirmed" = 'f', "updated_at" = '2012-10-02 09:00:00.000406' 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-02 09:00:00.002466' 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.3ms) UPDATE "advert_selector_banners" SET "start_time" = '2012-10-02 10:00:00.000389', "updated_at" = '2012-10-02 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.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "end_time" = '2012-10-02 08:00:00.002590', "start_time" = '2012-10-02 07:00:00.002517', "updated_at" = '2012-10-02 09:00:00.002921' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "end_time" = '2012-10-02 10:00:00.004062', "start_time" = NULL, "updated_at" = '2012-10-02 09:00:00.004954' WHERE "advert_selector_banners"."id" = 814558298  (0.1ms) 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.4ms) UPDATE "advert_selector_banners" SET "end_time" = '2012-10-12 00:00:00.000000', "start_time" = '2012-10-01 21:00:00.000000', "target_view_count" = 100, "updated_at" = '2012-10-02 09:00:00.000854' 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 "updated_at" = '2012-10-02 09:00:00.003082', "running_view_count" = 0 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.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", 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.1ms) 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", "end_time"=>"2012-10-12 00:00:00 UTC", "placement_id"=>"405688915", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-10-02 00:00:00 UTC"}}  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) 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", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["end_time", Fri, 12 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", Tue, 02 Oct 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Tue, 02 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.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]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners"  Processing by AdvertSelector::BannersController#destroy 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"]]  (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.0ms) 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.2ms) 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 (53.7ms) AdvertSelector::Banner Load (0.4ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-09-30 09:00:00.160307') 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 166ms (Views: 164.7ms | ActiveRecord: 1.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]] Processing by AdvertSelector::BannersController#index as HTML AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" AdvertSelector::Banner Load (0.3ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-09-30 09:00:00.010379') 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.2ms) 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 18ms (Views: 16.4ms | ActiveRecord: 1.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#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.8ms) AdvertSelector::Banner Load (0.3ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-09-30 09:00:00.023642') ORDER BY priority desc LIMIT 10 AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = 718799085 LIMIT 1 AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = 405688915 LIMIT 1 AdvertSelector::Placement Load (0.2ms) 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 35ms (Views: 32.8ms | ActiveRecord: 1.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]] 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.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.1ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", "394627963"]]  (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" = 394627963 ORDER BY position  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/banners/394627963 Completed 302 Found in 4ms (ActiveRecord: 0.3ms)  (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"=>{"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"]]  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 500 Internal Server Error in 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]] Processing by AdvertSelector::MainController#index as HTML Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 1ms (Views: 0.9ms | 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 3ms (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-09-30 09:00:00.004046') 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.1ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) 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.3ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-10-02 09:00:00.000804', "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-02 09:00:00.002359', "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.1ms) 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.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.1ms) 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.1ms) 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.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.1ms) SELECT COUNT(*) FROM "advert_selector_placements" Processing by AdvertSelector::PlacementsController#create as HTML Parameters: {"placement"=>{"name"=>"new placement"}}  (0.1ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "advert_selector_placements" ("conflicting_placements_array", "created_at", "name", "only_once_per_session", "updated_at") VALUES (?, ?, ?, ?, ?) [["conflicting_placements_array", nil], ["created_at", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Tue, 02 Oct 2012 09:00:00 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/1019730478 Completed 302 Found in 7ms (ActiveRecord: 1.3ms)  (0.1ms) 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.1ms) 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.3ms) 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.4ms)  (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.1ms) 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 (6.2ms) AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-09-30 09:00:00.012016') 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.8ms | 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-09-30 09:00:00.006442') 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: 8.9ms | 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-09-30 09:00:00.008262') 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 11ms (Views: 10.6ms | 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.2ms) 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.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-02 09:00:00.000426' 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-02 09:00:00.002384' 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 Tue Oct 02 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-02 09:00:00.006521' OR end_time IS NULL) AND (start_time < '2012-10-02 10:00:00.006720' 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.0ms | 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" = 814558298 AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."banner_id" = 814558298 AND position >= 0) SQL (0.3ms) 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", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["name", "always_false"], ["position", 0], ["updated_at", Tue, 02 Oct 2012 09:00:00 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Tue Oct 02 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-02 09:00:00.021425' OR end_time IS NULL) AND (start_time < '2012-10-02 10:00:00.021616' 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 5ms (Views: 4.8ms | 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.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-02 09:00:00.000416' 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-02 09:00:00.002541' 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.3ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."banner_id" = 814558298 AND position >= 0) SQL (0.3ms) 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", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["name", "raise_error"], ["position", 0], ["updated_at", Tue, 02 Oct 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Tue Oct 02 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-02 09:00:00.004322' OR end_time IS NULL) AND (start_time < '2012-10-02 10:00:00.004516' 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-02T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /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.3ms | 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 Tue Oct 02 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-09-30 09:00:00.020364') 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 14ms (Views: 12.5ms | 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.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-02 09:00:00.000426' 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-02 09:00:00.002715' 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-02 09:00:00.000299' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Tue Oct 02 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-02 09:00:00.003253' OR end_time IS NULL) AND (start_time < '2012-10-02 10:00:00.003440' 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.6ms | 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 Fri Oct 05 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-05 09:00:00.017207' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.017382' 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.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 "/" for 127.0.0.1 at Fri Oct 05 12:00:00 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 2ms (Views: 1.5ms | 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.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-05 09:00:00.000436' 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-05 09:00:00.002573' 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 Fri Oct 05 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-05 09:00:00.002275' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.002457' 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.3ms | 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" = 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 Fri Oct 05 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-05 09:00:00.016157' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.016353' 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 13ms (Views: 11.9ms | ActiveRecord: 0.6ms) AdvertSelector::HelperItem Load (0.5ms) 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-05 09:00:00.000425' 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-05 09:00:00.002440' 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-05 09:00:00.000478' 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 Started GET "/" for 127.0.0.1 at Fri Oct 05 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-05 09:00:00.004195' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.004382' 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] 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" = 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 Fri Oct 05 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.7ms | 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" = 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-05 09:00:00.000439' 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.1ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "confirmed" = 'f', "updated_at" = '2012-10-05 09:00:00.003714' 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.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "confirmed" = 't', "updated_at" = '2012-10-05 09:00:00.000697' 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-05 09:00:00.004026', "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-05 09:00:00.005617', "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-05 09:00:00.007666', "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 Fri Oct 05 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-05 09:00:00.011635' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.011840' 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.0ms | 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" = 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-05 09:00:00.000433' 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-05 09:00:00.002549' 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 Fri Oct 05 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-05 09:00:00.000229' 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.8ms | 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 Fri Oct 05 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.7ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Fri Oct 05 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.7ms | 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.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-05 09:00:00.000522' 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-05 09:00:00.002728' 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.2ms) UPDATE "advert_selector_placements" SET "only_once_per_session" = 't', "updated_at" = '2012-10-05 09:00:00.000959' WHERE "advert_selector_placements"."id" = 405688915  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Oct 05 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-05 09:00:00.004018' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.004202' 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.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 Fri Oct 05 12:00:00 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 2ms (Views: 1.5ms | 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]] 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-05 09:00:00.002349' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.002541' 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.5ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.5ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.3ms) 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-02 09:37:19', 100, '2012-10-07 00:00:00', 't', '2012-10-02 09:37:19', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-02 09:37:19', '2012-10-12 00:00:00', 't', '2012-10-02 09:37:19', 100, 394627963, 1000, 't', 0, '2012-10-02 00:00:00') Fixture Insert (0.1ms) 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-02 09:37:19', '2012-10-12 00:00:00', 'f', '2012-10-02 09:37:19', 1000, 207249520, 1000, 't', 1, '2012-10-02 00:00:00') Fixture Delete (0.4ms) 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-02 09:37:19', '2012-10-02 09:37:19', 960656439, 't', 394627963, '') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "id", "content_for", "banner_id", "content") VALUES (1, 'banner_leaderboard', '2012-10-02 09:37:19', '2012-10-02 09:37:19', 929640376, 't', 814558298, '') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "id", "content_for", "banner_id", "content") VALUES ('banner_parade', 1, '2012-10-02 09:37:19', '2012-10-02 09:37:19', 281932184, 't', 207249520, '') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "id", "content_for", "banner_id", "content") VALUES ('request_params_include?', '2012-10-02 09:37:19', '2012-10-02 09:37:19', 435138789, 'f', 394627963, 'pepsi=true') Fixture Delete (0.2ms) DELETE FROM "advert_selector_placements" Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Parade', '2012-10-02 09:37:19', '2012-10-02 09:37:19', 'leaderboard,video', 718799085) Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "only_once_per_session", "id") VALUES ('Video', '2012-10-02 09:37:19', '2012-10-02 09:37:19', 'parade', 't', 1019730477) Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-10-02 09:37:19', '2012-10-02 09:37:19', 'parade', 405688915)  (45.9ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.4ms) 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.1ms) 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.2ms) 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.9ms) 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", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["name", nil], ["position", 2], ["updated_at", Tue, 02 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.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", true], ["created_at", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Tue, 02 Oct 2012 09:00:00 UTC +00:00]] SQL (0.3ms) 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", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Tue, 02 Oct 2012 09:00:00 UTC +00:00]] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558298 ORDER BY position SQL (0.2ms) DELETE FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."id" = ? [["id", 960656440]] SQL (0.2ms) UPDATE "advert_selector_helper_items" SET position = (position - 1) WHERE ("advert_selector_helper_items"."banner_id" = 814558298 AND position > 3)  (0.1ms) RELEASE SAVEPOINT active_record_1 AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items"  AdvertSelector::HelperItem Load (0.2ms) 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.2ms) 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.2ms) rollback transaction  (0.1ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]]  (0.2ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-10-02 09:00:00.000137' OR end_time IS NULL)  (0.2ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-10-02 09:00:00.001763' OR end_time IS NULL) AND (start_time < '2012-10-02 10:00:00.002022' 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-02 09:00:00.003739' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-10-02 09:00:00.005118' OR end_time IS NULL) AND (start_time < '2011-10-02 10:00:00.005336' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count)  (0.1ms) rollback transaction  (0.1ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]]  (0.1ms) rollback transaction  (0.1ms) 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 "running_view_count" = 0, "updated_at" = '2012-10-02 09:00:00.001633' 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.1ms) 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-02 09:00:00.008661' 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.2ms) 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.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.4ms) UPDATE "advert_selector_banners" SET "target_view_count" = 10, "running_view_count" = 0, "updated_at" = '2012-10-02 09:00:00.001370' 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.1ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "running_view_count" = 10, "updated_at" = '2012-10-02 09:00:00.006824' WHERE "advert_selector_banners"."id" = 814558298  (0.1ms) RELEASE SAVEPOINT active_record_1 AdvertSelector::Banner Load (0.1ms) 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.3ms) UPDATE "advert_selector_banners" SET "confirmed" = 'f', "updated_at" = '2012-10-02 09:00:00.000407' 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-02 09:00:00.002442' 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.1ms) 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 "start_time" = '2012-10-02 10:00:00.000450', "updated_at" = '2012-10-02 09:00:00.000940' 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.3ms) UPDATE "advert_selector_banners" SET "start_time" = '2012-10-02 07:00:00.003169', "end_time" = '2012-10-02 08:00:00.003267', "updated_at" = '2012-10-02 09:00:00.003685' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "start_time" = NULL, "end_time" = '2012-10-02 10:00:00.005220', "updated_at" = '2012-10-02 09:00:00.005834' 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-01 21:00:00.000000', "end_time" = '2012-10-12 00:00:00.000000', "target_view_count" = 100, "updated_at" = '2012-10-02 09:00:00.000997' 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" = 0, "updated_at" = '2012-10-02 09:00:00.003134' 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.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.2ms) 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", "end_time"=>"2012-10-12 00:00:00 UTC", "placement_id"=>"405688915", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-10-02 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", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["end_time", Fri, 12 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", Tue, 02 Oct 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Tue, 02 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.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]]  (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.4ms) 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.3ms) 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 6ms (ActiveRecord: 1.0ms)  (0.2ms) 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 (59.1ms) AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-09-30 09:00:00.166984') 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 171ms (Views: 169.9ms | 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-09-30 09:00:00.006925') 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 11ms (Views: 9.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#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.4ms) AdvertSelector::Banner Load (0.3ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-09-30 09:00:00.022989') 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 29ms (Views: 27.4ms | ActiveRecord: 0.7ms)  (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]] Processing by AdvertSelector::BannersController#update_running_view_count as HTML Parameters: {"banner"=>{"running_view_count"=>"99"}, "id"=>"394627963"} AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", "394627963"]] Redirected to http://test.host/advert_selector/banners/394627963 Completed 302 Found in 1ms (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]] Processing by AdvertSelector::MainController#index as HTML Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 1ms (Views: 1.0ms | 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-09-30 09:00:00.003998') 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 "conflicting_placements_array" = 'not_found,video', "updated_at" = '2012-10-02 09:00:00.000771' 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 "conflicting_placements_array" = '', "updated_at" = '2012-10-02 09:00:00.002362' 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.1ms) 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.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]] 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.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.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.1ms) 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.5ms) INSERT INTO "advert_selector_placements" ("conflicting_placements_array", "created_at", "name", "only_once_per_session", "updated_at") VALUES (?, ?, ?, ?, ?) [["conflicting_placements_array", nil], ["created_at", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Tue, 02 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.1ms) 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.1ms) SELECT COUNT(*) FROM "advert_selector_placements"  Processing by AdvertSelector::PlacementsController#destroy as HTML Parameters: {"id"=>"405688915"} AdvertSelector::Placement Load (0.1ms) 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.3ms) 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.4ms)  (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.1ms) 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 (6.2ms) AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-09-30 09:00:00.012110') 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 16ms (Views: 14.3ms | ActiveRecord: 0.7ms)  (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-09-30 09:00:00.006654') 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.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.1ms) 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", 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.7ms) AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-09-30 09:00:00.009551') 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 13ms (Views: 11.8ms | 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.1ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) 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", 405688915]] Processing by AdvertSelector::PlacementsController#update as HTML Parameters: {"id"=>"405688915", "placement"=>{"name"=>"Leaderboard"}} AdvertSelector::Placement Load (0.1ms) 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.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.1ms) rollback transaction  (0.1ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) 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-02 09:00:00.000541' 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-02 09:00:00.003130' 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 Tue Oct 02 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-02 09:00:00.007624' OR end_time IS NULL) AND (start_time < '2012-10-02 10:00:00.007943' 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 Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 15ms (Views: 13.6ms | ActiveRecord: 0.7ms) 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.0ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."banner_id" = 814558298 AND position >= 0) SQL (0.4ms) 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", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["name", "always_false"], ["position", 0], ["updated_at", Tue, 02 Oct 2012 09:00:00 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Tue Oct 02 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-02 09:00:00.029246' OR end_time IS NULL) AND (start_time < '2012-10-02 10:00:00.029536' 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.3ms) 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 9ms (Views: 8.1ms | ActiveRecord: 0.8ms) 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.2ms) rollback transaction  (0.1ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]]  (0.1ms) SAVEPOINT active_record_1  (0.7ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-02 09:00:00.000697' WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.2ms) 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.4ms) UPDATE "advert_selector_banners" SET "confirmed" = 'f', "updated_at" = '2012-10-02 09:00:00.004988' 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.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."banner_id" = 814558298 AND position >= 0) SQL (0.4ms) 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", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["name", "raise_error"], ["position", 0], ["updated_at", Tue, 02 Oct 2012 09:00:00 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Tue Oct 02 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-02 09:00:00.007980' OR end_time IS NULL) AND (start_time < '2012-10-02 10:00:00.008308' 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] Error with banner Coke in placement Leaderboard. 2012-10-02T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /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 10ms (Views: 8.8ms | ActiveRecord: 0.7ms) 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 Started GET "/advert_selector/placements" for 127.0.0.1 at Tue Oct 02 12:00:00 +0300 2012 Processing by AdvertSelector::PlacementsController#index as HTML AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  AdvertSelector::Banner Load (0.3ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-09-30 09:00:00.035303') 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 25ms (Views: 23.0ms | ActiveRecord: 0.7ms)  (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-02 09:00:00.000436' 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-02 09:00:00.002520' 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.1ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-02 09:00:00.000825', "frequency" = 2 WHERE "advert_selector_banners"."id" = 814558298  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Tue Oct 02 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-02 09:00:00.006171' OR end_time IS NULL) AND (start_time < '2012-10-02 10:00:00.006405' 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 Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 11ms (Views: 9.9ms | ActiveRecord: 0.8ms) 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 Fri Oct 05 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-05 09:00:00.025568' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.025754' 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.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 Started GET "/" for 127.0.0.1 at Fri Oct 05 12:00:00 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 2ms (Views: 1.5ms | 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-05 09:00:00.000423' WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.2ms) 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.1ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "confirmed" = 'f', "updated_at" = '2012-10-05 09:00:00.003958' 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.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Oct 05 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-05 09:00:00.004220' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.004547' 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 Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 10ms (Views: 8.9ms | ActiveRecord: 0.7ms) 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 Fri Oct 05 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-05 09:00:00.022310' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.022510' 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 10ms (Views: 8.7ms | ActiveRecord: 0.7ms) 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  (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-05 09:00:00.000430' 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-05 09:00:00.002515' 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-05 09:00:00.000468' 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 Started GET "/" for 127.0.0.1 at Fri Oct 05 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-05 09:00:00.004382' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.004585' 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] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.9ms | 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" = 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 Fri Oct 05 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.8ms | 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" = 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.2ms) 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.0ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]]  (0.0ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-05 09:00:00.000475' 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-05 09:00:00.003106' 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-05 09:00:00.000481' 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.1ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = '', "updated_at" = '2012-10-05 09:00:00.003083' 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 "conflicting_placements_array" = '', "updated_at" = '2012-10-05 09:00:00.004452' 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 "conflicting_placements_array" = '', "updated_at" = '2012-10-05 09:00:00.006174' 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 Fri Oct 05 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-05 09:00:00.009678' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.009869' 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 11ms (Views: 10.0ms | 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 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-05 09:00:00.000452' 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-05 09:00:00.002577' 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 Fri Oct 05 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-05 09:00:00.000259' 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 6ms (Views: 4.9ms | 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 Fri Oct 05 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.6ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Fri Oct 05 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.8ms | 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.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-05 09:00:00.000422' 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-05 09:00:00.002508' 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-05 09:00:00.001011', "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 Fri Oct 05 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-05 09:00:00.004148' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.004350' 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.6ms | 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 Fri Oct 05 12:00:00 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 4ms (Views: 3.8ms | 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.2ms) rollback transaction  (0.1ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) 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.3ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time > '2012-10-05 09:00:00.003468' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.003745' 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 9ms (Views: 8.2ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-02 09:40:46', 100, '2012-10-07 00:00:00', 't', '2012-10-02 09:40:46', 50, 814558298, 1000, 'f', 0, '2012-09-27 00:00:00') Fixture Insert (0.2ms) 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-02 09:40:46', '2012-10-12 00:00:00', 't', '2012-10-02 09:40:46', 100, 394627963, 1000, 't', 0, '2012-10-02 00:00:00') Fixture Insert (0.1ms) 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-02 09:40:46', '2012-10-12 00:00:00', 'f', '2012-10-02 09:40:46', 1000, 207249520, 1000, 't', 1, '2012-10-02 00:00:00') Fixture Delete (0.5ms) 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-02 09:40:46', '2012-10-02 09:40:46', 960656439, 't', 394627963, '') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "id", "content_for", "banner_id", "content") VALUES (1, 'banner_leaderboard', '2012-10-02 09:40:46', '2012-10-02 09:40:46', 929640376, 't', 814558298, '') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "id", "content_for", "banner_id", "content") VALUES ('banner_parade', 1, '2012-10-02 09:40:46', '2012-10-02 09:40:46', 281932184, 't', 207249520, '') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "id", "content_for", "banner_id", "content") VALUES ('request_params_include?', '2012-10-02 09:40:46', '2012-10-02 09:40:46', 435138789, 'f', 394627963, 'pepsi=true') Fixture Delete (0.1ms) DELETE FROM "advert_selector_placements" Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Parade', '2012-10-02 09:40:46', '2012-10-02 09:40:46', '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-02 09:40:46', '2012-10-02 09:40:46', '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-02 09:40:46', '2012-10-02 09:40:46', 'parade', 405688915)  (40.5ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.5ms) 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.6ms) 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", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["name", nil], ["position", 2], ["updated_at", Tue, 02 Oct 2012 09:00:00 UTC +00:00]] SQL (0.2ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."banner_id" = 814558298 AND position >= 10) SQL (0.4ms) 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", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Tue, 02 Oct 2012 09:00:00 UTC +00:00]] SQL (0.3ms) 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", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Tue, 02 Oct 2012 09:00:00 UTC +00:00]] AdvertSelector::HelperItem Load (0.3ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]]  (0.1ms) 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-02 09:00:00.000091' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-10-02 09:00:00.000953' OR end_time IS NULL) AND (start_time < '2012-10-02 10:00:00.001071' 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-02 09:00:00.001985' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-10-02 09:00:00.002729' OR end_time IS NULL) AND (start_time < '2011-10-02 10:00:00.002845' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count)  (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) 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.7ms) UPDATE "advert_selector_banners" SET "running_view_count" = 0, "updated_at" = '2012-10-02 09:00:00.001015' WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.3ms) 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 AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]]  (0.1ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "running_view_count" = 551, "updated_at" = '2012-10-02 09:00:00.012697' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 AdvertSelector::Banner Load (0.1ms) 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-02 09:00:00.000908' 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-02 09:00:00.004289' 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.2ms) 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 "confirmed" = 'f', "updated_at" = '2012-10-02 09:00:00.000492' 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" = 't', "updated_at" = '2012-10-02 09:00:00.002893' 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.3ms) UPDATE "advert_selector_banners" SET "start_time" = '2012-10-02 10:00:00.000470', "updated_at" = '2012-10-02 09:00:00.000910' 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-02 07:00:00.002697', "end_time" = '2012-10-02 08:00:00.002769', "updated_at" = '2012-10-02 09:00:00.003098' 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-02 10:00:00.004186', "updated_at" = '2012-10-02 09:00:00.004501' 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-01 21:00:00.000000', "target_view_count" = 100, "end_time" = '2012-10-12 00:00:00.000000', "updated_at" = '2012-10-02 09:00:00.000850' 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" = 0, "updated_at" = '2012-10-02 09:00:00.002976' 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.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", 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", "end_time"=>"2012-10-12 00:00:00 UTC", "placement_id"=>"405688915", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-10-02 00:00:00 UTC"}}  (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) 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", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["end_time", Fri, 12 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", Tue, 02 Oct 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Tue, 02 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.9ms)  (0.1ms) 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.1ms) SELECT COUNT(*) FROM "advert_selector_banners"  Processing by AdvertSelector::BannersController#destroy 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"]]  (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.3ms) 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.9ms)  (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 (46.0ms) AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-09-30 09:00:00.151785') 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 156ms (Views: 155.0ms | 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-09-30 09:00:00.006895') 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 11ms (Views: 9.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#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-09-30 09:00:00.023190') 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]] Processing by AdvertSelector::BannersController#update_running_view_count as HTML Parameters: {"banner"=>{"running_view_count"=>"99"}, "id"=>"394627963"} AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", "394627963"]] Redirected to http://test.host/advert_selector/banners/394627963 Completed 302 Found in 1105ms (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]] Processing by AdvertSelector::MainController#index as HTML Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 3ms (Views: 2.1ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) 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-09-30 09:00:00.004170') 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.4ms | ActiveRecord: 0.4ms)  (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.1ms) 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.3ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = 'not_found,video', "updated_at" = '2012-10-02 09:00:00.000900' 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 "conflicting_placements_array" = '', "updated_at" = '2012-10-02 09:00:00.002456' 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.1ms) 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.2ms) 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.1ms) 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.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.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#create as HTML Parameters: {"placement"=>{"name"=>"new placement"}}  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "advert_selector_placements" ("conflicting_placements_array", "created_at", "name", "only_once_per_session", "updated_at") VALUES (?, ?, ?, ?, ?) [["conflicting_placements_array", nil], ["created_at", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Tue, 02 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.1ms) 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.3ms) 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.4ms)  (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.1ms) 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.1ms) 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 (6.5ms) AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-09-30 09:00:00.016339') 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 18ms (Views: 15.5ms | ActiveRecord: 0.7ms)  (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-09-30 09:00:00.006580') 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.0ms | 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-09-30 09:00:00.008388') 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: 10.9ms | 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) 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 "fast_mode" = 't', "updated_at" = '2012-10-02 09:00:00.000429' 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-02 09:00:00.002515' 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 Tue Oct 02 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-02 09:00:00.006637' OR end_time IS NULL) AND (start_time < '2012-10-02 10:00:00.006842' 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.3ms) 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 17ms (Views: 15.8ms | 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" = 814558298 AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."banner_id" = 814558298 AND position >= 0) SQL (0.3ms) 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", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["name", "always_false"], ["position", 0], ["updated_at", Tue, 02 Oct 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Tue Oct 02 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-02 09:00:00.027860' OR end_time IS NULL) AND (start_time < '2012-10-02 10:00:00.028031' 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-02 09:00:00.000436' 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-02 09:00:00.002409' 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", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["name", "raise_error"], ["position", 0], ["updated_at", Tue, 02 Oct 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Tue Oct 02 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-02 09:00:00.004159' OR end_time IS NULL) AND (start_time < '2012-10-02 10:00:00.004344' 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-02T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /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.1ms | 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 "/advert_selector/placements" for 127.0.0.1 at Tue Oct 02 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-09-30 09:00:00.020152') 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 14ms (Views: 12.9ms | 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.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-02 09:00:00.000420' 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-02 09:00:00.002575' 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-02 09:00:00.000293' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Tue Oct 02 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-02 09:00:00.003210' OR end_time IS NULL) AND (start_time < '2012-10-02 10:00:00.003396' 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.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 Fri Oct 05 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-05 09:00:00.016916' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.017091' 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.3ms | 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 Fri Oct 05 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.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-05 09:00:00.000424' 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-05 09:00:00.002542' 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 Fri Oct 05 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-05 09:00:00.002311' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.002502' 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.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 Started GET "/?advert_selector_force=207249520" for 127.0.0.1 at Fri Oct 05 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-05 09:00:00.015630' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.015824' 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 9ms (Views: 8.0ms | 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-05 09:00:00.000418' 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-05 09:00:00.002447' 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-05 09:00:00.000444' 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 Started GET "/" for 127.0.0.1 at Fri Oct 05 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-05 09:00:00.003989' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.004164' 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] 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" = 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 Fri Oct 05 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.7ms | 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" = 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.2ms) 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-05 09:00:00.000450' 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-05 09:00:00.002465' 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-05 09:00:00.000435' 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.1ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = '', "updated_at" = '2012-10-05 09:00:00.002673' 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.0ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = '', "updated_at" = '2012-10-05 09:00:00.004022' 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 "conflicting_placements_array" = '', "updated_at" = '2012-10-05 09:00:00.005724' 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 Fri Oct 05 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-05 09:00:00.009126' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.009316' 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 7ms (Views: 6.9ms | 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" = 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.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-05 09:00:00.000417' 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-05 09:00:00.002454' 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 Fri Oct 05 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-05 09:00:00.000232' 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 Fri Oct 05 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.7ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Fri Oct 05 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.5ms | 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.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-05 09:00:00.000439' 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-05 09:00:00.002504' 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.2ms) UPDATE "advert_selector_placements" SET "only_once_per_session" = 't', "updated_at" = '2012-10-05 09:00:00.000919' WHERE "advert_selector_placements"."id" = 405688915  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Oct 05 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-05 09:00:00.003906' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.004093' 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 Fri Oct 05 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.1ms) begin transaction AdvertSelector::Banner Load (0.3ms) 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]] 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-05 09:00:00.002246' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.002427' 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.5ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-02 09:41:09', 100, '2012-10-07 00:00:00', 't', '2012-10-02 09:41:09', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-02 09:41:09', '2012-10-12 00:00:00', 't', '2012-10-02 09:41:09', 100, 394627963, 1000, 't', 0, '2012-10-02 00:00:00') Fixture Insert (0.1ms) 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-02 09:41:09', '2012-10-12 00:00:00', 'f', '2012-10-02 09:41:09', 1000, 207249520, 1000, 't', 1, '2012-10-02 00:00:00') Fixture Delete (0.6ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.2ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "id", "content_for", "banner_id", "content") VALUES ('banner_leaderboard', 2, '2012-10-02 09:41:10', '2012-10-02 09:41:10', 960656439, 't', 394627963, '') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "id", "content_for", "banner_id", "content") VALUES (1, 'banner_leaderboard', '2012-10-02 09:41:10', '2012-10-02 09:41:10', 929640376, 't', 814558298, '') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "id", "content_for", "banner_id", "content") VALUES ('banner_parade', 1, '2012-10-02 09:41:10', '2012-10-02 09:41:10', 281932184, 't', 207249520, '') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "id", "content_for", "banner_id", "content") VALUES ('request_params_include?', '2012-10-02 09:41:10', '2012-10-02 09:41:10', 435138789, 'f', 394627963, 'pepsi=true') Fixture Delete (0.2ms) DELETE FROM "advert_selector_placements" Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Parade', '2012-10-02 09:41:10', '2012-10-02 09:41:10', '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-02 09:41:10', '2012-10-02 09:41:10', '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-02 09:41:10', '2012-10-02 09:41:10', 'parade', 405688915)  (42.1ms) commit transaction  (0.0ms) 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) SELECT COUNT(*) FROM "advert_selector_helper_items"  (0.1ms) SAVEPOINT active_record_1 AdvertSelector::HelperItem Load (0.2ms) 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.7ms) 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", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["name", nil], ["position", 2], ["updated_at", Tue, 02 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", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Tue, 02 Oct 2012 09:00:00 UTC +00:00]] 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.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", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Tue, 02 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]]  (0.2ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-10-02 09:00:00.000274' OR end_time IS NULL)  (0.2ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-10-02 09:00:00.001780' OR end_time IS NULL) AND (start_time < '2012-10-02 10:00:00.001983' 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-02 09:00:00.003534' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-10-02 09:00:00.004470' OR end_time IS NULL) AND (start_time < '2011-10-02 10:00:00.004585' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count)  (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) 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 "updated_at" = '2012-10-02 09:00:00.000918', "running_view_count" = 0 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.1ms) 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 "updated_at" = '2012-10-02 09:00:00.007564', "running_view_count" = 551 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 "updated_at" = '2012-10-02 09:00:00.000884', "running_view_count" = 0, "target_view_count" = 10 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 "updated_at" = '2012-10-02 09:00:00.004375', "running_view_count" = 10 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.3ms) UPDATE "advert_selector_banners" SET "confirmed" = 'f', "updated_at" = '2012-10-02 09:00:00.000417' 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-02 09:00:00.002453' 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.3ms) UPDATE "advert_selector_banners" SET "start_time" = '2012-10-02 10:00:00.000368', "updated_at" = '2012-10-02 09:00:00.000784' 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-02 07:00:00.002512', "updated_at" = '2012-10-02 09:00:00.002904', "end_time" = '2012-10-02 08:00:00.002579' 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, "updated_at" = '2012-10-02 09:00:00.004264', "end_time" = '2012-10-02 10:00:00.003957' 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-01 21:00:00.000000', "updated_at" = '2012-10-02 09:00:00.000833', "end_time" = '2012-10-12 00:00:00.000000', "target_view_count" = 100 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 "updated_at" = '2012-10-02 09:00:00.002994', "running_view_count" = 0 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.1ms) 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", 814558298]] 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.1ms) 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", "end_time"=>"2012-10-12 00:00:00 UTC", "placement_id"=>"405688915", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-10-02 00:00:00 UTC"}}  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) 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", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["end_time", Fri, 12 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", Tue, 02 Oct 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Tue, 02 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.8ms)  (0.1ms) 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.9ms)  (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 (47.9ms) AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-09-30 09:00:00.145712') 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 150ms (Views: 149.0ms | 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-09-30 09:00:00.007118') 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 11ms (Views: 9.8ms | 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]] 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 (19.1ms) AdvertSelector::Banner Load (0.6ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-09-30 09:00:00.027667') ORDER BY priority desc LIMIT 10 AdvertSelector::Placement Load (0.2ms) 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 35ms (Views: 33.5ms | ActiveRecord: 1.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]] 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.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  (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]] Processing by AdvertSelector::BannersController#update_running_view_count as HTML Parameters: {"banner"=>{"running_view_count"=>"99"}, "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.2ms) SAVEPOINT active_record_1  (1.0ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-02 09:00:01.112875', "running_view_count" = 99 WHERE "advert_selector_banners"."id" = 394627963 AdvertSelector::HelperItem Load (0.3ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 394627963 ORDER BY position  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/banners/394627963 Completed 302 Found in 1120ms (ActiveRecord: 1.7ms)  (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 1ms (Views: 0.9ms | 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-09-30 09:00:00.004060') 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.3ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-10-02 09:00:00.000817', "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-02 09:00:00.002562', "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.1ms) 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.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.2ms) 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.1ms) 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", 405688915]]  (0.1ms) 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.5ms) INSERT INTO "advert_selector_placements" ("conflicting_placements_array", "created_at", "name", "only_once_per_session", "updated_at") VALUES (?, ?, ?, ?, ?) [["conflicting_placements_array", nil], ["created_at", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Tue, 02 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.6ms)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_placements"  (0.3ms) 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.1ms) 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.3ms) 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.4ms)  (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.1ms) 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.8ms) AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-09-30 09:00:00.011612') 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.5ms | 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-09-30 09:00:00.006671') ORDER BY priority desc LIMIT 10 AdvertSelector::Placement Load (0.3ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = 718799085 LIMIT 1 AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = 405688915 LIMIT 1 AdvertSelector::Placement Load (0.2ms) 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 17ms (Views: 15.5ms | ActiveRecord: 1.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]] 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.5ms) AdvertSelector::Banner Load (0.3ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-09-30 09:00:00.008712') ORDER BY priority desc LIMIT 10 AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = 718799085 LIMIT 1 AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = 405688915 LIMIT 1 AdvertSelector::Placement Load (0.2ms) 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 19ms (Views: 17.6ms | ActiveRecord: 1.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]] 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.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.1ms) 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 "updated_at" = '2012-10-02 09:00:00.000399', "fast_mode" = 't' 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-02 09:00:00.002402' 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 Tue Oct 02 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-02 09:00:00.006527' OR end_time IS NULL) AND (start_time < '2012-10-02 10:00:00.006722' 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.3ms) 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 15ms (Views: 14.4ms | ActiveRecord: 0.6ms) 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.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."banner_id" = 814558298 AND position >= 0) SQL (0.3ms) 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", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["name", "always_false"], ["position", 0], ["updated_at", Tue, 02 Oct 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Tue Oct 02 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-02 09:00:00.027650' OR end_time IS NULL) AND (start_time < '2012-10-02 10:00:00.027826' 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.9ms | 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.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 "updated_at" = '2012-10-02 09:00:00.000421', "fast_mode" = 't' 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-02 09:00:00.002513' 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", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["name", "raise_error"], ["position", 0], ["updated_at", Tue, 02 Oct 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Tue Oct 02 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-02 09:00:00.004105' OR end_time IS NULL) AND (start_time < '2012-10-02 10:00:00.004277' 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-02T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /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.0ms | 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" = 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 Tue Oct 02 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-09-30 09:00:00.025958') 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.5ms | ActiveRecord: 0.4ms)  (0.2ms) rollback transaction  (0.1ms) 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 "updated_at" = '2012-10-02 09:00:00.000419', "fast_mode" = 't' 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-02 09:00:00.002512' 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 "updated_at" = '2012-10-02 09:00:00.000293', "frequency" = 2 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Tue Oct 02 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-02 09:00:00.003197' OR end_time IS NULL) AND (start_time < '2012-10-02 10:00:00.003376' 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.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 "/" for 127.0.0.1 at Fri Oct 05 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-05 09:00:00.016900' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.017074' 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 Fri Oct 05 12:00:00 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 2ms (Views: 1.5ms | 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.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-05 09:00:00.000422', "fast_mode" = 't' 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-05 09:00:00.002518' 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 Fri Oct 05 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-05 09:00:00.002279' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.002457' 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.3ms) 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 Started GET "/?advert_selector_force=207249520" for 127.0.0.1 at Fri Oct 05 12:00:00 +0300 2012 Processing by ExamplesController#index as HTML Parameters: {"advert_selector_force"=>"207249520"} [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = 207249520 LIMIT 1 [AdvertSelector] AdvertSelector::Placement Load (0.2ms) 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-05 09:00:00.022661' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.022982' 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 14ms (Views: 12.7ms | ActiveRecord: 0.9ms) 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 "updated_at" = '2012-10-05 09:00:00.000425', "fast_mode" = 't' 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-05 09:00:00.002519' 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-05 09:00:00.000443' 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 Started GET "/" for 127.0.0.1 at Fri Oct 05 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-05 09:00:00.004050' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.004233' 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] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.6ms | 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" = 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 Fri Oct 05 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: 4.1ms | ActiveRecord: 0.0ms) 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.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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-05 09:00:00.000422', "fast_mode" = 't' 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-05 09:00:00.002528' 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-05 09:00:00.000443' 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.1ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-10-05 09:00:00.002611', "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-05 09:00:00.004004', "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-05 09:00:00.005676', "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 Fri Oct 05 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.4ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time > '2012-10-05 09:00:00.011275' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.011713' 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 12ms (Views: 11.1ms | ActiveRecord: 0.7ms) 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.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 "updated_at" = '2012-10-05 09:00:00.000420', "fast_mode" = 't' 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-05 09:00:00.002391' 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 Fri Oct 05 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-05 09:00:00.000232' 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.8ms | 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 Fri Oct 05 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.6ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Fri Oct 05 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.5ms | 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.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-05 09:00:00.000452', "fast_mode" = 't' 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-05 09:00:00.002548' 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.2ms) UPDATE "advert_selector_placements" SET "only_once_per_session" = 't', "updated_at" = '2012-10-05 09:00:00.000911' WHERE "advert_selector_placements"."id" = 405688915  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Oct 05 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-05 09:00:00.003949' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.004135' 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.3ms | 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 Fri Oct 05 12:00:00 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 2ms (Views: 1.7ms | ActiveRecord: 0.0ms) AdvertSelector::HelperItem Load (0.3ms) 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-05 09:00:00.002230' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.002401' 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.3ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-02 09:41:42', 100, '2012-10-07 00:00:00', 't', '2012-10-02 09:41:42', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-02 09:41:42', '2012-10-12 00:00:00', 't', '2012-10-02 09:41:42', 100, 394627963, 1000, 't', 0, '2012-10-02 00:00:00') Fixture Insert (0.1ms) 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-02 09:41:42', '2012-10-12 00:00:00', 'f', '2012-10-02 09:41:42', 1000, 207249520, 1000, 't', 1, '2012-10-02 00:00:00') Fixture Delete (0.2ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "id", "content_for", "banner_id", "content") VALUES ('banner_leaderboard', 2, '2012-10-02 09:41:42', '2012-10-02 09:41:42', 960656439, 't', 394627963, '') 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-02 09:41:42', '2012-10-02 09:41:42', 929640376, 't', 814558298, '') 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-02 09:41:42', '2012-10-02 09:41:42', 281932184, 't', 207249520, '') 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-02 09:41:42', '2012-10-02 09:41:42', 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-02 09:41:42', '2012-10-02 09:41:42', '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-02 09:41:42', '2012-10-02 09:41:42', '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-02 09:41:42', '2012-10-02 09:41:42', 'parade', 405688915)  (42.1ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.4ms) 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.6ms) 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", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["name", nil], ["position", 2], ["updated_at", Tue, 02 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", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Tue, 02 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", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Tue, 02 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.3ms) rollback transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.3ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]]  (0.2ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-10-02 09:00:00.000094' OR end_time IS NULL)  (0.2ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-10-02 09:00:00.002091' OR end_time IS NULL) AND (start_time < '2012-10-02 10:00:00.002371' 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-02 09:00:00.004127' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-10-02 09:00:00.005356' OR end_time IS NULL) AND (start_time < '2011-10-02 10:00:00.005526' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count)  (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) rollback transaction  (0.0ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]]  (0.1ms) SAVEPOINT active_record_1  (0.5ms) UPDATE "advert_selector_banners" SET "running_view_count" = 0, "updated_at" = '2012-10-02 09:00:00.002519' 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 AdvertSelector::Banner Load (0.1ms) 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-02 09:00:00.011494' 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 "target_view_count" = 10, "running_view_count" = 0, "updated_at" = '2012-10-02 09:00:00.000955' 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.1ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "running_view_count" = 10, "updated_at" = '2012-10-02 09:00:00.004330' 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.3ms) UPDATE "advert_selector_banners" SET "confirmed" = 'f', "updated_at" = '2012-10-02 09:00:00.000450' 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-02 09:00:00.002478' 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.3ms) UPDATE "advert_selector_banners" SET "start_time" = '2012-10-02 10:00:00.000378', "updated_at" = '2012-10-02 09:00:00.000806' 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-02 07:00:00.002611', "end_time" = '2012-10-02 08:00:00.002704', "updated_at" = '2012-10-02 09:00:00.003069' 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-02 10:00:00.004341', "updated_at" = '2012-10-02 09:00:00.004707' 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.5ms) UPDATE "advert_selector_banners" SET "target_view_count" = 100, "start_time" = '2012-10-01 21:00:00.000000', "end_time" = '2012-10-12 00:00:00.000000', "updated_at" = '2012-10-02 09:00:00.000871' WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.2ms) 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.1ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "running_view_count" = 0, "updated_at" = '2012-10-02 09:00:00.006374' WHERE "advert_selector_banners"."id" = 814558298  (0.1ms) RELEASE SAVEPOINT active_record_1 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.1ms) 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", 814558298]] 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", 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", "end_time"=>"2012-10-12 00:00:00 UTC", "placement_id"=>"405688915", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-10-02 00:00:00 UTC"}}  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) 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", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["end_time", Fri, 12 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", Tue, 02 Oct 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Tue, 02 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.9ms)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners"   (0.2ms) rollback transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.3ms) 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.1ms) 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#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.4ms) 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.3ms) 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 6ms (ActiveRecord: 1.1ms)  (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.2ms) 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 (50.4ms) AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-09-30 09:00:00.158956') 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 163ms (Views: 161.8ms | ActiveRecord: 1.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#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-09-30 09:00:00.008114') 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 11ms (Views: 9.7ms | 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]] Processing by AdvertSelector::BannersController#new as HTML AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/banners/_form.html.erb (26.6ms) AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-09-30 09:00:00.031482') 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 35ms (Views: 34.1ms | 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]] 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-02 09:00:00.001261' 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"]] Redirected to http://test.host/advert_selector/banners/394627963 Completed 302 Found in 1110ms (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 Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 1ms (Views: 1.0ms | 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-09-30 09:00:00.004121') 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 "conflicting_placements_array" = 'not_found,video', "updated_at" = '2012-10-02 09:00:00.000814' 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 "conflicting_placements_array" = '', "updated_at" = '2012-10-02 09:00:00.002350' 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.1ms) 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.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.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.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.1ms) 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.5ms) INSERT INTO "advert_selector_placements" ("conflicting_placements_array", "created_at", "name", "only_once_per_session", "updated_at") VALUES (?, ?, ?, ?, ?) [["conflicting_placements_array", nil], ["created_at", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Tue, 02 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.1ms) 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.1ms) 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.3ms) 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.4ms)  (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 (6.2ms) AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-09-30 09:00:00.011763') 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.9ms | 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-09-30 09:00:00.006282') 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: 8.8ms | 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-09-30 09:00:00.008332') 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: 10.9ms | 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.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-02 09:00:00.000398' 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-02 09:00:00.002385' 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 Tue Oct 02 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-02 09:00:00.006337' OR end_time IS NULL) AND (start_time < '2012-10-02 10:00:00.006530' 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: 8.9ms | 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.3ms) 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", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["name", "always_false"], ["position", 0], ["updated_at", Tue, 02 Oct 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Tue Oct 02 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-02 09:00:00.019694' OR end_time IS NULL) AND (start_time < '2012-10-02 10:00:00.019866' 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.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.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-02 09:00:00.000404' 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-02 09:00:00.002364' 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", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["name", "raise_error"], ["position", 0], ["updated_at", Tue, 02 Oct 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Tue Oct 02 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-02 09:00:00.004169' OR end_time IS NULL) AND (start_time < '2012-10-02 10:00:00.004350' 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-02T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /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.1ms | 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 "/advert_selector/placements" for 127.0.0.1 at Tue Oct 02 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-09-30 09:00:00.020151') 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 14ms (Views: 13.1ms | 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.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-02 09:00:00.000428' 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-02 09:00:00.002459' 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-02 09:00:00.000307' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Tue Oct 02 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-02 09:00:00.003197' OR end_time IS NULL) AND (start_time < '2012-10-02 10:00:00.003376' 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.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 Fri Oct 05 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-05 09:00:00.016948' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.017130' 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 Fri Oct 05 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.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-05 09:00:00.000426' 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-05 09:00:00.002639' 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 Fri Oct 05 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-05 09:00:00.002277' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.002462' 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.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 Started GET "/?advert_selector_force=207249520" for 127.0.0.1 at Fri Oct 05 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-05 09:00:00.015804' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.015982' 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 9ms (Views: 7.7ms | 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.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-05 09:00:00.000471' 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-05 09:00:00.002773' 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-05 09:00:00.000505' 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 Started GET "/" for 127.0.0.1 at Fri Oct 05 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-05 09:00:00.004510' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.004718' 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] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.7ms | 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" = 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 Fri Oct 05 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.6ms | 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" = 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.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-05 09:00:00.000394' 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-05 09:00:00.002281' 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-05 09:00:00.000422' 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.1ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = '', "updated_at" = '2012-10-05 09:00:00.002465' 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.0ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = '', "updated_at" = '2012-10-05 09:00:00.003709' 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 "conflicting_placements_array" = '', "updated_at" = '2012-10-05 09:00:00.005368' 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 Fri Oct 05 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-05 09:00:00.009028' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.009210' 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 7ms (Views: 6.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" = 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.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-05 09:00:00.000398' 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-05 09:00:00.002304' 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 Fri Oct 05 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-05 09:00:00.000228' 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 Fri Oct 05 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.4ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Fri Oct 05 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.4ms | 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.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-05 09:00:00.000387' 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-05 09:00:00.002368' 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 "only_once_per_session" = 't', "updated_at" = '2012-10-05 09:00:00.000861' WHERE "advert_selector_placements"."id" = 405688915  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Oct 05 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-05 09:00:00.003782' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.003966' 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.6ms | 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 Fri Oct 05 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]] 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-05 09:00:00.002221' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.002402' 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.3ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.6ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-02 09:42:43', 100, '2012-10-07 00:00:00', 't', '2012-10-02 09:42:43', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-02 09:42:43', '2012-10-12 00:00:00', 't', '2012-10-02 09:42:43', 100, 394627963, 1000, 't', 0, '2012-10-02 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-02 09:42:43', '2012-10-12 00:00:00', 'f', '2012-10-02 09:42:43', 1000, 207249520, 1000, 't', 1, '2012-10-02 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-02 09:42:43', '2012-10-02 09:42:43', 960656439, 't', 394627963, '') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "id", "content_for", "banner_id", "content") VALUES (1, 'banner_leaderboard', '2012-10-02 09:42:43', '2012-10-02 09:42:43', 929640376, 't', 814558298, '') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "id", "content_for", "banner_id", "content") VALUES ('banner_parade', 1, '2012-10-02 09:42:43', '2012-10-02 09:42:43', 281932184, 't', 207249520, '') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "id", "content_for", "banner_id", "content") VALUES ('request_params_include?', '2012-10-02 09:42:43', '2012-10-02 09:42:43', 435138789, 'f', 394627963, 'pepsi=true') Fixture Delete (0.1ms) DELETE FROM "advert_selector_placements" Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Parade', '2012-10-02 09:42:43', '2012-10-02 09:42:43', 'leaderboard,video', 718799085) Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "only_once_per_session", "id") VALUES ('Video', '2012-10-02 09:42:43', '2012-10-02 09:42:43', 'parade', 't', 1019730477) Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-10-02 09:42:43', '2012-10-02 09:42:43', 'parade', 405688915)  (53.6ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.3ms) 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.1ms) 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.6ms) 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", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["name", nil], ["position", 2], ["updated_at", Tue, 02 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", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Tue, 02 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", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Tue, 02 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-02 09:00:00.000073' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-10-02 09:00:00.000904' OR end_time IS NULL) AND (start_time < '2012-10-02 10:00:00.001023' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count)  (0.2ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-10-02 09:00:00.001915' OR end_time IS NULL)  (0.2ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-10-02 09:00:00.004063' OR end_time IS NULL) AND (start_time < '2011-10-02 10:00:00.004539' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count)  (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) 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-02 09:00:00.000974' 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]]  (0.1ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "running_view_count" = 551, "updated_at" = '2012-10-02 09:00:00.010109' WHERE "advert_selector_banners"."id" = 814558298  (0.1ms) RELEASE SAVEPOINT active_record_1 AdvertSelector::Banner Load (0.1ms) 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.3ms) UPDATE "advert_selector_banners" SET "target_view_count" = 10, "running_view_count" = 0, "updated_at" = '2012-10-02 09:00:00.001003' 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-02 09:00:00.004482' 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.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-02 09:00:00.000451', "confirmed" = 'f' 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 "updated_at" = '2012-10-02 09:00:00.002533', "confirmed" = 't' 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.2ms) 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.1ms) 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 "start_time" = '2012-10-02 10:00:00.000521', "updated_at" = '2012-10-02 09:00:00.001118' 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.3ms) UPDATE "advert_selector_banners" SET "start_time" = '2012-10-02 07:00:00.003462', "end_time" = '2012-10-02 08:00:00.003557', "updated_at" = '2012-10-02 09:00:00.003977' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "start_time" = NULL, "end_time" = '2012-10-02 10:00:00.005627', "updated_at" = '2012-10-02 09:00:00.006156' 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.4ms) UPDATE "advert_selector_banners" SET "target_view_count" = 100, "start_time" = '2012-10-01 21:00:00.000000', "end_time" = '2012-10-12 00:00:00.000000', "updated_at" = '2012-10-02 09:00:00.000844' 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" = 0, "updated_at" = '2012-10-02 09:00:00.003084' 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.1ms) 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", 814558298]] 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.1ms) 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", "end_time"=>"2012-10-12 00:00:00 UTC", "placement_id"=>"405688915", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-10-02 00:00:00 UTC"}}  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) 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", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["end_time", Fri, 12 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", Tue, 02 Oct 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Tue, 02 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.8ms)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners"   (0.1ms) rollback transaction  (0.1ms) 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#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.1ms) SAVEPOINT active_record_1 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 SQL (0.4ms) 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.3ms) 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 9ms (ActiveRecord: 1.3ms)  (0.1ms) 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.1ms) 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 (55.5ms) AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-09-30 09:00:00.165122') 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 169ms (Views: 167.9ms | ActiveRecord: 0.8ms)  (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.1ms) 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.2ms) 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-09-30 09:00:00.009114') 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: 9.7ms | ActiveRecord: 0.7ms)  (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 (25.4ms) AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-09-30 09:00:00.030139') 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 34ms (Views: 32.6ms | 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.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]] Processing by AdvertSelector::BannersController#update as HTML Parameters: {"banner"=>{"comment"=>"Pepsi banner"}, "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  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/banners/394627963 Completed 302 Found in 4ms (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-02 09:00:00.001215' 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 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"]] Redirected to http://test.host/advert_selector/banners/394627963 Completed 302 Found in 1106ms (ActiveRecord: 0.0ms) 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 1ms (Views: 1.0ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) 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-09-30 09:00:00.004319') 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.3ms | 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.1ms) 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.3ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = 'not_found,video', "updated_at" = '2012-10-02 09:00:00.000810' 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 "conflicting_placements_array" = '', "updated_at" = '2012-10-02 09:00:00.002364' 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.1ms) 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.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.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.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#create as HTML Parameters: {"placement"=>{"name"=>"new placement"}}  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "advert_selector_placements" ("conflicting_placements_array", "created_at", "name", "only_once_per_session", "updated_at") VALUES (?, ?, ?, ?, ?) [["conflicting_placements_array", nil], ["created_at", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Tue, 02 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.6ms)  (0.1ms) 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.3ms) 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.4ms)  (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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]] AdvertSelector::Placement Load (0.2ms) 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.1ms) 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 (6.5ms) AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-09-30 09:00:00.015616') 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 17ms (Views: 14.5ms | ActiveRecord: 0.7ms)  (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-09-30 09:00:00.006394') 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: 8.6ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.1ms) 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.1ms) AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-09-30 09:00:00.008380') 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: 10.8ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) 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", 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.2ms) rollback transaction  (0.1ms) 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-02 09:00:00.000470' 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 "updated_at" = '2012-10-02 09:00:00.002894', "confirmed" = 'f' 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 Tue Oct 02 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-02 09:00:00.006709' OR end_time IS NULL) AND (start_time < '2012-10-02 10:00:00.006903' 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 9ms (Views: 8.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  (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.3ms) 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", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["name", "always_false"], ["position", 0], ["updated_at", Tue, 02 Oct 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Tue Oct 02 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.4ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time > '2012-10-02 09:00:00.019883' OR end_time IS NULL) AND (start_time < '2012-10-02 10:00:00.020324' 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.3ms) 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 10ms (Views: 8.9ms | ActiveRecord: 0.9ms) 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-02 09:00:00.000406' 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 "updated_at" = '2012-10-02 09:00:00.002332', "confirmed" = 'f' 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", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["name", "raise_error"], ["position", 0], ["updated_at", Tue, 02 Oct 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Tue Oct 02 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-02 09:00:00.004136' OR end_time IS NULL) AND (start_time < '2012-10-02 10:00:00.004322' 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-02T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /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.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 "/advert_selector/placements" for 127.0.0.1 at Tue Oct 02 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-09-30 09:00:00.020040') 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 16ms (Views: 15.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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-02 09:00:00.000429' 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 "updated_at" = '2012-10-02 09:00:00.002592', "confirmed" = 'f' 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-02 09:00:00.000415' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Tue Oct 02 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-02 09:00:00.004132' OR end_time IS NULL) AND (start_time < '2012-10-02 10:00:00.004369' 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 9ms (Views: 7.8ms | 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" = 814558298 AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Fri Oct 05 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-05 09:00:00.021936' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.022126' 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 Fri Oct 05 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-05 09:00:00.000431' 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 "updated_at" = '2012-10-05 09:00:00.002440', "confirmed" = 'f' 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 Fri Oct 05 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.4ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time > '2012-10-05 09:00:00.004081' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.004658' 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 Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 12ms (Views: 11.0ms | ActiveRecord: 0.8ms) 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 Started GET "/?advert_selector_force=207249520" for 127.0.0.1 at Fri Oct 05 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-05 09:00:00.022741' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.022919' 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 9ms (Views: 8.3ms | ActiveRecord: 0.6ms) 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  (0.2ms) rollback transaction  (0.0ms) 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.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-05 09:00:00.000462' 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 "updated_at" = '2012-10-05 09:00:00.002557', "confirmed" = 'f' 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 "updated_at" = '2012-10-05 09:00:00.000435', "confirmed" = 't' 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 Started GET "/" for 127.0.0.1 at Fri Oct 05 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-05 09:00:00.004107' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.004284' 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] 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" = 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 Fri Oct 05 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.7ms | 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" = 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.4ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-05 09:00:00.000496' 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.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-05 09:00:00.003652', "confirmed" = 'f' 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.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-05 09:00:00.001099', "confirmed" = 't' WHERE "advert_selector_banners"."id" = 207249520 AdvertSelector::HelperItem Load (0.2ms) 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 "conflicting_placements_array" = '', "updated_at" = '2012-10-05 09:00:00.005791' 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 "conflicting_placements_array" = '', "updated_at" = '2012-10-05 09:00:00.007495' 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 "conflicting_placements_array" = '', "updated_at" = '2012-10-05 09:00:00.009253' 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 Fri Oct 05 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-05 09:00:00.013067' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.013309' 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 7ms (Views: 6.7ms | 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" = 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]]  (0.1ms) SAVEPOINT active_record_1  (0.5ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-05 09:00:00.000693' 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 "updated_at" = '2012-10-05 09:00:00.004095', "confirmed" = 'f' 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 Fri Oct 05 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-05 09:00:00.000247' 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 Fri Oct 05 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 Fri Oct 05 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.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-05 09:00:00.000409' 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 "updated_at" = '2012-10-05 09:00:00.002557', "confirmed" = 'f' 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.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = 405688915 LIMIT 1  (0.1ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_placements" SET "only_once_per_session" = 't', "updated_at" = '2012-10-05 09:00:00.002954' WHERE "advert_selector_placements"."id" = 405688915  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Oct 05 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-05 09:00:00.008869' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.009094' 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 7ms (Views: 6.2ms | 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" = 814558298 AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Fri Oct 05 12:00:00 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 2ms (Views: 1.5ms | 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.1ms) begin transaction AdvertSelector::Banner Load (0.3ms) 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.1ms) 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-05 09:00:00.002709' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.002940' 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 Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 7ms (Views: 6.3ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.2ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-02 09:43:03', 100, '2012-10-07 00:00:00', 't', '2012-10-02 09:43:03', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-02 09:43:03', '2012-10-12 00:00:00', 't', '2012-10-02 09:43:03', 100, 394627963, 1000, 't', 0, '2012-10-02 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-02 09:43:03', '2012-10-12 00:00:00', 'f', '2012-10-02 09:43:03', 1000, 207249520, 1000, 't', 1, '2012-10-02 00:00:00') Fixture Delete (0.2ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "id", "content_for", "banner_id", "content") VALUES ('banner_leaderboard', 2, '2012-10-02 09:43:03', '2012-10-02 09:43:03', 960656439, 't', 394627963, '') 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-02 09:43:03', '2012-10-02 09:43:03', 929640376, 't', 814558298, '') 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-02 09:43:03', '2012-10-02 09:43:03', 281932184, 't', 207249520, '') 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-02 09:43:03', '2012-10-02 09:43:03', 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-02 09:43:03', '2012-10-02 09:43:03', '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-02 09:43:03', '2012-10-02 09:43:03', '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-02 09:43:03', '2012-10-02 09:43:03', 'parade', 405688915)  (43.4ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.3ms) 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.1ms) 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.6ms) 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", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["name", nil], ["position", 2], ["updated_at", Tue, 02 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", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Tue, 02 Oct 2012 09:00:00 UTC +00:00]] 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.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", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Tue, 02 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-02 09:00:00.000076' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-10-02 09:00:00.000944' OR end_time IS NULL) AND (start_time < '2012-10-02 10:00:00.001063' 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-02 09:00:00.001935' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-10-02 09:00:00.002607' OR end_time IS NULL) AND (start_time < '2011-10-02 10:00:00.002721' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count)  (0.2ms) rollback transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.3ms) 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.1ms) SAVEPOINT active_record_1  (1.0ms) UPDATE "advert_selector_banners" SET "running_view_count" = 0, "updated_at" = '2012-10-02 09:00:00.001877' WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.2ms) 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 AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]]  (0.1ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "running_view_count" = 551, "updated_at" = '2012-10-02 09:00:00.014615' 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-02 09:00:00.000889' 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-02 09:00:00.004210' 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.3ms) UPDATE "advert_selector_banners" SET "confirmed" = 'f', "updated_at" = '2012-10-02 09:00:00.000406' 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-02 09:00:00.002446' 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.3ms) UPDATE "advert_selector_banners" SET "start_time" = '2012-10-02 10:00:00.000372', "updated_at" = '2012-10-02 09:00:00.000802' 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-02 07:00:00.002524', "end_time" = '2012-10-02 08:00:00.002600', "updated_at" = '2012-10-02 09:00:00.002936' 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-02 10:00:00.004063', "updated_at" = '2012-10-02 09:00:00.004407' 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-01 21:00:00.000000', "end_time" = '2012-10-12 00:00:00.000000', "target_view_count" = 100, "updated_at" = '2012-10-02 09:00:00.000857' 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.1ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "running_view_count" = 0, "updated_at" = '2012-10-02 09:00:00.004596' WHERE "advert_selector_banners"."id" = 814558298  (0.1ms) RELEASE SAVEPOINT active_record_1 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", 814558298]] 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", 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", "end_time"=>"2012-10-12 00:00:00 UTC", "placement_id"=>"405688915", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-10-02 00:00:00 UTC"}}  (0.1ms) SAVEPOINT active_record_1 SQL (1.2ms) 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", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["end_time", Fri, 12 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", Tue, 02 Oct 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Tue, 02 Oct 2012 09:00:00 UTC +00:00]] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558299 ORDER BY position  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/banners/814558299 Completed 302 Found in 10ms (ActiveRecord: 1.6ms)  (0.1ms) 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.1ms) SELECT COUNT(*) FROM "advert_selector_banners"  Processing by AdvertSelector::BannersController#destroy 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"]]  (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.3ms) 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 5ms (ActiveRecord: 0.9ms)  (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.1ms) 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 (44.6ms) AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-09-30 09:00:00.149871') 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 154ms (Views: 152.8ms | 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-09-30 09:00:00.006853') 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 11ms (Views: 9.3ms | 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 (19.0ms) AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-09-30 09:00:00.023753') 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 28ms (Views: 26.3ms | 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-02 09:00:00.001161' 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", "394627963"]]  (0.3ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "running_view_count" = 99, "updated_at" = '2012-10-02 09:00:01.102649' WHERE "advert_selector_banners"."id" = 394627963 AdvertSelector::HelperItem Load (0.3ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 394627963 ORDER BY position  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/banners/394627963 Completed 302 Found in 1104ms (ActiveRecord: 1.0ms) AdvertSelector::Banner Load (0.1ms) 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.2ms | 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-09-30 09:00:00.004156') 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.3ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) 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.3ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-10-02 09:00:00.000802', "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-02 09:00:00.002310', "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.1ms) 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.3ms) rollback transaction  (0.1ms) 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.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]] 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.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.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.1ms) SELECT COUNT(*) FROM "advert_selector_placements"  Processing by AdvertSelector::PlacementsController#create as HTML Parameters: {"placement"=>{"name"=>"new placement"}}  (0.1ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "advert_selector_placements" ("conflicting_placements_array", "created_at", "name", "only_once_per_session", "updated_at") VALUES (?, ?, ?, ?, ?) [["conflicting_placements_array", nil], ["created_at", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Tue, 02 Oct 2012 09:00:00 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/1019730478 Completed 302 Found in 7ms (ActiveRecord: 1.2ms)  (0.1ms) 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.1ms) 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.3ms) 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.4ms)  (0.0ms) SELECT COUNT(*) FROM "advert_selector_placements"   (0.2ms) 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.1ms) 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", 405688915]] Processing by AdvertSelector::PlacementsController#edit as HTML Parameters: {"id"=>"405688915"} AdvertSelector::Placement Load (0.1ms) 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 (6.1ms) AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-09-30 09:00:00.013672') 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 16ms (Views: 13.9ms | 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-09-30 09:00:00.006515') 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.4ms) AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-09-30 09:00:00.008589') 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.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]] 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.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-02 09:00:00.000425' 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-02 09:00:00.002502' 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 Tue Oct 02 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-02 09:00:00.006456' OR end_time IS NULL) AND (start_time < '2012-10-02 10:00:00.006647' 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 9ms (Views: 8.8ms | ActiveRecord: 0.4ms) AdvertSelector::HelperItem Load (0.3ms) 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) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."banner_id" = 814558298 AND position >= 0) 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", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["name", "always_false"], ["position", 0], ["updated_at", Tue, 02 Oct 2012 09:00:00 UTC +00:00]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Tue Oct 02 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-02 09:00:00.026402' OR end_time IS NULL) AND (start_time < '2012-10-02 10:00:00.026658' 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 5ms (Views: 4.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  (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-02 09:00:00.000407' 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-02 09:00:00.002403' 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", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["name", "raise_error"], ["position", 0], ["updated_at", Tue, 02 Oct 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Tue Oct 02 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-02 09:00:00.004192' OR end_time IS NULL) AND (start_time < '2012-10-02 10:00:00.004376' 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-02T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /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.2ms | 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 "/advert_selector/placements" for 127.0.0.1 at Tue Oct 02 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.3ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-09-30 09:00:00.023049') 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 17ms (Views: 15.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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-02 09:00:00.000422' 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-02 09:00:00.002490' 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-02 09:00:00.000291' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Tue Oct 02 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-02 09:00:00.003185' OR end_time IS NULL) AND (start_time < '2012-10-02 10:00:00.003364' 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.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 "/" for 127.0.0.1 at Fri Oct 05 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-05 09:00:00.017110' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.017284' 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.3ms | 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 Fri Oct 05 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-05 09:00:00.000421' 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-05 09:00:00.002467' 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 Fri Oct 05 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-05 09:00:00.002314' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.002492' 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.3ms | 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" = 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 Fri Oct 05 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-05 09:00:00.015742' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.015933' 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 9ms (Views: 7.9ms | 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.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-05 09:00:00.000437' 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-05 09:00:00.002486' 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-05 09:00:00.000455' 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 Started GET "/" for 127.0.0.1 at Fri Oct 05 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-05 09:00:00.004205' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.004387' 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] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.6ms | 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" = 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 Fri Oct 05 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.8ms | 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" = 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-05 09:00:00.000433' 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-05 09:00:00.002538' 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-05 09:00:00.000446' 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.1ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-10-05 09:00:00.002639', "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-05 09:00:00.003941', "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-05 09:00:00.005612', "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 Fri Oct 05 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-05 09:00:00.009332' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.009509' 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 7ms (Views: 6.7ms | 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 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-05 09:00:00.000422' 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-05 09:00:00.002495' 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 Fri Oct 05 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-05 09:00:00.000235' 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 Fri Oct 05 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.6ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Fri Oct 05 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.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-05 09:00:00.000409' 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-05 09:00:00.002442' 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-05 09:00:00.000927', "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 Fri Oct 05 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-05 09:00:00.003914' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.004102' 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.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 "/" for 127.0.0.1 at Fri Oct 05 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]] 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-05 09:00:00.002343' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.002521' 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.5ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-02 09:44:28', 100, '2012-10-07 00:00:00', 't', '2012-10-02 09:44:28', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-02 09:44:28', '2012-10-12 00:00:00', 't', '2012-10-02 09:44:28', 100, 394627963, 1000, 't', 0, '2012-10-02 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-02 09:44:28', '2012-10-12 00:00:00', 'f', '2012-10-02 09:44:28', 1000, 207249520, 1000, 't', 1, '2012-10-02 00:00:00') Fixture Delete (0.3ms) 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-02 09:44:28', '2012-10-02 09:44:28', 960656439, 't', 394627963, '') 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-02 09:44:28', '2012-10-02 09:44:28', 929640376, 't', 814558298, '') 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-02 09:44:28', '2012-10-02 09:44:28', 281932184, 't', 207249520, '') 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-02 09:44:28', '2012-10-02 09:44:28', 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-02 09:44:28', '2012-10-02 09:44:28', 'leaderboard,video', 718799085) Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "only_once_per_session", "id") VALUES ('Video', '2012-10-02 09:44:28', '2012-10-02 09:44:28', '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-02 09:44:28', '2012-10-02 09:44:28', 'parade', 405688915)  (90.5ms) 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.7ms) 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", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["name", nil], ["position", 2], ["updated_at", Tue, 02 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", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Tue, 02 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", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Tue, 02 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-02 09:00:00.000073' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-10-02 09:00:00.000942' OR end_time IS NULL) AND (start_time < '2012-10-02 10:00:00.001063' 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-02 09:00:00.001982' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-10-02 09:00:00.002665' OR end_time IS NULL) AND (start_time < '2011-10-02 10:00:00.002778' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count)  (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) 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 "updated_at" = '2012-10-02 09:00:00.000963', "running_view_count" = 0 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 "updated_at" = '2012-10-02 09:00:00.007220', "running_view_count" = 551 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 "updated_at" = '2012-10-02 09:00:00.000940', "running_view_count" = 0, "target_view_count" = 10 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 "updated_at" = '2012-10-02 09:00:00.004241', "running_view_count" = 10 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.2ms) rollback transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.3ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]]  (0.1ms) SAVEPOINT active_record_1  (1.0ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-02 09:00:00.001374', "confirmed" = 'f' 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 "updated_at" = '2012-10-02 09:00:00.005721', "confirmed" = 't' 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 "updated_at" = '2012-10-02 09:00:00.000779', "start_time" = '2012-10-02 10:00:00.000371' 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 "updated_at" = '2012-10-02 09:00:00.002993', "start_time" = '2012-10-02 07:00:00.002498', "end_time" = '2012-10-02 08:00:00.002570' 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 "updated_at" = '2012-10-02 09:00:00.004703', "start_time" = NULL, "end_time" = '2012-10-02 10:00:00.004356' 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 "updated_at" = '2012-10-02 09:00:00.000827', "target_view_count" = 100, "start_time" = '2012-10-01 21:00:00.000000', "end_time" = '2012-10-12 00:00:00.000000' 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 "updated_at" = '2012-10-02 09:00:00.002990', "running_view_count" = 0 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.2ms) 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", "end_time"=>"2012-10-12 00:00:00 UTC", "placement_id"=>"405688915", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-10-02 00:00:00 UTC"}}  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) 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", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["end_time", Fri, 12 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", Tue, 02 Oct 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Tue, 02 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.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]]  (0.0ms) SELECT COUNT(*) FROM "advert_selector_banners"  Processing by AdvertSelector::BannersController#destroy 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"]]  (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.4ms) 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 5ms (ActiveRecord: 1.0ms)  (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 (44.7ms) AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-09-30 09:00:00.140355') 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 145ms (Views: 143.3ms | 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-09-30 09:00:00.006872') 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 11ms (Views: 9.3ms | 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.5ms) AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-09-30 09:00:00.023381') 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.5ms | 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 "updated_at" = '2012-10-02 09:00:00.001197', "running_view_count" = 1 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", "394627963"]] SQL (0.2ms) 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 1104ms (ActiveRecord: 0.3ms) AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]]  (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.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 1ms (Views: 1.0ms | 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.5ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-09-30 09:00:00.004445') ORDER BY priority desc LIMIT 10 AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = 718799085 LIMIT 1 AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = 405688915 LIMIT 1 AdvertSelector::Placement Load (0.2ms) 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.9ms | ActiveRecord: 1.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]] 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.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.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) 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.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.0ms) SAVEPOINT active_record_1  (0.5ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = 'not_found,video', "updated_at" = '2012-10-02 09:00:00.000888' 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.2ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = '', "updated_at" = '2012-10-02 09:00:00.003774' 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.1ms) 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.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.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.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.1ms) 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.5ms) INSERT INTO "advert_selector_placements" ("conflicting_placements_array", "created_at", "name", "only_once_per_session", "updated_at") VALUES (?, ?, ?, ?, ?) [["conflicting_placements_array", nil], ["created_at", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Tue, 02 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 4ms (ActiveRecord: 0.5ms)  (0.2ms) 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.1ms) 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.3ms) 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.4ms)  (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-09-30 09:00:00.011296') 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.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = 405688915 LIMIT 1 AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = 405688915 LIMIT 1 AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" Completed 200 OK in 21ms (Views: 19.1ms | ActiveRecord: 1.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#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-09-30 09:00:00.006428') 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]] 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-09-30 09:00:00.008340') 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.0ms | 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) 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.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-02 09:00:00.000396', "fast_mode" = 't' 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 "updated_at" = '2012-10-02 09:00:00.002382', "confirmed" = 'f' 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 Tue Oct 02 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-02 09:00:00.006440' OR end_time IS NULL) AND (start_time < '2012-10-02 10:00:00.006639' 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 9ms (Views: 8.6ms | 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.3ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."banner_id" = 814558298 AND position >= 0) SQL (0.3ms) 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", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["name", "always_false"], ["position", 0], ["updated_at", Tue, 02 Oct 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Tue Oct 02 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-02 09:00:00.019311' OR end_time IS NULL) AND (start_time < '2012-10-02 10:00:00.019483' 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: 4.0ms | 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.2ms) 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 "updated_at" = '2012-10-02 09:00:00.000420', "fast_mode" = 't' 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 "updated_at" = '2012-10-02 09:00:00.002438', "confirmed" = 'f' 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", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["name", "raise_error"], ["position", 0], ["updated_at", Tue, 02 Oct 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Tue Oct 02 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-02 09:00:00.004127' OR end_time IS NULL) AND (start_time < '2012-10-02 10:00:00.004303' 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-02T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /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.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 "/advert_selector/placements" for 127.0.0.1 at Tue Oct 02 12:00:00 +0300 2012 Processing by AdvertSelector::PlacementsController#index as HTML AdvertSelector::Placement Load (0.2ms) 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-09-30 09:00:00.026282') 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 18ms (Views: 15.3ms | 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-02 09:00:00.000424', "fast_mode" = 't' 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 "updated_at" = '2012-10-02 09:00:00.002619', "confirmed" = 'f' 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 "updated_at" = '2012-10-02 09:00:00.000292', "frequency" = 2 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Tue Oct 02 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.4ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time > '2012-10-02 09:00:00.003171' OR end_time IS NULL) AND (start_time < '2012-10-02 10:00:00.003356' 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.3ms) 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 11ms (Views: 9.4ms | ActiveRecord: 0.9ms) 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 Fri Oct 05 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-05 09:00:00.022274' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.022447' 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.3ms | 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 Fri Oct 05 12:00:00 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 2ms (Views: 1.5ms | 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.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-05 09:00:00.000435', "fast_mode" = 't' 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 "updated_at" = '2012-10-05 09:00:00.002468', "confirmed" = 'f' 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 Fri Oct 05 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-05 09:00:00.002258' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.002436' 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.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 Started GET "/?advert_selector_force=207249520" for 127.0.0.1 at Fri Oct 05 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-05 09:00:00.015569' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.015755' 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 9ms (Views: 7.9ms | 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.2ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]]  (0.1ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-05 09:00:00.000800', "fast_mode" = 't' WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.2ms) 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.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-05 09:00:00.004670', "confirmed" = 'f' 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 "updated_at" = '2012-10-05 09:00:00.000492', "confirmed" = 't' 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 Started GET "/" for 127.0.0.1 at Fri Oct 05 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-05 09:00:00.004207' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.004387' 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] AdvertSelection finished Completed 200 OK in 7ms (Views: 6.0ms | 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" = 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 Fri Oct 05 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.7ms | 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" = 207249520 AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 AdvertSelector::HelperItem Load (0.3ms) 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 "updated_at" = '2012-10-05 09:00:00.000466', "fast_mode" = 't' 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 "updated_at" = '2012-10-05 09:00:00.002529', "confirmed" = 'f' 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 "updated_at" = '2012-10-05 09:00:00.000451', "confirmed" = 't' 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 "conflicting_placements_array" = '', "updated_at" = '2012-10-05 09:00:00.002646' 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 "conflicting_placements_array" = '', "updated_at" = '2012-10-05 09:00:00.004000' 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 "conflicting_placements_array" = '', "updated_at" = '2012-10-05 09:00:00.005720' 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 Fri Oct 05 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-05 09:00:00.009536' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.009718' 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 7ms (Views: 6.8ms | 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" = 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.2ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]]  (0.1ms) SAVEPOINT active_record_1  (0.5ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-05 09:00:00.000739', "fast_mode" = 't' 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 "updated_at" = '2012-10-05 09:00:00.003989', "confirmed" = 'f' 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 Fri Oct 05 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-05 09:00:00.000273' 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.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 Started GET "/" for 127.0.0.1 at Fri Oct 05 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.6ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Fri Oct 05 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.5ms | 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.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-05 09:00:00.000398', "fast_mode" = 't' 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 "updated_at" = '2012-10-05 09:00:00.002605', "confirmed" = 'f' 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 "only_once_per_session" = 't', "updated_at" = '2012-10-05 09:00:00.000920' WHERE "advert_selector_placements"."id" = 405688915  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Oct 05 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-05 09:00:00.003860' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.004048' 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.3ms | 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 Fri Oct 05 12:00:00 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 2ms (Views: 1.5ms | 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) 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.4ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time > '2012-10-05 09:00:00.006758' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.007210' 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 Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 12ms (Views: 10.8ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-02 09:44:47', 100, '2012-10-07 00:00:00', 't', '2012-10-02 09:44:47', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-02 09:44:47', '2012-10-12 00:00:00', 't', '2012-10-02 09:44:47', 100, 394627963, 1000, 't', 0, '2012-10-02 00:00:00') Fixture Insert (0.1ms) 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-02 09:44:47', '2012-10-12 00:00:00', 'f', '2012-10-02 09:44:47', 1000, 207249520, 1000, 't', 1, '2012-10-02 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-02 09:44:47', '2012-10-02 09:44:47', 960656439, 't', 394627963, '') 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-02 09:44:47', '2012-10-02 09:44:47', 929640376, 't', 814558298, '') 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-02 09:44:47', '2012-10-02 09:44:47', 281932184, 't', 207249520, '') 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-02 09:44:47', '2012-10-02 09:44:47', 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-02 09:44:47', '2012-10-02 09:44:47', '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-02 09:44:47', '2012-10-02 09:44:47', '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-02 09:44:47', '2012-10-02 09:44:47', 'parade', 405688915)  (45.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", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["name", nil], ["position", 2], ["updated_at", Tue, 02 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", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Tue, 02 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", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Tue, 02 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-02 09:00:00.000074' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-10-02 09:00:00.000907' OR end_time IS NULL) AND (start_time < '2012-10-02 10:00:00.001026' 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-02 09:00:00.001936' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-10-02 09:00:00.002605' OR end_time IS NULL) AND (start_time < '2011-10-02 10:00:00.002720' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count)  (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) rollback transaction  (0.1ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]]  (0.1ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_banners" SET "running_view_count" = 0, "updated_at" = '2012-10-02 09:00:00.001474' 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]]  (0.1ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "running_view_count" = 551, "updated_at" = '2012-10-02 09:00:00.011155' 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, "updated_at" = '2012-10-02 09:00:00.000873', "target_view_count" = 10 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-02 09:00:00.004226' 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.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-02 09:00:00.000404', "confirmed" = 'f' 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 "updated_at" = '2012-10-02 09:00:00.002403', "confirmed" = 't' 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.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-02 09:00:00.000880', "start_time" = '2012-10-02 10:00:00.000386' 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 "updated_at" = '2012-10-02 09:00:00.003010', "start_time" = '2012-10-02 07:00:00.002612', "end_time" = '2012-10-02 08:00:00.002681' 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 "updated_at" = '2012-10-02 09:00:00.004408', "start_time" = NULL, "end_time" = '2012-10-02 10:00:00.004086' 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 "updated_at" = '2012-10-02 09:00:00.000833', "start_time" = '2012-10-01 21:00:00.000000', "target_view_count" = 100, "end_time" = '2012-10-12 00:00:00.000000' 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" = 0, "updated_at" = '2012-10-02 09:00:00.002913' 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.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", 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.2ms) begin transaction AdvertSelector::Banner Load (0.3ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]] AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) 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", "end_time"=>"2012-10-12 00:00:00 UTC", "placement_id"=>"405688915", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-10-02 00:00:00 UTC"}}  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) 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", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["end_time", Fri, 12 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", Tue, 02 Oct 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Tue, 02 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 7ms (ActiveRecord: 0.9ms)  (0.1ms) 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.1ms) SELECT COUNT(*) FROM "advert_selector_banners"  Processing by AdvertSelector::BannersController#destroy 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"]]  (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.9ms)  (0.1ms) 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.1ms) 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 (44.6ms) AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-09-30 09:00:00.143192') 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 148ms (Views: 146.1ms | 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-09-30 09:00:00.007139') 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 11ms (Views: 9.7ms | 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]] 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.6ms) AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-09-30 09:00:00.023188') 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.7ms | 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.3ms) UPDATE "advert_selector_banners" SET "running_view_count" = 1, "updated_at" = '2012-10-02 09:00:00.001208' 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.1ms) 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.2ms) 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 1096ms (ActiveRecord: 0.4ms) AdvertSelector::Banner Load (0.1ms) 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 1ms (Views: 1.0ms | 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 2ms (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-09-30 09:00:00.004168') 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.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.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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) 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.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.1ms) SAVEPOINT active_record_1  (0.5ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-10-02 09:00:00.002149', "conflicting_placements_array" = 'not_found,video' WHERE "advert_selector_placements"."id" = 718799085 AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE (LOWER(name) = 'leaderboard') LIMIT 1  (0.3ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-10-02 09:00:00.006135', "conflicting_placements_array" = '' WHERE "advert_selector_placements"."id" = 405688915 AdvertSelector::Placement Load (0.2ms) 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.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."name" = 'video' LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1 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.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.1ms) rollback transaction  (0.1ms) 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.1ms) 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.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#create as HTML Parameters: {"placement"=>{"name"=>"new placement"}}  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "advert_selector_placements" ("conflicting_placements_array", "created_at", "name", "only_once_per_session", "updated_at") VALUES (?, ?, ?, ?, ?) [["conflicting_placements_array", nil], ["created_at", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Tue, 02 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.6ms)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_placements"   (0.2ms) rollback transaction  (0.1ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) 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", 405688915]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_placements" Processing by AdvertSelector::PlacementsController#destroy as HTML Parameters: {"id"=>"405688915"} AdvertSelector::Placement Load (0.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", "405688915"]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) 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 3ms (ActiveRecord: 0.5ms)  (0.1ms) 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.1ms) 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.1ms) 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 (10.0ms) AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-09-30 09:00:00.019157') 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.2ms) 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 24ms (Views: 21.3ms | ActiveRecord: 1.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#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-09-30 09:00:00.006480') 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 11ms (Views: 10.0ms | 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.6ms) AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-09-30 09:00:00.009155') 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 14ms (Views: 12.9ms | 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#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.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) rollback transaction  (0.1ms) 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.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.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-02 09:00:00.000461' 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 "updated_at" = '2012-10-02 09:00:00.002533', "confirmed" = 'f' 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 Tue Oct 02 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-02 09:00:00.006439' OR end_time IS NULL) AND (start_time < '2012-10-02 10:00:00.006628' 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.3ms) 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) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."banner_id" = 814558298 AND position >= 0) SQL (0.3ms) 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", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["name", "always_false"], ["position", 0], ["updated_at", Tue, 02 Oct 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Tue Oct 02 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-02 09:00:00.024407' OR end_time IS NULL) AND (start_time < '2012-10-02 10:00:00.024662' 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 5ms (Views: 4.8ms | 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" = 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-02 09:00:00.000398' 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 "updated_at" = '2012-10-02 09:00:00.002340', "confirmed" = 'f' 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", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["name", "raise_error"], ["position", 0], ["updated_at", Tue, 02 Oct 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Tue Oct 02 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-02 09:00:00.004094' OR end_time IS NULL) AND (start_time < '2012-10-02 10:00:00.004334' 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-02T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /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.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 "/advert_selector/placements" for 127.0.0.1 at Tue Oct 02 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-09-30 09:00:00.024333') 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 21ms (Views: 19.9ms | ActiveRecord: 0.6ms)  (0.3ms) rollback transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.3ms) 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.1ms) 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-02 09:00:00.000921' 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 "updated_at" = '2012-10-02 09:00:00.003898', "confirmed" = 'f' 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 "updated_at" = '2012-10-02 09:00:00.000340', "frequency" = 2 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Tue Oct 02 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-02 09:00:00.003296' OR end_time IS NULL) AND (start_time < '2012-10-02 10:00:00.003490' 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.3ms | 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 Fri Oct 05 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-05 09:00:00.016772' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.016957' 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.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 Fri Oct 05 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.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.3ms) 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.1ms) 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-05 09:00:00.000451' 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 "updated_at" = '2012-10-05 09:00:00.002811', "confirmed" = 'f' 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.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Oct 05 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-05 09:00:00.002735' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.002952' 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" = 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 Fri Oct 05 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.4ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time > '2012-10-05 09:00:00.016141' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.016409' 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.3ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" IN (718799085, 405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.3ms) 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 15ms (Views: 13.6ms | ActiveRecord: 1.2ms) 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.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-05 09:00:00.000511' 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 "updated_at" = '2012-10-05 09:00:00.002826', "confirmed" = 'f' 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 "updated_at" = '2012-10-05 09:00:00.000469', "confirmed" = 't' 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 Started GET "/" for 127.0.0.1 at Fri Oct 05 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-05 09:00:00.004182' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.004379' 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] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.7ms | 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" = 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 Fri Oct 05 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.7ms | 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" = 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.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-05 09:00:00.000429' 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 "updated_at" = '2012-10-05 09:00:00.002583', "confirmed" = 'f' 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 "updated_at" = '2012-10-05 09:00:00.000468', "confirmed" = 't' 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.1ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-10-05 09:00:00.002928', "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-05 09:00:00.004328', "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-05 09:00:00.006204', "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.1ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Oct 05 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.4ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time > '2012-10-05 09:00:00.012533' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.012950' 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.3ms) 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 13ms (Views: 11.8ms | ActiveRecord: 0.8ms) 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-05 09:00:00.000429' 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 "updated_at" = '2012-10-05 09:00:00.002607', "confirmed" = 'f' 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 Fri Oct 05 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-05 09:00:00.000244' 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.9ms | 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 Fri Oct 05 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.6ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Fri Oct 05 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 5ms (Views: 4.9ms | 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.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-05 09:00:00.000419' 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 "updated_at" = '2012-10-05 09:00:00.002531', "confirmed" = 'f' 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-05 09:00:00.001006', "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 Fri Oct 05 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-05 09:00:00.004079' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.004278' 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.3ms) 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 9ms (Views: 8.3ms | ActiveRecord: 0.6ms) AdvertSelector::HelperItem Load (0.3ms) 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 Fri Oct 05 12:00:00 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 2ms (Views: 1.9ms | 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-05 09:00:00.002366' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.002560' 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.7ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-02 09:48:18', 100, '2012-10-07 00:00:00', 't', '2012-10-02 09:48:18', 50, 814558298, 1000, 'f', 0, '2012-09-27 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-02 09:48:18', '2012-10-12 00:00:00', 't', '2012-10-02 09:48:18', 100, 394627963, 1000, 't', 0, '2012-10-02 00:00:00') Fixture Insert (0.1ms) 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-02 09:48:18', '2012-10-12 00:00:00', 'f', '2012-10-02 09:48:18', 1000, 207249520, 1000, 't', 1, '2012-10-02 00:00:00') Fixture Delete (0.3ms) 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-02 09:48:18', '2012-10-02 09:48:18', 960656439, 't', 394627963, '') 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-02 09:48:18', '2012-10-02 09:48:18', 929640376, 't', 814558298, '') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "id", "content_for", "banner_id", "content") VALUES ('banner_parade', 1, '2012-10-02 09:48:18', '2012-10-02 09:48:18', 281932184, 't', 207249520, '') 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-02 09:48:18', '2012-10-02 09:48:18', 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-02 09:48:18', '2012-10-02 09:48:18', '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-02 09:48:18', '2012-10-02 09:48:18', '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-02 09:48:18', '2012-10-02 09:48:18', 'parade', 405688915)  (764.3ms) commit transaction  (0.0ms) 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) 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.6ms) 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", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["name", nil], ["position", 2], ["updated_at", Tue, 02 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", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Tue, 02 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", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Tue, 02 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.2ms) DELETE FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."id" = ? [["id", 960656440]] SQL (0.2ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items"  AdvertSelector::HelperItem Load (0.2ms) 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.2ms) 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-02 09:00:00.000080' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-10-02 09:00:00.001082' OR end_time IS NULL) AND (start_time < '2012-10-02 10:00:00.001240' 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-02 09:00:00.002348' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-10-02 09:00:00.003262' OR end_time IS NULL) AND (start_time < '2011-10-02 10:00:00.003405' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count)  (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) 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 "updated_at" = '2012-10-02 09:00:00.001018', "running_view_count" = 0 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 "updated_at" = '2012-10-02 09:00:00.006921', "running_view_count" = 551 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 "updated_at" = '2012-10-02 09:00:00.000886', "running_view_count" = 0, "target_view_count" = 10 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 "updated_at" = '2012-10-02 09:00:00.004215', "running_view_count" = 10 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-02 09:00:00.000382' 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-02 09:00:00.002322' 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 "updated_at" = '2012-10-02 09:00:00.000775', "start_time" = '2012-10-02 10:00:00.000358' 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 "end_time" = '2012-10-02 08:00:00.002463', "updated_at" = '2012-10-02 09:00:00.002787', "start_time" = '2012-10-02 07:00:00.002395' 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 "end_time" = '2012-10-02 10:00:00.003858', "updated_at" = '2012-10-02 09:00:00.004205', "start_time" = NULL 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 "end_time" = '2012-10-12 00:00:00.000000', "updated_at" = '2012-10-02 09:00:00.000859', "target_view_count" = 100, "start_time" = '2012-10-01 21:00:00.000000' 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 "updated_at" = '2012-10-02 09:00:00.002921', "running_view_count" = 0 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-12 00:00:00 UTC", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-10-02 00:00:00 UTC"}}  (0.0ms) 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", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["end_time", Fri, 12 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", Tue, 02 Oct 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Tue, 02 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.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]]  (0.0ms) SELECT COUNT(*) FROM "advert_selector_banners"  Processing by AdvertSelector::BannersController#destroy 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"]]  (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.0ms) 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 (56.4ms) AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-09-30 09:00:00.153280') 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 161ms (Views: 158.7ms | ActiveRecord: 0.9ms)  (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.2ms) 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-09-30 09:00:00.007871') 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: 10.2ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) 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 (33.9ms) AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-09-30 09:00:00.048948') 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 51ms (Views: 49.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]] 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.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  (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.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 "updated_at" = '2012-10-02 09:00:00.001404', "running_view_count" = 1 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.1ms) 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.6ms) 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 1076ms (ActiveRecord: 0.8ms) AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]]  (0.2ms) 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.1ms) 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 3ms (Views: 1.9ms | 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-09-30 09:00:00.004216') 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.3ms | 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.3ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = 'not_found,video', "updated_at" = '2012-10-02 09:00:00.000805' 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 "conflicting_placements_array" = '', "updated_at" = '2012-10-02 09:00:00.002437' 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.1ms) 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.1ms) 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.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.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.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#create as HTML Parameters: {"placement"=>{"name"=>"new placement"}}  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "advert_selector_placements" ("conflicting_placements_array", "created_at", "name", "only_once_per_session", "updated_at") VALUES (?, ?, ?, ?, ?) [["conflicting_placements_array", nil], ["created_at", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Tue, 02 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.6ms)  (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.1ms) 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.1ms) SAVEPOINT active_record_1 SQL (0.3ms) 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.4ms)  (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 (6.0ms) AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-09-30 09:00:00.011770') 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.8ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.1ms) 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-09-30 09:00:00.006318') 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: 8.7ms | 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-09-30 09:00:00.008356') 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: 10.9ms | 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.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 "updated_at" = '2012-10-02 09:00:00.000407', "fast_mode" = 't' 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-02 09:00:00.002428' 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 Tue Oct 02 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-02 09:00:00.006477' OR end_time IS NULL) AND (start_time < '2012-10-02 10:00:00.006669' 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 9ms (Views: 8.7ms | 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.3ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."banner_id" = 814558298 AND position >= 0) SQL (0.3ms) 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", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["name", "always_false"], ["position", 0], ["updated_at", Tue, 02 Oct 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Tue Oct 02 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-02 09:00:00.019771' OR end_time IS NULL) AND (start_time < '2012-10-02 10:00:00.019958' 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: 4.0ms | 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.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 "updated_at" = '2012-10-02 09:00:00.000430', "fast_mode" = 't' 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-02 09:00:00.002446' 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", Tue, 02 Oct 2012 09:00:00 UTC +00:00], ["name", "raise_error"], ["position", 0], ["updated_at", Tue, 02 Oct 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Tue Oct 02 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-02 09:00:00.004141' OR end_time IS NULL) AND (start_time < '2012-10-02 10:00:00.004326' 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-02T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /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.2ms | 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 "/advert_selector/placements" for 127.0.0.1 at Tue Oct 02 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-09-30 09:00:00.020126') 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 14ms (Views: 13.1ms | 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 "updated_at" = '2012-10-02 09:00:00.000426', "fast_mode" = 't' 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-02 09:00:00.002496' 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-02 09:00:00.000304' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Tue Oct 02 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-02 09:00:00.003219' OR end_time IS NULL) AND (start_time < '2012-10-02 10:00:00.003389' 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.6ms | 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 Fri Oct 05 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-05 09:00:00.017086' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.017268' 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 7ms (Views: 5.9ms | 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 Fri Oct 05 12:00:00 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 2ms (Views: 1.5ms | 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 "updated_at" = '2012-10-05 09:00:00.000426', "fast_mode" = 't' 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-05 09:00:00.002500' 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 Fri Oct 05 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-05 09:00:00.002417' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.002613' 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 7ms (Views: 6.0ms | 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" = 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 Fri Oct 05 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-05 09:00:00.017763' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.017979' 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 10ms (Views: 8.7ms | ActiveRecord: 0.7ms) 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.2ms) 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 "updated_at" = '2012-10-05 09:00:00.000416', "fast_mode" = 't' 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-05 09:00:00.002453' 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-05 09:00:00.000439' 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 Started GET "/" for 127.0.0.1 at Fri Oct 05 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-05 09:00:00.004270' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.004463' 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] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.7ms | 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" = 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 Fri Oct 05 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.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.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-05 09:00:00.000417', "fast_mode" = 't' 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-05 09:00:00.002482' 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-05 09:00:00.000469' 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 "conflicting_placements_array" = '', "updated_at" = '2012-10-05 09:00:00.002812' 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 "conflicting_placements_array" = '', "updated_at" = '2012-10-05 09:00:00.004137' 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 "conflicting_placements_array" = '', "updated_at" = '2012-10-05 09:00:00.006027' 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 Fri Oct 05 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-05 09:00:00.009808' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.009980' 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 7ms (Views: 6.9ms | 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" = 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.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-05 09:00:00.000434', "fast_mode" = 't' 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-05 09:00:00.002671' 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 Fri Oct 05 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-05 09:00:00.000237' 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.8ms | 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 Fri Oct 05 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.6ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Fri Oct 05 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.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-05 09:00:00.000413', "fast_mode" = 't' 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-05 09:00:00.002410' 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 "only_once_per_session" = 't', "updated_at" = '2012-10-05 09:00:00.000928' WHERE "advert_selector_placements"."id" = 405688915  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Fri Oct 05 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-05 09:00:00.003923' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.004114' 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.3ms | 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 Fri Oct 05 12:00:00 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 2ms (Views: 1.5ms | 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]] 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-05 09:00:00.002466' OR end_time IS NULL) AND (start_time < '2012-10-05 10:00:00.002659' 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.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, '') 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, '') 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, '') 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"} # /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 Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-22 15:13:04', 100, '2012-10-27 00:00:00', 't', '2012-10-22 15:13:04', 50, 814558298, 1000, 'f', 0, '2012-10-17 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-22 15:13:04', '2012-11-01 00:00:00', 't', '2012-10-22 15:13:04', 100, 394627963, 1000, 't', 0, '2012-10-22 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-22 15:13:04', '2012-11-01 00:00:00', 'f', '2012-10-22 15:13:04', 1000, 207249520, 1000, 't', 1, '2012-10-22 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-22 15:13:04', '2012-10-22 15:13:04', 960656439, 't', 394627963, '') 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-22 15:13:04', '2012-10-22 15:13:04', 929640376, 't', 814558298, '') 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-22 15:13:04', '2012-10-22 15:13:04', 281932184, 't', 207249520, '') 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-22 15:13:04', '2012-10-22 15:13:04', 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-22 15:13:04', '2012-10-22 15:13:04', '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-22 15:13:04', '2012-10-22 15:13:04', '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-22 15:13:04', '2012-10-22 15:13:04', 'parade', 405688915)  (57.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", Mon, 22 Oct 2012 09:00:00 UTC +00:00], ["name", nil], ["position", 2], ["updated_at", Mon, 22 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", Mon, 22 Oct 2012 09:00:00 UTC +00:00], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Mon, 22 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", Mon, 22 Oct 2012 09:00:00 UTC +00:00], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Mon, 22 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-22 09:00:00.000064' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-10-22 09:00:00.000839' OR end_time IS NULL) AND (start_time < '2012-10-22 10:00:00.000951' 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-22 09:00:00.001828' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-10-22 09:00:00.002487' OR end_time IS NULL) AND (start_time < '2011-10-22 10:00:00.002599' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count)  (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) 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-22 09:00:00.000824' 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-22 09:00:00.006720' 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-22 09:00:00.000832' 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-22 09:00:00.004208' 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-22 09:00:00.000379' 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-22 09:00:00.002335' 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-22 10:00:00.000367', "updated_at" = '2012-10-22 09:00:00.000762' 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 "end_time" = '2012-10-22 08:00:00.002507', "start_time" = '2012-10-22 07:00:00.002441', "updated_at" = '2012-10-22 09:00:00.002833' 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 "end_time" = '2012-10-22 10:00:00.003834', "start_time" = NULL, "updated_at" = '2012-10-22 09:00:00.004129' 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.4ms) UPDATE "advert_selector_banners" SET "target_view_count" = 100, "end_time" = '2012-11-01 00:00:00.000000', "start_time" = '2012-10-21 21:00:00.000000', "updated_at" = '2012-10-22 09:00:00.000819' 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" = 0, "updated_at" = '2012-10-22 09:00:00.003007' 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-11-01 00:00:00 UTC", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-10-22 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", Mon, 22 Oct 2012 09:00:00 UTC +00:00], ["end_time", Thu, 01 Nov 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", Mon, 22 Oct 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Mon, 22 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.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]]  (0.1ms) 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.0ms) 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 (71.5ms) AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-10-20 09:00:00.084933') ORDER BY priority desc LIMIT 10 AdvertSelector::Placement Load (0.3ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = 718799085 LIMIT 1 AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = 405688915 LIMIT 1 AdvertSelector::Placement Load (0.2ms) 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 98ms (Views: 96.3ms | ActiveRecord: 1.3ms)  (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-20 09:00:00.007279') 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 11ms (Views: 9.5ms | 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.8ms) AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-10-20 09:00:00.023716') 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.9ms | 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-22 09:00:00.001172' 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 1114ms (ActiveRecord: 0.6ms) 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 1ms (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-20 09:00:00.004135') 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.0ms | 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.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.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-10-22 09:00:00.000753', "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-22 09:00:00.002271', "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.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.1ms) 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.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#create as HTML Parameters: {"placement"=>{"name"=>"new placement"}}  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "advert_selector_placements" ("conflicting_placements_array", "created_at", "name", "only_once_per_session", "updated_at") VALUES (?, ?, ?, ?, ?) [["conflicting_placements_array", nil], ["created_at", Mon, 22 Oct 2012 09:00:00 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Mon, 22 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.7ms) AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-10-20 09:00:00.011318') 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.3ms | 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-20 09:00:00.006463') 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: 8.7ms | 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.3ms) AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-10-20 09:00:00.008562') 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.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.1ms) 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", 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.1ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) 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.1ms) 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.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-22 09:00:00.000440' 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-22 09:00:00.002314' 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 Mon Oct 22 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-22 09:00:00.007645' OR end_time IS NULL) AND (start_time < '2012-10-22 10:00:00.007842' 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.3ms | 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", Mon, 22 Oct 2012 09:00:00 UTC +00:00], ["name", "always_false"], ["position", 0], ["updated_at", Mon, 22 Oct 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Mon Oct 22 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-22 09:00:00.021035' OR end_time IS NULL) AND (start_time < '2012-10-22 10:00:00.021200' 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 5ms (Views: 4.0ms | 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.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.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-22 09:00:00.000476' 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-22 09:00:00.002376' 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", Mon, 22 Oct 2012 09:00:00 UTC +00:00], ["name", "raise_error"], ["position", 0], ["updated_at", Mon, 22 Oct 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Mon Oct 22 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-22 09:00:00.004240' OR end_time IS NULL) AND (start_time < '2012-10-22 10:00:00.004433' 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-22T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /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.6ms | 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 Mon Oct 22 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-20 09:00:00.020995') 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 16ms (Views: 14.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-22 09:00:00.000396' 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-22 09:00:00.002319' 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-22 09:00:00.000272' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Mon Oct 22 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-22 09:00:00.003144' OR end_time IS NULL) AND (start_time < '2012-10-22 10:00:00.003333' 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.3ms | 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 Thu Oct 25 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-25 09:00:00.016652' OR end_time IS NULL) AND (start_time < '2012-10-25 10:00:00.016831' 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 Thu Oct 25 12:00:00 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 2ms (Views: 1.7ms | 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-25 09:00:00.000389' 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-25 09:00:00.002297' 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 Thu Oct 25 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-25 09:00:00.002221' OR end_time IS NULL) AND (start_time < '2012-10-25 10:00:00.002394' 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.1ms | 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" = 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 Thu Oct 25 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-25 09:00:00.016113' OR end_time IS NULL) AND (start_time < '2012-10-25 10:00:00.016297' 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 9ms (Views: 8.4ms | 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.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-25 09:00:00.000443' 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-25 09:00:00.002956' 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.1ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "confirmed" = 't', "updated_at" = '2012-10-25 09:00:00.000651' 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 Started GET "/" for 127.0.0.1 at Thu Oct 25 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-25 09:00:00.004927' OR end_time IS NULL) AND (start_time < '2012-10-25 10:00:00.005120' 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] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.9ms | 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" = 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 Thu Oct 25 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.6ms | 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" = 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.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-25 09:00:00.000427' 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-25 09:00:00.002820' 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-25 09:00:00.000447' 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.1ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-10-25 09:00:00.002586', "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-25 09:00:00.003778', "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-25 09:00:00.005318', "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 Thu Oct 25 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-25 09:00:00.008708' OR end_time IS NULL) AND (start_time < '2012-10-25 10:00:00.008882' 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 7ms (Views: 6.3ms | 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" = 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.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-25 09:00:00.000412' 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-25 09:00:00.002460' 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 Thu Oct 25 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-25 09:00:00.000226' 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 Thu Oct 25 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.6ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Thu Oct 25 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.4ms | 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.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-25 09:00:00.000378' 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-25 09:00:00.002287' 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 "only_once_per_session" = 't', "updated_at" = '2012-10-25 09:00:00.001148' WHERE "advert_selector_placements"."id" = 405688915  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Oct 25 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-25 09:00:00.004355' OR end_time IS NULL) AND (start_time < '2012-10-25 10:00:00.004561' 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.7ms | 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 Thu Oct 25 12:00:00 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 2ms (Views: 1.5ms | 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.1ms) 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-25 09:00:00.002334' OR end_time IS NULL) AND (start_time < '2012-10-25 10:00:00.002521' 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.7ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-22 15:16:00', 100, '2012-10-27 00:00:00', 't', '2012-10-22 15:16:00', 50, 814558298, 1000, 'f', 0, '2012-10-17 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-22 15:16:00', '2012-11-01 00:00:00', 't', '2012-10-22 15:16:00', 100, 394627963, 1000, 't', 0, '2012-10-22 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-22 15:16:00', '2012-11-01 00:00:00', 'f', '2012-10-22 15:16:00', 1000, 207249520, 1000, 't', 1, '2012-10-22 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-22 15:16:00', '2012-10-22 15:16:00', 960656439, 't', 394627963, '') 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-22 15:16:00', '2012-10-22 15:16:00', 929640376, 't', 814558298, '') 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-22 15:16:00', '2012-10-22 15:16:00', 281932184, 't', 207249520, '') 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-22 15:16:00', '2012-10-22 15:16:00', 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-22 15:16:00', '2012-10-22 15:16:00', '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-22 15:16:00', '2012-10-22 15:16:00', '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-22 15:16:00', '2012-10-22 15:16:00', 'parade', 405688915)  (41.0ms) 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", Mon, 22 Oct 2012 09:00:00 UTC +00:00], ["name", nil], ["position", 2], ["updated_at", Mon, 22 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", Mon, 22 Oct 2012 09:00:00 UTC +00:00], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Mon, 22 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", Mon, 22 Oct 2012 09:00:00 UTC +00:00], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Mon, 22 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-22 09:00:00.000094' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-10-22 09:00:00.000865' OR end_time IS NULL) AND (start_time < '2012-10-22 10:00:00.000976' 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-22 09:00:00.001814' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-10-22 09:00:00.002456' OR end_time IS NULL) AND (start_time < '2011-10-22 10:00:00.002564' 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.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 "running_view_count" = 0, "updated_at" = '2012-10-22 09:00:00.000789' 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-22 09:00:00.005922' 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, "updated_at" = '2012-10-22 09:00:00.000809', "target_view_count" = 10 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-22 09:00:00.004122' 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-22 09:00:00.000358' 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-22 09:00:00.002241' 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 "updated_at" = '2012-10-22 09:00:00.000724', "start_time" = '2012-10-22 10:00:00.000316' 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 "updated_at" = '2012-10-22 09:00:00.002878', "start_time" = '2012-10-22 07:00:00.002467', "end_time" = '2012-10-22 08:00:00.002542' 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 "updated_at" = '2012-10-22 09:00:00.004233', "start_time" = NULL, "end_time" = '2012-10-22 10:00:00.003937' 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 "updated_at" = '2012-10-22 09:00:00.000751', "start_time" = '2012-10-21 21:00:00.000000', "target_view_count" = 100, "end_time" = '2012-11-01 00:00:00.000000' 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" = 0, "updated_at" = '2012-10-22 09:00:00.002626' 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]] 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 "updated_at" = '2012-10-22 16:00:00.001589', "start_time" = '2012-10-22 15:00:00.000812' 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.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-22 15:16:09', 100, '2012-10-27 00:00:00', 't', '2012-10-22 15:16:09', 50, 814558298, 1000, 'f', 0, '2012-10-17 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-22 15:16:09', '2012-11-01 00:00:00', 't', '2012-10-22 15:16:09', 100, 394627963, 1000, 't', 0, '2012-10-22 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-22 15:16:09', '2012-11-01 00:00:00', 'f', '2012-10-22 15:16:09', 1000, 207249520, 1000, 't', 1, '2012-10-22 00:00:00') Fixture Delete (0.2ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "id", "content_for", "banner_id", "content") VALUES ('banner_leaderboard', 2, '2012-10-22 15:16:09', '2012-10-22 15:16:09', 960656439, 't', 394627963, '') 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-22 15:16:09', '2012-10-22 15:16:09', 929640376, 't', 814558298, '') 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-22 15:16:09', '2012-10-22 15:16:09', 281932184, 't', 207249520, '') 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-22 15:16:09', '2012-10-22 15:16:09', 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-22 15:16:09', '2012-10-22 15:16:09', '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-22 15:16:09', '2012-10-22 15:16:09', '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-22 15:16:09', '2012-10-22 15:16:09', 'parade', 405688915)  (55.3ms) 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", Mon, 22 Oct 2012 09:00:00 UTC +00:00], ["name", nil], ["position", 2], ["updated_at", Mon, 22 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", Mon, 22 Oct 2012 09:00:00 UTC +00:00], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Mon, 22 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", Mon, 22 Oct 2012 09:00:00 UTC +00:00], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Mon, 22 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-22 09:00:00.000081' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-10-22 09:00:00.000831' OR end_time IS NULL) AND (start_time < '2012-10-22 10:00:00.000942' 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-22 09:00:00.001780' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-10-22 09:00:00.002421' OR end_time IS NULL) AND (start_time < '2011-10-22 10:00:00.002528' 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.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 "updated_at" = '2012-10-22 09:00:00.000859', "running_view_count" = 0 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.1ms) 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 "updated_at" = '2012-10-22 09:00:00.006277', "running_view_count" = 551 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 "updated_at" = '2012-10-22 09:00:00.000786', "running_view_count" = 0, "target_view_count" = 10 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 "updated_at" = '2012-10-22 09:00:00.004201', "running_view_count" = 10 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.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-22 09:00:00.000396', "confirmed" = 'f' 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 "updated_at" = '2012-10-22 09:00:00.002371', "confirmed" = 't' 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 "updated_at" = '2012-10-22 09:00:00.000731', "start_time" = '2012-10-22 10:00:00.000336' 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 "updated_at" = '2012-10-22 09:00:00.002782', "end_time" = '2012-10-22 08:00:00.002458', "start_time" = '2012-10-22 07:00:00.002387' 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 "updated_at" = '2012-10-22 09:00:00.004102', "end_time" = '2012-10-22 10:00:00.003795', "start_time" = NULL 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.4ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-22 09:00:00.000860', "end_time" = '2012-11-01 00:00:00.000000', "target_view_count" = 100, "start_time" = '2012-10-21 21:00:00.000000' 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 "updated_at" = '2012-10-22 09:00:00.002868', "running_view_count" = 0 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.1ms) 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", 814558298]] 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]]  (0.1ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-22 16:00:00.002524', "start_time" = '2012-10-22 15:00:00.001311' 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.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-22 15:16:30', 100, '2012-10-27 00:00:00', 't', '2012-10-22 15:16:30', 50, 814558298, 1000, 'f', 0, '2012-10-17 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-22 15:16:30', '2012-11-01 00:00:00', 't', '2012-10-22 15:16:30', 100, 394627963, 1000, 't', 0, '2012-10-22 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-22 15:16:30', '2012-11-01 00:00:00', 'f', '2012-10-22 15:16:30', 1000, 207249520, 1000, 't', 1, '2012-10-22 00:00:00') Fixture Delete (0.2ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "id", "content_for", "banner_id", "content") VALUES ('banner_leaderboard', 2, '2012-10-22 15:16:30', '2012-10-22 15:16:30', 960656439, 't', 394627963, '') 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-22 15:16:30', '2012-10-22 15:16:30', 929640376, 't', 814558298, '') 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-22 15:16:30', '2012-10-22 15:16:30', 281932184, 't', 207249520, '') 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-22 15:16:30', '2012-10-22 15:16: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-22 15:16:30', '2012-10-22 15:16: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-22 15:16:30', '2012-10-22 15:16: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-22 15:16:30', '2012-10-22 15:16:30', 'parade', 405688915)  (44.4ms) 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", Mon, 22 Oct 2012 09:00:00 UTC +00:00], ["name", nil], ["position", 2], ["updated_at", Mon, 22 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", Mon, 22 Oct 2012 09:00:00 UTC +00:00], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Mon, 22 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", Mon, 22 Oct 2012 09:00:00 UTC +00:00], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Mon, 22 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-22 09:00:00.000070' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-10-22 09:00:00.000884' OR end_time IS NULL) AND (start_time < '2012-10-22 10:00:00.000998' 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-22 09:00:00.001857' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-10-22 09:00:00.002541' OR end_time IS NULL) AND (start_time < '2011-10-22 10:00:00.002660' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count)  (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) 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, "updated_at" = '2012-10-22 09:00:00.000850' 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-22 09:00:00.006428' 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 "target_view_count" = 10, "running_view_count" = 0, "updated_at" = '2012-10-22 09:00:00.000898' 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-22 09:00:00.004420' 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-22 09:00:00.000397' 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-22 09:00:00.002438' 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-22 10:00:00.000375', "updated_at" = '2012-10-22 09:00:00.000789' 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-22 07:00:00.002446', "updated_at" = '2012-10-22 09:00:00.002851', "end_time" = '2012-10-22 08:00:00.002524' 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, "updated_at" = '2012-10-22 09:00:00.004231', "end_time" = '2012-10-22 10:00:00.003917' 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 "target_view_count" = 100, "start_time" = '2012-10-21 21:00:00.000000', "updated_at" = '2012-10-22 09:00:00.000807', "end_time" = '2012-11-01 00:00:00.000000' 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" = 0, "updated_at" = '2012-10-22 09:00:00.002804' 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.1ms) 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", 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.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "start_time" = '2012-10-22 15:00:00.000781', "updated_at" = '2012-10-22 16:00:00.001538' 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.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-11-01 00:00:00 UTC", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-10-22 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", Mon, 22 Oct 2012 09:00:00 UTC +00:00], ["end_time", Thu, 01 Nov 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", Mon, 22 Oct 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Mon, 22 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 6ms (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]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" Processing by AdvertSelector::BannersController#destroy 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"]]  (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" = 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.0ms) 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.9ms)  (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 (44.2ms) AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-10-20 09:00:00.056488') 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 61ms (Views: 59.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.2ms) 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-20 09:00:00.007765') 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 11ms (Views: 10.0ms | 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]] 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.8ms) AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-10-20 09:00:00.023467') 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.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]] 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-22 09:00:00.001212' 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.1ms) 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.1ms) 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 1ms (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-20 09:00:00.004074') 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.0ms | 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-22 09:00:00.000838', "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-22 09:00:00.002273', "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.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.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.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#create as HTML Parameters: {"placement"=>{"name"=>"new placement"}}  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "advert_selector_placements" ("conflicting_placements_array", "created_at", "name", "only_once_per_session", "updated_at") VALUES (?, ?, ?, ?, ?) [["conflicting_placements_array", nil], ["created_at", Mon, 22 Oct 2012 09:00:00 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Mon, 22 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 (6.2ms) AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-10-20 09:00:00.011818') 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.8ms | 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-20 09:00:00.006164') 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: 8.5ms | 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.1ms) AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-10-20 09:00:00.008171') 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 11ms (Views: 10.6ms | 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.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-22 09:00:00.000373' 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-22 09:00:00.002287' 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 Mon Oct 22 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-22 09:00:00.006292' OR end_time IS NULL) AND (start_time < '2012-10-22 10:00:00.006477' 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 9ms (Views: 8.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  (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", Mon, 22 Oct 2012 09:00:00 UTC +00:00], ["name", "always_false"], ["position", 0], ["updated_at", Mon, 22 Oct 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Mon Oct 22 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-22 09:00:00.019141' OR end_time IS NULL) AND (start_time < '2012-10-22 10:00:00.019378' 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 5ms (Views: 4.0ms | 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.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-22 09:00:00.000406' 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-22 09:00:00.002286' 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", Mon, 22 Oct 2012 09:00:00 UTC +00:00], ["name", "raise_error"], ["position", 0], ["updated_at", Mon, 22 Oct 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Mon Oct 22 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-22 09:00:00.004110' OR end_time IS NULL) AND (start_time < '2012-10-22 10:00:00.004283' 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-22T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /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.6ms | 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 Mon Oct 22 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-20 09:00:00.021326') 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.4ms | 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.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-22 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.2ms) UPDATE "advert_selector_banners" SET "confirmed" = 'f', "updated_at" = '2012-10-22 09:00:00.003760' 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-22 09:00:00.000466' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Mon Oct 22 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-22 09:00:00.004970' OR end_time IS NULL) AND (start_time < '2012-10-22 10:00:00.005338' 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 9ms (Views: 8.6ms | ActiveRecord: 0.6ms) 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 Started GET "/" for 127.0.0.1 at Thu Oct 25 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-25 09:00:00.024446' OR end_time IS NULL) AND (start_time < '2012-10-25 10:00:00.024625' 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.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 Thu Oct 25 12:00:00 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 2ms (Views: 1.5ms | 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-25 09:00:00.000421' 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-25 09:00:00.002286' 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 Thu Oct 25 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-25 09:00:00.002363' OR end_time IS NULL) AND (start_time < '2012-10-25 10:00:00.002549' 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.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 Started GET "/?advert_selector_force=207249520" for 127.0.0.1 at Thu Oct 25 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-25 09:00:00.015938' OR end_time IS NULL) AND (start_time < '2012-10-25 10:00:00.016122' 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.7ms | 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-25 09:00:00.000399' 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-25 09:00:00.002256' 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-25 09:00:00.000438' 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 Started GET "/" for 127.0.0.1 at Thu Oct 25 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-25 09:00:00.003867' OR end_time IS NULL) AND (start_time < '2012-10-25 10:00:00.004043' 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] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.4ms | 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" = 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 Thu Oct 25 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.9ms | 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" = 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]]  (0.0ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-25 09:00:00.000645' WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.4ms) 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-25 09:00:00.003669' 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-25 09:00:00.000415' 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.1ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-10-25 09:00:00.002449', "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-25 09:00:00.003807', "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-25 09:00:00.005675', "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 Thu Oct 25 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-25 09:00:00.009192' OR end_time IS NULL) AND (start_time < '2012-10-25 10:00:00.009391' 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 7ms (Views: 6.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" = 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.1ms) 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-25 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" = 'f', "updated_at" = '2012-10-25 09:00:00.002311' 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 Thu Oct 25 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-25 09:00:00.000226' 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.8ms | 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 Thu Oct 25 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.6ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Thu Oct 25 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.5ms | 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.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-25 09:00:00.000413' 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-25 09:00:00.002317' 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-25 09:00:00.000869', "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 Thu Oct 25 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-25 09:00:00.003759' OR end_time IS NULL) AND (start_time < '2012-10-25 10:00:00.003929' 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 Thu Oct 25 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]] 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-25 09:00:00.002359' OR end_time IS NULL) AND (start_time < '2012-10-25 10:00:00.002536' 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.3ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-22 15:17:50', 100, '2012-10-27 00:00:00', 't', '2012-10-22 15:17:50', 50, 814558298, 1000, 'f', 0, '2012-10-17 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-22 15:17:50', '2012-11-01 00:00:00', 't', '2012-10-22 15:17:50', 100, 394627963, 1000, 't', 0, '2012-10-22 00:00:00') Fixture Insert (0.1ms) 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-22 15:17:50', '2012-11-01 00:00:00', 'f', '2012-10-22 15:17:50', 1000, 207249520, 1000, 't', 1, '2012-10-22 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-22 15:17:50', '2012-10-22 15:17:50', 960656439, 't', 394627963, '') 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-22 15:17:50', '2012-10-22 15:17:50', 929640376, 't', 814558298, '') 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-22 15:17:50', '2012-10-22 15:17:50', 281932184, 't', 207249520, '') 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-22 15:17:50', '2012-10-22 15:17:50', 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-22 15:17:50', '2012-10-22 15:17:50', '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-22 15:17:50', '2012-10-22 15:17:50', '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-22 15:17:50', '2012-10-22 15:17:50', 'parade', 405688915)  (48.7ms) commit 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.1ms) 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", Mon, 22 Oct 2012 09:00:00 UTC +00:00], ["name", nil], ["position", 2], ["updated_at", Mon, 22 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", Mon, 22 Oct 2012 09:00:00 UTC +00:00], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Mon, 22 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", Mon, 22 Oct 2012 09:00:00 UTC +00:00], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Mon, 22 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-22 09:00:00.000064' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-10-22 09:00:00.000853' OR end_time IS NULL) AND (start_time < '2012-10-22 10:00:00.000969' 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-22 09:00:00.001803' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-10-22 09:00:00.002530' OR end_time IS NULL) AND (start_time < '2011-10-22 10:00:00.002651' 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.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.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-22 09:00:00.000879', "running_view_count" = 0 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.1ms) 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 "updated_at" = '2012-10-22 09:00:00.007089', "running_view_count" = 551 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 "updated_at" = '2012-10-22 09:00:00.000862', "target_view_count" = 10, "running_view_count" = 0 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 "updated_at" = '2012-10-22 09:00:00.004099', "running_view_count" = 10 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 "updated_at" = '2012-10-22 09:00:00.000372', "confirmed" = 'f' 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 "updated_at" = '2012-10-22 09:00:00.002416', "confirmed" = 't' 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.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-22 09:00:00.000738', "start_time" = '2012-10-22 10:00:00.000342' 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 "updated_at" = '2012-10-22 09:00:00.002875', "start_time" = '2012-10-22 07:00:00.002472', "end_time" = '2012-10-22 08:00:00.002547' 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 "updated_at" = '2012-10-22 09:00:00.004478', "start_time" = NULL, "end_time" = '2012-10-22 10:00:00.004137' 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.4ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-22 09:00:00.000868', "start_time" = '2012-10-21 21:00:00.000000', "target_view_count" = 100, "end_time" = '2012-11-01 00:00:00.000000' 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 "updated_at" = '2012-10-22 09:00:00.003239', "running_view_count" = 0 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]] 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 "updated_at" = '2012-10-22 16:00:00.001481', "start_time" = '2012-10-22 15:00:00.000763' 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.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-11-01 00:00:00 UTC", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-10-22 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", Mon, 22 Oct 2012 09:00:00 UTC +00:00], ["end_time", Thu, 01 Nov 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", Mon, 22 Oct 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Mon, 22 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.8ms)  (0.1ms) 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.1ms) 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.3ms) 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 5ms (ActiveRecord: 0.9ms)  (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 (50.0ms) AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-10-20 09:00:00.062558') 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 67ms (Views: 65.8ms | 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-20 09:00:00.007016') 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 11ms (Views: 9.3ms | 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.5ms) AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-10-20 09:00:00.023227') 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.5ms | 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.1ms) 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 "updated_at" = '2012-10-22 09:00:00.001172', "running_view_count" = 1 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", "394627963"]] SQL (0.2ms) UPDATE "advert_selector_banners" SET "running_view_count" = 99 WHERE "advert_selector_banners"."id" = 394627963 SQL (0.3ms) 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 1057ms (ActiveRecord: 0.6ms) 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 1ms (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.3ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-10-20 09:00:00.005957') 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: 10.5ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction  (0.1ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]] AdvertSelector::Placement Load (0.2ms) 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 "conflicting_placements_array" = 'not_found,video', "updated_at" = '2012-10-22 09:00:00.000774' 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 "conflicting_placements_array" = '', "updated_at" = '2012-10-22 09:00:00.002278' 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.1ms) 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.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.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.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "advert_selector_placements" ("conflicting_placements_array", "created_at", "name", "only_once_per_session", "updated_at") VALUES (?, ?, ?, ?, ?) [["conflicting_placements_array", nil], ["created_at", Mon, 22 Oct 2012 09:00:00 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Mon, 22 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.6ms) AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-10-20 09:00:00.011102') 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 14ms (Views: 12.9ms | 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-20 09:00:00.006383') 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: 8.7ms | 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.1ms) AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-10-20 09:00:00.008278') 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: 10.8ms | 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 "updated_at" = '2012-10-22 09:00:00.000371', "fast_mode" = 't' 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 "updated_at" = '2012-10-22 09:00:00.002222', "confirmed" = 'f' 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 Mon Oct 22 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-22 09:00:00.006269' OR end_time IS NULL) AND (start_time < '2012-10-22 10:00:00.006451' 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 9ms (Views: 8.8ms | 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", Mon, 22 Oct 2012 09:00:00 UTC +00:00], ["name", "always_false"], ["position", 0], ["updated_at", Mon, 22 Oct 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Mon Oct 22 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-22 09:00:00.019408' OR end_time IS NULL) AND (start_time < '2012-10-22 10:00:00.019585' 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.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.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 "updated_at" = '2012-10-22 09:00:00.000439', "fast_mode" = 't' 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 "updated_at" = '2012-10-22 09:00:00.002523', "confirmed" = 'f' 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", Mon, 22 Oct 2012 09:00:00 UTC +00:00], ["name", "raise_error"], ["position", 0], ["updated_at", Mon, 22 Oct 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Mon Oct 22 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-22 09:00:00.004324' OR end_time IS NULL) AND (start_time < '2012-10-22 10:00:00.004496' 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-22T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /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.1ms | 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 "/advert_selector/placements" for 127.0.0.1 at Mon Oct 22 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-20 09:00:00.020387') 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.4ms | 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 "updated_at" = '2012-10-22 09:00:00.000398', "fast_mode" = 't' 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 "updated_at" = '2012-10-22 09:00:00.002358', "confirmed" = 'f' 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 "updated_at" = '2012-10-22 09:00:00.000267', "frequency" = 2 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Mon Oct 22 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-22 09:00:00.003111' OR end_time IS NULL) AND (start_time < '2012-10-22 10:00:00.003281' 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.3ms | 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 Thu Oct 25 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-25 09:00:00.016358' OR end_time IS NULL) AND (start_time < '2012-10-25 10:00:00.016524' 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.3ms | 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 Thu Oct 25 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 "updated_at" = '2012-10-25 09:00:00.000399', "fast_mode" = 't' 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 "updated_at" = '2012-10-25 09:00:00.002262', "confirmed" = 'f' 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 Thu Oct 25 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-25 09:00:00.002335' OR end_time IS NULL) AND (start_time < '2012-10-25 10:00:00.002527' 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.3ms | 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" = 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 Thu Oct 25 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-25 09:00:00.015686' OR end_time IS NULL) AND (start_time < '2012-10-25 10:00:00.015863' 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 "updated_at" = '2012-10-25 09:00:00.000398', "fast_mode" = 't' 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 "updated_at" = '2012-10-25 09:00:00.002296', "confirmed" = 'f' 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 "updated_at" = '2012-10-25 09:00:00.000419', "confirmed" = 't' 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 Started GET "/" for 127.0.0.1 at Thu Oct 25 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-25 09:00:00.003950' OR end_time IS NULL) AND (start_time < '2012-10-25 10:00:00.004140' 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] 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" = 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 Thu Oct 25 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.6ms | 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" = 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.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-25 09:00:00.000421', "fast_mode" = 't' WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.4ms) 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 "updated_at" = '2012-10-25 09:00:00.002589', "confirmed" = 'f' 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 "updated_at" = '2012-10-25 09:00:00.000426', "confirmed" = 't' 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.1ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = '', "updated_at" = '2012-10-25 09:00:00.002717' 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 "conflicting_placements_array" = '', "updated_at" = '2012-10-25 09:00:00.003988' 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 "conflicting_placements_array" = '', "updated_at" = '2012-10-25 09:00:00.005645' 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 Thu Oct 25 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-25 09:00:00.009033' OR end_time IS NULL) AND (start_time < '2012-10-25 10:00:00.009233' 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 7ms (Views: 6.3ms | 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" = 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.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-25 09:00:00.000417', "fast_mode" = 't' 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 "updated_at" = '2012-10-25 09:00:00.002290', "confirmed" = 'f' 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 Thu Oct 25 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-25 09:00:00.000281' 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.8ms | 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 Thu Oct 25 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.6ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Thu Oct 25 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.4ms | 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.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-25 09:00:00.000388', "fast_mode" = 't' 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 "updated_at" = '2012-10-25 09:00:00.002367', "confirmed" = 'f' 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 "only_once_per_session" = 't', "updated_at" = '2012-10-25 09:00:00.001013' WHERE "advert_selector_placements"."id" = 405688915  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Oct 25 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-25 09:00:00.003860' OR end_time IS NULL) AND (start_time < '2012-10-25 10:00:00.004022' 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.1ms | 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 Thu Oct 25 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]] 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-25 09:00:00.002177' OR end_time IS NULL) AND (start_time < '2012-10-25 10:00:00.002353' 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)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.5ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-22 15:19:55', 100, '2012-10-27 00:00:00', 't', '2012-10-22 15:19:55', 50, 814558298, 1000, 'f', 0, '2012-10-17 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-22 15:19:55', '2012-11-01 00:00:00', 't', '2012-10-22 15:19:55', 100, 394627963, 1000, 't', 0, '2012-10-22 00:00:00') Fixture Insert (0.1ms) 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-22 15:19:55', '2012-11-01 00:00:00', 'f', '2012-10-22 15:19:55', 1000, 207249520, 1000, 't', 1, '2012-10-22 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-22 15:19:55', '2012-10-22 15:19:55', 960656439, 't', 394627963, '') 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-22 15:19:55', '2012-10-22 15:19:55', 929640376, 't', 814558298, '') 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-22 15:19:55', '2012-10-22 15:19:55', 281932184, 't', 207249520, '') 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-22 15:19:55', '2012-10-22 15:19:55', 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-22 15:19:55', '2012-10-22 15:19:55', '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-22 15:19:55', '2012-10-22 15:19:55', '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-22 15:19:55', '2012-10-22 15:19:55', 'parade', 405688915)  (49.3ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.3ms) 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.6ms) 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", Mon, 22 Oct 2012 09:00:00 UTC +00:00], ["name", nil], ["position", 2], ["updated_at", Mon, 22 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", Mon, 22 Oct 2012 09:00:00 UTC +00:00], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Mon, 22 Oct 2012 09:00:00 UTC +00:00]] 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.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", Mon, 22 Oct 2012 09:00:00 UTC +00:00], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Mon, 22 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.1ms) 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-22 09:00:00.000079' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-10-22 09:00:00.001074' OR end_time IS NULL) AND (start_time < '2012-10-22 10:00:00.001219' 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-22 09:00:00.002271' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-10-22 09:00:00.003128' OR end_time IS NULL) AND (start_time < '2011-10-22 10:00:00.003290' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count)  (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) 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 "updated_at" = '2012-10-22 09:00:00.001101', "running_view_count" = 0 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]]  (0.1ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-22 09:00:00.008304', "running_view_count" = 551 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]]  (0.1ms) rollback transaction  (0.1ms) 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 "target_view_count" = 10, "updated_at" = '2012-10-22 09:00:00.001151', "running_view_count" = 0 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.1ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-22 09:00:00.005451', "running_view_count" = 10 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]]  (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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]]  (0.1ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-22 09:00:00.000693', "confirmed" = 'f' 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.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-22 09:00:00.003698', "confirmed" = 't' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 AdvertSelector::Banner Load (0.1ms) 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) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "start_time" = '2012-10-22 10:00:00.000442', "updated_at" = '2012-10-22 09:00:00.000928' 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 "end_time" = '2012-10-22 08:00:00.003079', "start_time" = '2012-10-22 07:00:00.002979', "updated_at" = '2012-10-22 09:00:00.003466' 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 "end_time" = '2012-10-22 10:00:00.004858', "start_time" = NULL, "updated_at" = '2012-10-22 09:00:00.005247' 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.1ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_banners" SET "end_time" = '2012-11-01 00:00:00.000000', "target_view_count" = 100, "start_time" = '2012-10-21 21:00:00.000000', "updated_at" = '2012-10-22 09:00:00.000944' 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 "updated_at" = '2012-10-22 09:00:00.003510', "running_view_count" = 0 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 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.1ms) 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", 814558298]] 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.1ms) 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", 814558298]] AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]]  (0.1ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "start_time" = '2012-10-22 15:00:00.001220', "updated_at" = '2012-10-22 16:00:00.002148' 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.1ms) rollback transaction  (0.1ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) 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-11-01 00:00:00 UTC", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-10-22 00:00:00 UTC"}}  (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) 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", Mon, 22 Oct 2012 09:00:00 UTC +00:00], ["end_time", Thu, 01 Nov 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", Mon, 22 Oct 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Mon, 22 Oct 2012 09:00:00 UTC +00:00]] AdvertSelector::HelperItem Load (0.2ms) 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 9ms (ActiveRecord: 1.1ms)  (0.1ms) 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.1ms) 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.4ms) DELETE FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."id" = ? [["id", 435138789]] SQL (0.1ms) 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 6ms (ActiveRecord: 1.1ms)  (0.1ms) 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.1ms) 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 (56.7ms) AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-10-20 09:00:00.071552') 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 77ms (Views: 75.2ms | ActiveRecord: 1.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#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-20 09:00:00.008044') 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 13ms (Views: 11.4ms | ActiveRecord: 0.7ms)  (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.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/banners/_form.html.erb (21.3ms) AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-10-20 09:00:00.026467') 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 31ms (Views: 29.6ms | ActiveRecord: 0.7ms)  (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.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  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/banners/394627963 Completed 302 Found in 3ms (ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) 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 "updated_at" = '2012-10-22 09:00:00.001770', "running_view_count" = 1 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", "394627963"]] SQL (0.2ms) UPDATE "advert_selector_banners" SET "running_view_count" = 99 WHERE "advert_selector_banners"."id" = 394627963 SQL (0.2ms) 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 1050ms (ActiveRecord: 0.4ms) AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]]  (0.1ms) rollback transaction  (0.1ms) 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.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]] Processing by AdvertSelector::MainController#index as HTML Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 2ms (Views: 1.3ms | 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.1ms) 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-20 09:00:00.004464') 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 9ms (Views: 8.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.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.3ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = 'not_found,video', "updated_at" = '2012-10-22 09:00:00.000886' 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 "conflicting_placements_array" = '', "updated_at" = '2012-10-22 09:00:00.002749' 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.1ms) 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.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.1ms) rollback transaction  (0.1ms) 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.1ms) 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.1ms) rollback transaction  (0.1ms) 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.1ms) 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", 405688915]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_placements" Processing by AdvertSelector::PlacementsController#create as HTML Parameters: {"placement"=>{"name"=>"new placement"}}  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "advert_selector_placements" ("conflicting_placements_array", "created_at", "name", "only_once_per_session", "updated_at") VALUES (?, ?, ?, ?, ?) [["conflicting_placements_array", nil], ["created_at", Mon, 22 Oct 2012 09:00:00 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Mon, 22 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 4ms (ActiveRecord: 0.6ms)  (0.1ms) 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.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_placements"  Processing by AdvertSelector::PlacementsController#destroy as HTML Parameters: {"id"=>"405688915"} AdvertSelector::Placement Load (0.1ms) 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.3ms) DELETE FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? [["id", 405688915]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements Completed 302 Found in 3ms (ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_placements"  (0.2ms) rollback transaction  (0.2ms) begin transaction AdvertSelector::Banner Load (0.4ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]] AdvertSelector::Placement Load (0.2ms) 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.1ms) 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 (10.5ms) AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-10-20 09:00:00.019559') 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 23ms (Views: 20.6ms | ActiveRecord: 0.9ms)  (0.1ms) rollback transaction  (0.1ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) 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", 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.3ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-10-20 09:00:00.009594') 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.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = 405688915 LIMIT 1 AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = 405688915 LIMIT 1 AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" Completed 200 OK in 16ms (Views: 13.8ms | ActiveRecord: 1.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.1ms) 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 (5.0ms) AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-10-20 09:00:00.009732') 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 14ms (Views: 13.3ms | ActiveRecord: 0.7ms)  (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.1ms) 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.1ms) 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.1ms) rollback transaction  (0.1ms) 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-22 09:00:00.000451' 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 "updated_at" = '2012-10-22 09:00:00.002800', "confirmed" = 'f' 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 Mon Oct 22 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-22 09:00:00.007522' OR end_time IS NULL) AND (start_time < '2012-10-22 10:00:00.007736' 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 11ms (Views: 10.5ms | 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" = 814558298 AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."banner_id" = 814558298 AND position >= 0) SQL (0.3ms) 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", Mon, 22 Oct 2012 09:00:00 UTC +00:00], ["name", "always_false"], ["position", 0], ["updated_at", Mon, 22 Oct 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Mon Oct 22 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-22 09:00:00.022994' OR end_time IS NULL) AND (start_time < '2012-10-22 10:00:00.023213' 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 5ms (Views: 4.8ms | 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" = 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-22 09:00:00.000516' 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.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-10-22 09:00:00.002942', "confirmed" = 'f' 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.3ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."banner_id" = 814558298 AND position >= 0) SQL (0.3ms) 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", Mon, 22 Oct 2012 09:00:00 UTC +00:00], ["name", "raise_error"], ["position", 0], ["updated_at", Mon, 22 Oct 2012 09:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Mon Oct 22 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-22 09:00:00.004999' OR end_time IS NULL) AND (start_time < '2012-10-22 10:00:00.005207' 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] Error with banner Coke in placement Leaderboard. 2012-10-22T12:00:00+03:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /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 7ms (Views: 6.2ms | 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" = 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 Mon Oct 22 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-20 09:00:00.023965') 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 17ms (Views: 15.8ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) 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-22 09:00:00.000469' 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 "updated_at" = '2012-10-22 09:00:00.002965', "confirmed" = 'f' 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 "updated_at" = '2012-10-22 09:00:00.000445', "frequency" = 2 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Mon Oct 22 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-22 09:00:00.004006' OR end_time IS NULL) AND (start_time < '2012-10-22 10:00:00.004228' 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 8ms (Views: 7.4ms | ActiveRecord: 0.5ms) 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 Started GET "/" for 127.0.0.1 at Thu Oct 25 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-25 09:00:00.024130' OR end_time IS NULL) AND (start_time < '2012-10-25 10:00:00.024478' 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 7ms (Views: 6.6ms | 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 Thu Oct 25 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.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-25 09:00:00.000453' 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 "updated_at" = '2012-10-25 09:00:00.002566', "confirmed" = 'f' 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 Thu Oct 25 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-25 09:00:00.002404' OR end_time IS NULL) AND (start_time < '2012-10-25 10:00:00.002609' 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 7ms (Views: 6.1ms | 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 Started GET "/?advert_selector_force=207249520" for 127.0.0.1 at Thu Oct 25 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-25 09:00:00.018278' OR end_time IS NULL) AND (start_time < '2012-10-25 10:00:00.018508' 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 10ms (Views: 9.3ms | ActiveRecord: 0.8ms) 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  (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-25 09:00:00.000454' 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 "updated_at" = '2012-10-25 09:00:00.002935', "confirmed" = 'f' 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 "updated_at" = '2012-10-25 09:00:00.000556', "confirmed" = 't' 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 Started GET "/" for 127.0.0.1 at Thu Oct 25 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-25 09:00:00.004939' OR end_time IS NULL) AND (start_time < '2012-10-25 10:00:00.005151' 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] AdvertSelection finished Completed 200 OK in 7ms (Views: 6.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" = 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 Thu Oct 25 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.9ms | 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" = 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.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-25 09:00:00.000461' WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.4ms) 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 "updated_at" = '2012-10-25 09:00:00.003249', "confirmed" = 'f' 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 "updated_at" = '2012-10-25 09:00:00.000516', "confirmed" = 't' 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 "conflicting_placements_array" = '', "updated_at" = '2012-10-25 09:00:00.003502' 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 "conflicting_placements_array" = '', "updated_at" = '2012-10-25 09:00:00.005133' 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 "conflicting_placements_array" = '', "updated_at" = '2012-10-25 09:00:00.007283' 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 Thu Oct 25 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-25 09:00:00.011375' OR end_time IS NULL) AND (start_time < '2012-10-25 10:00:00.011592' 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.5ms | 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.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-25 09:00:00.000491' 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 "updated_at" = '2012-10-25 09:00:00.002889', "confirmed" = 'f' 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 Thu Oct 25 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-25 09:00:00.000285' 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.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.7ms | 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" = 814558298 AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Thu Oct 25 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: 3.0ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Thu Oct 25 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.8ms | 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.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-10-25 09:00:00.000442' 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 "updated_at" = '2012-10-25 09:00:00.002838', "confirmed" = 'f' 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.2ms) UPDATE "advert_selector_placements" SET "only_once_per_session" = 't', "updated_at" = '2012-10-25 09:00:00.001242' WHERE "advert_selector_placements"."id" = 405688915  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Thu Oct 25 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-25 09:00:00.004652' OR end_time IS NULL) AND (start_time < '2012-10-25 10:00:00.004866' 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 7ms (Views: 6.1ms | 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" = 814558298 AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Thu Oct 25 12:00:00 +0300 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 2ms (Views: 1.7ms | 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.1ms) 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-25 09:00:00.002602' OR end_time IS NULL) AND (start_time < '2012-10-25 10:00:00.002815' 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 7ms (Views: 6.6ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.5ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.3ms) 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-11-04 13:52:21', 100, '2012-11-09 00:00:00', 't', '2012-11-04 13:52:21', 50, 814558298, 1000, 'f', 0, '2012-10-30 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-11-04 13:52:21', '2012-11-14 00:00:00', 't', '2012-11-04 13:52:21', 100, 394627963, 1000, 't', 0, '2012-11-04 00:00:00') Fixture Insert (0.1ms) 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-11-04 13:52:21', '2012-11-14 00:00:00', 'f', '2012-11-04 13:52:21', 1000, 207249520, 1000, 't', 1, '2012-11-04 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-11-04 13:52:21', '2012-11-04 13:52:21', 960656439, 't', 394627963, '') 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-11-04 13:52:21', '2012-11-04 13:52:21', 929640376, 't', 814558298, '') 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-11-04 13:52:21', '2012-11-04 13:52:21', 281932184, 't', 207249520, '') 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-11-04 13:52:21', '2012-11-04 13:52:21', 435138789, 'f', 394627963, 'pepsi=true') Fixture Delete (0.2ms) DELETE FROM "advert_selector_placements" Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Parade', '2012-11-04 13:52:21', '2012-11-04 13:52:21', 'leaderboard,video', 718799085) Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "only_once_per_session", "id") VALUES ('Video', '2012-11-04 13:52:21', '2012-11-04 13:52:21', 'parade', 't', 1019730477) Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-11-04 13:52:21', '2012-11-04 13:52:21', 'parade', 405688915)  (46.2ms) commit 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) SELECT COUNT(*) FROM "advert_selector_helper_items"  (0.1ms) SAVEPOINT active_record_1 AdvertSelector::HelperItem Load (0.2ms) 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 (1.0ms) 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, 04 Nov 2012 10:00:00 UTC +00:00], ["name", nil], ["position", 2], ["updated_at", Sun, 04 Nov 2012 10: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.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", true], ["created_at", Sun, 04 Nov 2012 10:00:00 UTC +00:00], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Sun, 04 Nov 2012 10: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, 04 Nov 2012 10:00:00 UTC +00:00], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Sun, 04 Nov 2012 10: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.1ms) 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.1ms) 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-11-04 10:00:00.000071' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-11-04 10:00:00.001029' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.001160' 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-11-04 10:00:00.002472' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-11-04 10:00:00.003332' OR end_time IS NULL) AND (start_time < '2011-11-04 11:00:00.003461' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count)  (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) rollback transaction  (0.1ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]]  (0.1ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_banners" SET "running_view_count" = 0, "updated_at" = '2012-11-04 10:00:00.001073' 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]]  (0.1ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "running_view_count" = 551, "updated_at" = '2012-11-04 10:00:00.009149' WHERE "advert_selector_banners"."id" = 814558298  (0.1ms) RELEASE SAVEPOINT active_record_1 AdvertSelector::Banner Load (0.1ms) 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) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "running_view_count" = 0, "updated_at" = '2012-11-04 10:00:00.001857', "target_view_count" = 10 WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.2ms) 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.1ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "running_view_count" = 10, "updated_at" = '2012-11-04 10:00:00.007912' 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.3ms) UPDATE "advert_selector_banners" SET "confirmed" = 'f', "updated_at" = '2012-11-04 10:00:00.000545' 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-11-04 10:00:00.003183' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]]  (0.1ms) rollback transaction  (0.1ms) 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-11-04 11:00:00.000532', "updated_at" = '2012-11-04 10:00:00.001128' 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 "end_time" = '2012-11-04 09:00:00.003545', "start_time" = '2012-11-04 08:00:00.003418', "updated_at" = '2012-11-04 10:00:00.004076' 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 "end_time" = '2012-11-04 11:00:00.005529', "start_time" = NULL, "updated_at" = '2012-11-04 10:00:00.005887' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.2ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]]  (0.0ms) SAVEPOINT active_record_1  (0.5ms) UPDATE "advert_selector_banners" SET "end_time" = '2012-11-14 00:00:00.000000', "start_time" = '2012-11-03 22:00:00.000000', "updated_at" = '2012-11-04 10:00:00.001130', "target_view_count" = 100 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 "running_view_count" = 0, "updated_at" = '2012-11-04 10:00:00.004471' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 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.1ms) 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", 814558298]] 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", 814558298]] 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.1ms) 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 "start_time" = '2012-11-04 16:00:00.000957', "updated_at" = '2012-11-04 17:00:00.001857' 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.2ms) 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.1ms) 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-11-14 00:00:00 UTC", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-11-04 00:00:00 UTC"}}  (0.1ms) SAVEPOINT active_record_1 SQL (1.0ms) 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, 04 Nov 2012 10:00:00 UTC +00:00], ["end_time", Wed, 14 Nov 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, 04 Nov 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Sun, 04 Nov 2012 10:00:00 UTC +00:00]] AdvertSelector::HelperItem Load (0.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 814558299 ORDER BY position  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/banners/814558299 Completed 302 Found in 10ms (ActiveRecord: 1.3ms)  (0.2ms) SELECT COUNT(*) FROM "advert_selector_banners"  (0.1ms) rollback transaction  (0.1ms) 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.1ms) 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#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.2ms) SELECT "advert_selector_helper_items".* FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_id" = 394627963 ORDER BY position SQL (0.4ms) 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.4ms) DELETE FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? [["id", 394627963]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/banners Completed 302 Found in 7ms (ActiveRecord: 1.2ms)  (0.1ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) 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.1ms) 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.2ms) 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 (95.0ms) AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-11-02 10:00:00.115667') 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 121ms (Views: 118.1ms | ActiveRecord: 1.1ms)  (0.1ms) rollback transaction  (0.1ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) 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.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners"  AdvertSelector::Banner Load (0.3ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-11-02 10:00:00.012769') ORDER BY priority desc LIMIT 10 AdvertSelector::Placement Load (0.2ms) 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.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = 405688915 LIMIT 1 AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" Completed 200 OK in 20ms (Views: 17.5ms | ActiveRecord: 1.1ms)  (0.1ms) rollback transaction  (0.1ms) 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.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/banners/_form.html.erb (34.9ms) AdvertSelector::Banner Load (0.3ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-11-02 10:00:00.042784') ORDER BY priority desc LIMIT 10 AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = 718799085 LIMIT 1 AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = 405688915 LIMIT 1 AdvertSelector::Placement Load (0.2ms) 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 51ms (Views: 48.7ms | ActiveRecord: 1.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#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.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.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 Redirected to http://test.host/advert_selector/banners/394627963 Completed 302 Found in 3ms (ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) 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 "running_view_count" = 1, "updated_at" = '2012-11-04 10:00:00.001670' 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", "394627963"]] SQL (0.2ms) UPDATE "advert_selector_banners" SET "running_view_count" = 99 WHERE "advert_selector_banners"."id" = 394627963 SQL (0.2ms) 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 1124ms (ActiveRecord: 0.4ms) AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]]  (0.1ms) rollback transaction  (0.1ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) 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.8ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) 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 2ms (ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) 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-11-02 10:00:00.004922') 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: 8.9ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.1ms) 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.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]] 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.1ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) 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.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", 405688915]]  (0.1ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-11-04 10:00:00.001260', "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-11-04 10:00:00.003121', "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.1ms) 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.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.1ms) 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.1ms) rollback transaction  (0.1ms) 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.1ms) SELECT COUNT(*) FROM "advert_selector_placements" Processing by AdvertSelector::PlacementsController#create as HTML Parameters: {"placement"=>{"name"=>"new placement"}}  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) 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, 04 Nov 2012 10:00:00 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Sun, 04 Nov 2012 10: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.1ms) 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.1ms) SELECT COUNT(*) FROM "advert_selector_placements"  Processing by AdvertSelector::PlacementsController#destroy as HTML Parameters: {"id"=>"405688915"} AdvertSelector::Placement Load (0.1ms) 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.4ms)  (0.1ms) 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.1ms) 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.2ms) 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 (8.0ms) AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-11-02 10:00:00.014283') 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 18ms (Views: 16.6ms | 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]] 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-11-02 10:00:00.006675') 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: 8.8ms | ActiveRecord: 0.5ms)  (0.2ms) rollback transaction  (0.1ms) 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.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]] AdvertSelector::Placement Load (0.1ms) 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.6ms) AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-11-02 10:00:00.009422') 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 14ms (Views: 13.1ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) 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", 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.1ms) 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.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", "405688915"]]  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/405688915 Completed 302 Found in 5ms (ActiveRecord: 0.3ms)  (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) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]]  (0.1ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-11-04 10:00:00.000825' 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-11-04 10:00:00.004130' 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 Nov 04 12:00:00 +0200 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements [AdvertSelector] AdvertSelector::Banner Load (0.7ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time > '2012-11-04 10:00:00.012066' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.012290' 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 Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 14ms (Views: 13.2ms | ActiveRecord: 1.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.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.3ms) 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, 04 Nov 2012 10:00:00 UTC +00:00], ["name", "always_false"], ["position", 0], ["updated_at", Sun, 04 Nov 2012 10:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Nov 04 12:00:00 +0200 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-11-04 10:00:00.029861' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.030068' 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 6ms (Views: 5.0ms | 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" = 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-11-04 10:00:00.000441' 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-11-04 10:00:00.002572' 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, 04 Nov 2012 10:00:00 UTC +00:00], ["name", "raise_error"], ["position", 0], ["updated_at", Sun, 04 Nov 2012 10:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Nov 04 12:00:00 +0200 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-11-04 10:00:00.004650' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.004856' 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-11-04T12:00:00+02:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /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@global/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@global/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@global/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@global/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `each' [AdvertSelector] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.8ms | 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 Nov 04 12:00:00 +0200 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.3ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-11-02 10:00:00.023001') 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 20ms (Views: 18.3ms | 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.1ms) 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-11-04 10:00:00.000478' 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 "confirmed" = 'f', "updated_at" = '2012-11-04 10:00:00.003141' 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-11-04 10:00:00.000326' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Nov 04 12:00:00 +0200 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-11-04 10:00:00.004072' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.004428' 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 Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 9ms (Views: 7.7ms | ActiveRecord: 0.6ms) 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 Started GET "/" for 127.0.0.1 at Wed Nov 07 12:00:00 +0200 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-11-07 10:00:00.021683' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.021913' 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 7ms (Views: 6.2ms | 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" = 814558298 AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Wed Nov 07 12:00:00 +0200 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 2ms (Views: 1.8ms | 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.1ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-11-07 10:00:00.000585' 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-11-07 10:00:00.002972' 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 Nov 07 12:00:00 +0200 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-11-07 10:00:00.002644' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.002878' 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 7ms (Views: 6.0ms | 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" = 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 Nov 07 12:00:00 +0200 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.3ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time > '2012-11-07 10:00:00.019913' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.020232' 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] AdvertSelection finished Completed 200 OK in 12ms (Views: 11.3ms | ActiveRecord: 0.8ms) 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  (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.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.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-11-07 10:00:00.000516' 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-11-07 10:00:00.003082' 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-11-07 10:00:00.000521' 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 Started GET "/" for 127.0.0.1 at Wed Nov 07 12:00:00 +0200 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-11-07 10:00:00.005462' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.005786' 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] AdvertSelection finished Completed 200 OK in 8ms (Views: 7.5ms | 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 Started GET "/" for 127.0.0.1 at Wed Nov 07 12:00:00 +0200 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: 3.1ms | 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.1ms) 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-11-07 10:00:00.000990' 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-11-07 10:00:00.003639' 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-11-07 10:00:00.000637' 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-11-07 10:00:00.003949', "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-11-07 10:00:00.006068', "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-11-07 10:00:00.008285', "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 Nov 07 12:00:00 +0200 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-11-07 10:00:00.012462' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.012654' 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] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 10ms (Views: 8.8ms | 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 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-11-07 10:00:00.000447' 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-11-07 10:00:00.002949' 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 Nov 07 12:00:00 +0200 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-11-07 10:00:00.000303' 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.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 7ms (Views: 6.8ms | 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" = 814558298 AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Wed Nov 07 12:00:00 +0200 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.6ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Wed Nov 07 12:15:00 +0200 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 4ms (Views: 3.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.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.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-11-07 10:00:00.000537' 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-11-07 10:00:00.003236' 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.2ms) UPDATE "advert_selector_placements" SET "only_once_per_session" = 't', "updated_at" = '2012-11-07 10:00:00.001071' WHERE "advert_selector_placements"."id" = 405688915  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Wed Nov 07 12:00:00 +0200 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-11-07 10:00:00.004609' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.004848' 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 7ms (Views: 6.0ms | ActiveRecord: 0.5ms) 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 Started GET "/" for 127.0.0.1 at Wed Nov 07 12:00:00 +0200 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 2ms (Views: 2.1ms | 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.1ms) 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-11-07 10:00:00.002644' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.002893' 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 7ms (Views: 6.3ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-11-04 15:45:59', 100, '2012-11-09 00:00:00', 't', '2012-11-04 15:45:59', 50, 814558298, 1000, 'f', 0, '2012-10-30 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-11-04 15:45:59', '2012-11-14 00:00:00', 't', '2012-11-04 15:45:59', 100, 394627963, 1000, 't', 0, '2012-11-04 00:00:00') Fixture Insert (0.1ms) 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-11-04 15:45:59', '2012-11-14 00:00:00', 'f', '2012-11-04 15:45:59', 1000, 207249520, 1000, 't', 1, '2012-11-04 00:00:00') Fixture Delete (0.3ms) 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-11-04 15:45:59', '2012-11-04 15:45:59', 960656439, 't', 394627963, '') 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-11-04 15:45:59', '2012-11-04 15:45:59', 929640376, 't', 814558298, '') 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-11-04 15:45:59', '2012-11-04 15:45:59', 281932184, 't', 207249520, '') 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-11-04 15:45:59', '2012-11-04 15:45:59', 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-11-04 15:45:59', '2012-11-04 15:45:59', '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-11-04 15:45:59', '2012-11-04 15:45:59', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-11-04 15:45:59', '2012-11-04 15:45:59', 'parade', 405688915)  (45.4ms) 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) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-11-04 10:00:00.000824' 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.2ms) UPDATE "advert_selector_banners" SET "confirmed" = 'f', "updated_at" = '2012-11-04 10:00:00.014723' 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 Nov 04 12:00:00 +0200 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-11-04 10:00:00.047191' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.047399' 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 Rendered examples/index.html.erb within layouts/application (17.7ms) Completed 200 OK in 26ms (Views: 25.5ms | 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" = 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.3ms) 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, 04 Nov 2012 10:00:00 UTC +00:00], ["name", "always_false"], ["position", 0], ["updated_at", Sun, 04 Nov 2012 10:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Nov 04 12:00:00 +0200 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-11-04 10:00:00.071409' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.071586' 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 Rendered examples/index.html.erb within layouts/application (3.6ms) Completed 200 OK in 5ms (Views: 4.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  (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-11-04 10:00:00.000419' 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-11-04 10:00:00.002436' 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, 04 Nov 2012 10:00:00 UTC +00:00], ["name", "raise_error"], ["position", 0], ["updated_at", Sun, 04 Nov 2012 10:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Nov 04 12:00:00 +0200 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-11-04 10:00:00.008165' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.008433' 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-11-04T12:00:00+02:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /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@global/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@global/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@global/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@global/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 Nov 04 12:00:00 +0200 2012 Processing by AdvertSelector::PlacementsController#index as HTML Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 2ms (Views: 1.8ms | 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.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-11-04 10:00:00.000438' 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-11-04 10:00:00.002480' 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 "updated_at" = '2012-11-04 10:00:00.004137', "frequency" = 2 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Nov 04 12:00:00 +0200 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-11-04 10:00:00.007199' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.007392' 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.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 "/" for 127.0.0.1 at Wed Nov 07 12:00:00 +0200 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-11-07 10:00:00.020964' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.021155' 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.7ms | 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 Nov 07 12:00:00 +0200 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 2ms (Views: 1.7ms | 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-11-07 10:00:00.000422' 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-11-07 10:00:00.002556' 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 Nov 07 12:00:00 +0200 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-11-07 10:00:00.006451' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.006631' 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.3ms | 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" = 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 Nov 07 12:00:00 +0200 2012 Processing by ExamplesController#index as HTML Parameters: {"advert_selector_force"=>"207249520"} [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = 207249520 LIMIT 1 Completed 500 Internal Server Error in 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.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-11-07 10:00:00.000488' 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-11-07 10:00:00.002782' 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-11-07 10:00:00.004569' 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 Started GET "/" for 127.0.0.1 at Wed Nov 07 12:00:00 +0200 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-11-07 10:00:00.008187' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.008364' 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] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.9ms | 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" = 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 Nov 07 12:00:00 +0200 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.9ms | 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.2ms) rollback transaction  (0.1ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) 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-11-07 10:00:00.000455' 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.2ms) UPDATE "advert_selector_banners" SET "confirmed" = 'f', "updated_at" = '2012-11-07 10:00:00.097449' 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-11-07 10:00:00.099644' 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.1ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = '', "updated_at" = '2012-11-07 10:00:00.102487' 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 "conflicting_placements_array" = '', "updated_at" = '2012-11-07 10:00:00.103933' 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 "conflicting_placements_array" = '', "updated_at" = '2012-11-07 10:00:00.105618' 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 Nov 07 12:00:00 +0200 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-11-07 10:00:00.109020' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.109209' 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 7ms (Views: 6.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" = 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.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.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-11-07 10:00:00.000422' 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-11-07 10:00:00.002404' 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 Nov 07 12:00:00 +0200 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-11-07 10:00:00.003991' 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.6ms | 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 Nov 07 12:00:00 +0200 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 2ms (Views: 2.3ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Wed Nov 07 12:15:00 +0200 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.4ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) 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-11-07 10:00:00.000447' 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-11-07 10:00:00.002455' 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 "only_once_per_session" = 't', "updated_at" = '2012-11-07 10:00:00.004764' WHERE "advert_selector_placements"."id" = 405688915  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Wed Nov 07 12:00:00 +0200 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-11-07 10:00:00.007753' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.007932' 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.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 Nov 07 12:00:00 +0200 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 Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-11-04 15:46:35', 100, '2012-11-09 00:00:00', 't', '2012-11-04 15:46:35', 50, 814558298, 1000, 'f', 0, '2012-10-30 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-11-04 15:46:35', '2012-11-14 00:00:00', 't', '2012-11-04 15:46:35', 100, 394627963, 1000, 't', 0, '2012-11-04 00:00:00') Fixture Insert (0.1ms) 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-11-04 15:46:35', '2012-11-14 00:00:00', 'f', '2012-11-04 15:46:35', 1000, 207249520, 1000, 't', 1, '2012-11-04 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-11-04 15:46:35', '2012-11-04 15:46:35', 960656439, 't', 394627963, '') 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-11-04 15:46:35', '2012-11-04 15:46:35', 929640376, 't', 814558298, '') 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-11-04 15:46:35', '2012-11-04 15:46:35', 281932184, 't', 207249520, '') 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-11-04 15:46:35', '2012-11-04 15:46:35', 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-11-04 15:46:35', '2012-11-04 15:46:35', '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-11-04 15:46:35', '2012-11-04 15:46:35', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-11-04 15:46:35', '2012-11-04 15:46:35', 'parade', 405688915)  (280.9ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.8ms) 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.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-11-04 10:00:00.000796' 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 "updated_at" = '2012-11-04 10:00:00.014410', "confirmed" = 'f' 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 Nov 04 12:00:00 +0200 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-11-04 10:00:00.028873' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.029078' 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 Rendered examples/index.html.erb within layouts/application (14.4ms) Completed 200 OK in 19ms (Views: 18.7ms | 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" = 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.3ms) 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, 04 Nov 2012 10:00:00 UTC +00:00], ["name", "always_false"], ["position", 0], ["updated_at", Sun, 04 Nov 2012 10:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Nov 04 12:00:00 +0200 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-11-04 10:00:00.050154' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.050325' 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 Rendered examples/index.html.erb within layouts/application (3.9ms) Completed 200 OK in 5ms (Views: 4.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  (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-11-04 10:00:00.000409' 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 "updated_at" = '2012-11-04 10:00:00.002420', "confirmed" = 'f' 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, 04 Nov 2012 10:00:00 UTC +00:00], ["name", "raise_error"], ["position", 0], ["updated_at", Sun, 04 Nov 2012 10:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Nov 04 12:00:00 +0200 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-11-04 10:00:00.008225' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.008465' 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-11-04T12:00:00+02:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /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@global/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@global/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@global/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@global/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 Nov 04 12:00:00 +0200 2012 Processing by AdvertSelector::PlacementsController#index as HTML Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 2ms (Views: 1.2ms | 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.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-11-04 10:00:00.000419' 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 "updated_at" = '2012-11-04 10:00:00.002513', "confirmed" = 'f' 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-11-04 10:00:00.004221' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Nov 04 12:00:00 +0200 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-11-04 10:00:00.007212' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.007404' 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 Nov 07 12:00:00 +0200 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-11-07 10:00:00.020958' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.021141' 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.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 "/" for 127.0.0.1 at Wed Nov 07 12:00:00 +0200 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-11-07 10:00:00.000444' 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 "updated_at" = '2012-11-07 10:00:00.002524', "confirmed" = 'f' 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 Nov 07 12:00:00 +0200 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-11-07 10:00:00.006237' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.006411' 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.3ms | 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" = 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 Nov 07 12:00:00 +0200 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 Completed 500 Internal Server Error in 3ms  (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-11-07 10:00:00.000520' 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 "updated_at" = '2012-11-07 10:00:00.002878', "confirmed" = 'f' 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 "updated_at" = '2012-11-07 10:00:00.004909', "confirmed" = 't' 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 Started GET "/" for 127.0.0.1 at Wed Nov 07 12:00:00 +0200 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-11-07 10:00:00.008726' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.008898' 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] 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" = 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 Nov 07 12:00:00 +0200 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.8ms | 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" = 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.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-11-07 10:00:00.000412' 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 "updated_at" = '2012-11-07 10:00:00.097542', "confirmed" = 'f' 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 "updated_at" = '2012-11-07 10:00:00.099678', "confirmed" = 't' 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 "conflicting_placements_array" = '', "updated_at" = '2012-11-07 10:00:00.102373' 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 "conflicting_placements_array" = '', "updated_at" = '2012-11-07 10:00:00.103882' 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 "conflicting_placements_array" = '', "updated_at" = '2012-11-07 10:00:00.105630' 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 Nov 07 12:00:00 +0200 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-11-07 10:00:00.109093' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.109262' 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 7ms (Views: 6.3ms | 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" = 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.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-11-07 10:00:00.000426' 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 "updated_at" = '2012-11-07 10:00:00.002387', "confirmed" = 'f' 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 Nov 07 12:00:00 +0200 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-11-07 10:00:00.003940' 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.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 5ms (Views: 4.6ms | 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 Nov 07 12:00:00 +0200 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.4ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Wed Nov 07 12:15:00 +0200 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 2ms (Views: 2.3ms | 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.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-11-07 10:00:00.000407' 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 "updated_at" = '2012-11-07 10:00:00.002417', "confirmed" = 'f' 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 "only_once_per_session" = 't', "updated_at" = '2012-11-07 10:00:00.004649' WHERE "advert_selector_placements"."id" = 405688915  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Wed Nov 07 12:00:00 +0200 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-11-07 10:00:00.007592' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.007764' 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.1ms | 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 Nov 07 12:00:00 +0200 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 2ms (Views: 1.3ms | 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 Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-11-04 15:47:01', 100, '2012-11-09 00:00:00', 't', '2012-11-04 15:47:01', 50, 814558298, 1000, 'f', 0, '2012-10-30 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-11-04 15:47:01', '2012-11-14 00:00:00', 't', '2012-11-04 15:47:01', 100, 394627963, 1000, 't', 0, '2012-11-04 00:00:00') Fixture Insert (0.1ms) 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-11-04 15:47:01', '2012-11-14 00:00:00', 'f', '2012-11-04 15:47:01', 1000, 207249520, 1000, 't', 1, '2012-11-04 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-11-04 15:47:01', '2012-11-04 15:47:01', 960656439, 't', 394627963, '') 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-11-04 15:47:01', '2012-11-04 15:47:01', 929640376, 't', 814558298, '') 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-11-04 15:47:01', '2012-11-04 15:47:01', 281932184, 't', 207249520, '') 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-11-04 15:47:01', '2012-11-04 15:47:01', 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-11-04 15:47:01', '2012-11-04 15:47:01', '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-11-04 15:47:01', '2012-11-04 15:47:01', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-11-04 15:47:01', '2012-11-04 15:47:01', 'parade', 405688915)  (118.7ms) 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.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-11-04 10:00:00.000808' 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 "updated_at" = '2012-11-04 10:00:00.014741', "confirmed" = 'f' 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 Nov 04 12:00:00 +0200 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-11-04 10:00:00.029037' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.029255' 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 Rendered examples/index.html.erb within layouts/application (14.1ms) Completed 200 OK in 19ms (Views: 18.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" = 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.3ms) 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, 04 Nov 2012 10:00:00 UTC +00:00], ["name", "always_false"], ["position", 0], ["updated_at", Sun, 04 Nov 2012 10:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Nov 04 12:00:00 +0200 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-11-04 10:00:00.050235' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.050417' 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 Rendered examples/index.html.erb within layouts/application (3.8ms) Completed 200 OK in 5ms (Views: 4.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  (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-11-04 10:00:00.000403' 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 "updated_at" = '2012-11-04 10:00:00.002409', "confirmed" = 'f' 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, 04 Nov 2012 10:00:00 UTC +00:00], ["name", "raise_error"], ["position", 0], ["updated_at", Sun, 04 Nov 2012 10:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Nov 04 12:00:00 +0200 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-11-04 10:00:00.008089' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.008309' 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-11-04T12:00:00+02:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /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@global/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@global/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@global/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@global/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `each' [AdvertSelector] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.3ms | 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 Nov 04 12:00:00 +0200 2012 Processing by AdvertSelector::PlacementsController#index as HTML Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 2ms (Views: 1.2ms | 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.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-11-04 10: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 "updated_at" = '2012-11-04 10:00:00.002453', "confirmed" = 'f' 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-11-04 10:00:00.004057' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Nov 04 12:00:00 +0200 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-11-04 10:00:00.007009' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.007187' 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.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 Nov 07 12:00:00 +0200 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-11-07 10:00:00.020730' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.020945' 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.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 "/" for 127.0.0.1 at Wed Nov 07 12:00:00 +0200 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 2ms (Views: 1.5ms | 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-11-07 10:00:00.000424' 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 "updated_at" = '2012-11-07 10:00:00.002447', "confirmed" = 'f' 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 Nov 07 12:00:00 +0200 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-11-07 10:00:00.006237' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.006417' 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.1ms | 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" = 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 Nov 07 12:00:00 +0200 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] AdvertSelection fetching banners and placements [AdvertSelector] AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time > '2012-11-07 10:00:00.024005' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.024188' 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 7ms (Views: 5.9ms | 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" = 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-11-07 10: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 "updated_at" = '2012-11-07 10:00:00.002418', "confirmed" = 'f' 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 "updated_at" = '2012-11-07 10:00:00.004149', "confirmed" = 't' 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 Nov 07 12:00:00 +0200 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-11-07 10:00:00.007865' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.008055' 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] 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" = 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 Nov 07 12:00:00 +0200 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.8ms | 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-11-07 10:00:00.000487' 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 "updated_at" = '2012-11-07 10:00:00.002679', "confirmed" = 'f' 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 "updated_at" = '2012-11-07 10:00:00.004576', "confirmed" = 't' 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.1ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = '', "updated_at" = '2012-11-07 10:00:00.007170' 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 "conflicting_placements_array" = '', "updated_at" = '2012-11-07 10:00:00.008681' 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.0ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = '', "updated_at" = '2012-11-07 10:00:00.010382' 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 Nov 07 12:00:00 +0200 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-11-07 10:00:00.013781' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.013949' 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 6ms (Views: 6.0ms | 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" = 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-11-07 10:00:00.000434' 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 "updated_at" = '2012-11-07 10:00:00.002490', "confirmed" = 'f' 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 Nov 07 12:00:00 +0200 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-11-07 10:00:00.004187' 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.4ms | 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 Nov 07 12:00:00 +0200 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.4ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Wed Nov 07 12:15:00 +0200 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 2ms (Views: 2.3ms | 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.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-11-07 10:00:00.000421' 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 "updated_at" = '2012-11-07 10:00:00.002482', "confirmed" = 'f' 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 "only_once_per_session" = 't', "updated_at" = '2012-11-07 10:00:00.004817' WHERE "advert_selector_placements"."id" = 405688915  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Wed Nov 07 12:00:00 +0200 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-11-07 10:00:00.007872' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.008060' 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.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 Started GET "/" for 127.0.0.1 at Wed Nov 07 12:00:00 +0200 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 Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-11-04 15:47:36', 100, '2012-11-09 00:00:00', 't', '2012-11-04 15:47:36', 50, 814558298, 1000, 'f', 0, '2012-10-30 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-11-04 15:47:36', '2012-11-14 00:00:00', 't', '2012-11-04 15:47:36', 100, 394627963, 1000, 't', 0, '2012-11-04 00:00:00') Fixture Insert (0.1ms) 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-11-04 15:47:36', '2012-11-14 00:00:00', 'f', '2012-11-04 15:47:36', 1000, 207249520, 1000, 't', 1, '2012-11-04 00:00:00') Fixture Delete (0.2ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "id", "content_for", "banner_id", "content") VALUES ('banner_leaderboard', 2, '2012-11-04 15:47:36', '2012-11-04 15:47:36', 960656439, 't', 394627963, '') 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-11-04 15:47:36', '2012-11-04 15:47:36', 929640376, 't', 814558298, '') 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-11-04 15:47:36', '2012-11-04 15:47:36', 281932184, 't', 207249520, '') 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-11-04 15:47:36', '2012-11-04 15:47:36', 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-11-04 15:47:36', '2012-11-04 15:47:36', '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-11-04 15:47:36', '2012-11-04 15:47:36', 'parade', 't', 1019730477) Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-11-04 15:47:36', '2012-11-04 15:47:36', 'parade', 405688915)  (35.0ms) commit transaction  (0.2ms) 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.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-11-04 10:00:00.000817', "fast_mode" = 't' 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 "updated_at" = '2012-11-04 10:00:00.014471', "confirmed" = 'f' 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 Nov 04 12:00:00 +0200 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-11-04 10:00:00.028943' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.029165' 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 Rendered examples/index.html.erb within layouts/application (14.3ms) Completed 200 OK in 19ms (Views: 18.6ms | ActiveRecord: 0.5ms) 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.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.3ms) 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, 04 Nov 2012 10:00:00 UTC +00:00], ["name", "always_false"], ["position", 0], ["updated_at", Sun, 04 Nov 2012 10:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Nov 04 12:00:00 +0200 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-11-04 10:00:00.050228' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.050408' 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 Rendered examples/index.html.erb within layouts/application (3.7ms) Completed 200 OK in 5ms (Views: 4.3ms | 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.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 "updated_at" = '2012-11-04 10:00:00.000409', "fast_mode" = 't' 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 "updated_at" = '2012-11-04 10:00:00.002437', "confirmed" = 'f' 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, 04 Nov 2012 10:00:00 UTC +00:00], ["name", "raise_error"], ["position", 0], ["updated_at", Sun, 04 Nov 2012 10:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Nov 04 12:00:00 +0200 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-11-04 10:00:00.008072' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.008266' 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-11-04T12:00:00+02:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /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@global/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@global/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@global/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@global/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `each' [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 "/advert_selector/placements" for 127.0.0.1 at Sun Nov 04 12:00:00 +0200 2012 Processing by AdvertSelector::PlacementsController#index as HTML Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 2ms (Views: 1.2ms | 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.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-11-04 10:00:00.000419', "fast_mode" = 't' 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 "updated_at" = '2012-11-04 10:00:00.002456', "confirmed" = 'f' 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-11-04 10:00:00.004118' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Nov 04 12:00:00 +0200 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-11-04 10:00:00.007101' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.007291' 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 Nov 07 12:00:00 +0200 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-11-07 10:00:00.020959' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.021137' 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 Nov 07 12:00:00 +0200 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 "updated_at" = '2012-11-07 10:00:00.000446', "fast_mode" = 't' 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 "updated_at" = '2012-11-07 10:00:00.002494', "confirmed" = 'f' 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 Nov 07 12:00:00 +0200 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-11-07 10:00:00.006222' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.006397' 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.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" = 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 Nov 07 12:00:00 +0200 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.6ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time > '2012-11-07 10:00:00.031896' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.032641' 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.3ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" IN (718799085, 405688915) [AdvertSelector] AdvertSelector::HelperItem Load (0.4ms) 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 23ms (Views: 21.2ms | ActiveRecord: 1.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.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.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-11-07 10:00:00.000447', "fast_mode" = 't' 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 "updated_at" = '2012-11-07 10:00:00.002483', "confirmed" = 'f' 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 "updated_at" = '2012-11-07 10:00:00.004284', "confirmed" = 't' 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 Started GET "/" for 127.0.0.1 at Wed Nov 07 12:00:00 +0200 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-11-07 10:00:00.007868' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.008036' 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] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.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" = 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 Nov 07 12:00:00 +0200 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.6ms | 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" = 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.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-11-07 10:00:00.000415', "fast_mode" = 't' 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 "updated_at" = '2012-11-07 10:00:00.002427', "confirmed" = 'f' 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 "updated_at" = '2012-11-07 10:00:00.004238', "confirmed" = 't' 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.1ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-11-07 10:00:00.006876', "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-11-07 10:00:00.008185', "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.0ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-11-07 10:00:00.009906', "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 Nov 07 12:00:00 +0200 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-11-07 10:00:00.013281' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.013452' 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 7ms (Views: 6.0ms | 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" = 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 "updated_at" = '2012-11-07 10:00:00.000418', "fast_mode" = 't' 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 "updated_at" = '2012-11-07 10:00:00.002377', "confirmed" = 'f' 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 Nov 07 12:00:00 +0200 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-11-07 10:00:00.004099' 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.6ms | 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 Nov 07 12:00:00 +0200 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 Nov 07 12:15:00 +0200 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 2ms (Views: 2.3ms | 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.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-11-07 10:00:00.000417', "fast_mode" = 't' 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 "updated_at" = '2012-11-07 10:00:00.002471', "confirmed" = 'f' 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 "only_once_per_session" = 't', "updated_at" = '2012-11-07 10:00:00.004889' WHERE "advert_selector_placements"."id" = 405688915  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Wed Nov 07 12:00:00 +0200 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-11-07 10:00:00.007871' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.008051' 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.0ms | 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 Nov 07 12:00:00 +0200 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 1ms (Views: 1.3ms | 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 Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-11-04 15:48:11', 100, '2012-11-09 00:00:00', 't', '2012-11-04 15:48:11', 50, 814558298, 1000, 'f', 0, '2012-10-30 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-11-04 15:48:11', '2012-11-14 00:00:00', 't', '2012-11-04 15:48:11', 100, 394627963, 1000, 't', 0, '2012-11-04 00:00:00') Fixture Insert (0.1ms) 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-11-04 15:48:11', '2012-11-14 00:00:00', 'f', '2012-11-04 15:48:11', 1000, 207249520, 1000, 't', 1, '2012-11-04 00:00:00') Fixture Delete (0.3ms) 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-11-04 15:48:11', '2012-11-04 15:48:11', 960656439, 't', 394627963, '') 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-11-04 15:48:11', '2012-11-04 15:48:11', 929640376, 't', 814558298, '') 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-11-04 15:48:11', '2012-11-04 15:48:11', 281932184, 't', 207249520, '') 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-11-04 15:48:11', '2012-11-04 15:48:11', 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-11-04 15:48:11', '2012-11-04 15:48:11', '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-11-04 15:48:11', '2012-11-04 15:48:11', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-11-04 15:48:11', '2012-11-04 15:48:11', 'parade', 405688915)  (40.5ms) commit transaction  (0.2ms) 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.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-11-04 10:00:00.000801', "fast_mode" = 't' 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.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-11-04 10:00:00.014961', "confirmed" = 'f' 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 Nov 04 12:00:00 +0200 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-11-04 10:00:00.029807' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.030030' 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 Rendered examples/index.html.erb within layouts/application (14.6ms) Completed 200 OK in 20ms (Views: 18.9ms | 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" = 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.3ms) 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, 04 Nov 2012 10:00:00 UTC +00:00], ["name", "always_false"], ["position", 0], ["updated_at", Sun, 04 Nov 2012 10:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Nov 04 12:00:00 +0200 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-11-04 10:00:00.051208' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.051387' 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 Rendered examples/index.html.erb within layouts/application (3.8ms) Completed 200 OK in 5ms (Views: 4.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  (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 "updated_at" = '2012-11-04 10:00:00.000483', "fast_mode" = 't' 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 "updated_at" = '2012-11-04 10:00:00.002544', "confirmed" = 'f' 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, 04 Nov 2012 10:00:00 UTC +00:00], ["name", "raise_error"], ["position", 0], ["updated_at", Sun, 04 Nov 2012 10:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Nov 04 12:00:00 +0200 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-11-04 10:00:00.008489' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.008681' 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-11-04T12:00:00+02:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /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@global/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@global/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@global/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@global/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `each' [AdvertSelector] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.6ms | 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" = 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 Nov 04 12:00:00 +0200 2012 Processing by AdvertSelector::PlacementsController#index as HTML Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 2ms (Views: 1.2ms | 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.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-11-04 10:00:00.000421', "fast_mode" = 't' 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 "updated_at" = '2012-11-04 10:00:00.002580', "confirmed" = 'f' 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 "updated_at" = '2012-11-04 10:00:00.004207', "frequency" = 2 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Nov 04 12:00:00 +0200 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-11-04 10:00:00.007279' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.007473' 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.5ms | 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" = 814558298 AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Wed Nov 07 12:00:00 +0200 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-11-07 10:00:00.021212' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.021393' 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 Nov 07 12:00:00 +0200 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 2ms (Views: 1.5ms | 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.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-11-07 10:00:00.000424', "fast_mode" = 't' 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 "updated_at" = '2012-11-07 10:00:00.002625', "confirmed" = 'f' 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 Nov 07 12:00:00 +0200 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-11-07 10:00:00.006398' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.006591' 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" = 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 Nov 07 12:00:00 +0200 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-11-07 10:00:00.027257' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.027453' 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 9ms (Views: 8.1ms | 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 "updated_at" = '2012-11-07 10:00:00.000417', "fast_mode" = 't' 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 "updated_at" = '2012-11-07 10:00:00.002416', "confirmed" = 'f' 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 "updated_at" = '2012-11-07 10:00:00.004231', "confirmed" = 't' 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 Started GET "/" for 127.0.0.1 at Wed Nov 07 12:00:00 +0200 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-11-07 10:00:00.007867' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.008121' 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] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.7ms | 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" = 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 Nov 07 12:00:00 +0200 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.6ms | 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" = 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 "updated_at" = '2012-11-07 10:00:00.000422', "fast_mode" = 't' 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 "updated_at" = '2012-11-07 10:00:00.002764', "confirmed" = 'f' 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 "updated_at" = '2012-11-07 10:00:00.004681', "confirmed" = 't' 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-11-07 10:00:00.007329', "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-11-07 10:00:00.009015', "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-11-07 10:00:00.010719', "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 Nov 07 12:00:00 +0200 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-11-07 10:00:00.014120' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.014307' 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 7ms (Views: 6.3ms | 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" = 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 "updated_at" = '2012-11-07 10:00:00.000408', "fast_mode" = 't' 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 "updated_at" = '2012-11-07 10:00:00.002684', "confirmed" = 'f' 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 Nov 07 12:00:00 +0200 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-11-07 10:00:00.004388' 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.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 Nov 07 12:00:00 +0200 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.4ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Wed Nov 07 12:15:00 +0200 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.4ms | 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.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-11-07 10:00:00.000403', "fast_mode" = 't' 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 "updated_at" = '2012-11-07 10:00:00.002512', "confirmed" = 'f' 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 "only_once_per_session" = 't', "updated_at" = '2012-11-07 10:00:00.004761' WHERE "advert_selector_placements"."id" = 405688915  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Wed Nov 07 12:00:00 +0200 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-11-07 10:00:00.007666' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.007851' 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.3ms | 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 Nov 07 12:00:00 +0200 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.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 Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-11-04 15:48:19', 100, '2012-11-09 00:00:00', 't', '2012-11-04 15:48:19', 50, 814558298, 1000, 'f', 0, '2012-10-30 00:00:00') Fixture Insert (0.0ms) 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-11-04 15:48:19', '2012-11-14 00:00:00', 't', '2012-11-04 15:48:19', 100, 394627963, 1000, 't', 0, '2012-11-04 00:00:00') Fixture Insert (0.1ms) 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-11-04 15:48:19', '2012-11-14 00:00:00', 'f', '2012-11-04 15:48:19', 1000, 207249520, 1000, 't', 1, '2012-11-04 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-11-04 15:48:19', '2012-11-04 15:48:19', 960656439, 't', 394627963, '') 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-11-04 15:48:19', '2012-11-04 15:48:19', 929640376, 't', 814558298, '') 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-11-04 15:48:19', '2012-11-04 15:48:19', 281932184, 't', 207249520, '') 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-11-04 15:48:19', '2012-11-04 15:48:19', 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-11-04 15:48:19', '2012-11-04 15:48:19', '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-11-04 15:48:19', '2012-11-04 15:48:19', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-11-04 15:48:19', '2012-11-04 15:48:19', 'parade', 405688915)  (42.6ms) 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.6ms) 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, 04 Nov 2012 10:00:00 UTC +00:00], ["name", nil], ["position", 2], ["updated_at", Sun, 04 Nov 2012 10: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, 04 Nov 2012 10:00:00 UTC +00:00], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Sun, 04 Nov 2012 10: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, 04 Nov 2012 10:00:00 UTC +00:00], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Sun, 04 Nov 2012 10: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-11-04 10:00:00.000068' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-11-04 10:00:00.000921' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.001042' 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-11-04 10:00:00.001934' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-11-04 10:00:00.002674' OR end_time IS NULL) AND (start_time < '2011-11-04 11:00:00.002837' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count)  (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) 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 "updated_at" = '2012-11-04 10:00:00.001048', "running_view_count" = 0 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 "updated_at" = '2012-11-04 10:00:00.007213', "running_view_count" = 551 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.1ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-11-04 10:00:00.001360', "running_view_count" = 0, "target_view_count" = 10 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 "updated_at" = '2012-11-04 10:00:00.005700', "running_view_count" = 10 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 AdvertSelector::Banner Load (0.1ms) 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.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-11-04 10:00:00.000466', "confirmed" = 'f' 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 "updated_at" = '2012-11-04 10:00:00.002691', "confirmed" = 't' 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.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-11-04 10:00:00.000950', "start_time" = '2012-11-04 11:00:00.000427' 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 "updated_at" = '2012-11-04 10:00:00.003149', "start_time" = '2012-11-04 08:00:00.002728', "end_time" = '2012-11-04 09:00:00.002801' 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 "updated_at" = '2012-11-04 10:00:00.004597', "start_time" = NULL, "end_time" = '2012-11-04 11:00:00.004266' 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.4ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-11-04 10:00:00.000863', "target_view_count" = 100, "start_time" = '2012-11-03 22:00:00.000000', "end_time" = '2012-11-14 00:00:00.000000' 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 "updated_at" = '2012-11-04 10:00:00.003014', "running_view_count" = 0 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]] 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 "updated_at" = '2012-11-04 17:00:00.001658', "start_time" = '2012-11-04 16:00:00.000850' 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.2ms) 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-11-14 00:00:00 UTC", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-11-04 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, 04 Nov 2012 10:00:00 UTC +00:00], ["end_time", Wed, 14 Nov 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, 04 Nov 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Sun, 04 Nov 2012 10: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 6ms (ActiveRecord: 0.8ms)  (0.1ms) 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.1ms) 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.5ms) DELETE FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."id" = ? [["id", 435138789]] SQL (0.1ms) 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.4ms) DELETE FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? [["id", 394627963]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/banners Completed 302 Found in 6ms (ActiveRecord: 1.3ms)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners"   (0.2ms) rollback transaction  (0.1ms) 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.1ms) 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.1ms) 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 (75.2ms) AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-11-02 10:00:00.093529') 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 98ms (Views: 95.5ms | ActiveRecord: 0.9ms)  (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-11-02 10:00:00.007893') 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: 10.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#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.5ms) AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-11-02 10:00:00.024424') 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 28ms (Views: 26.6ms | 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.1ms) 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 "updated_at" = '2012-11-04 10:00:00.001244', "running_view_count" = 1 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.1ms) 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 1118ms (ActiveRecord: 0.5ms) AdvertSelector::Banner Load (0.1ms) 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 1ms (Views: 1.0ms | 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.3ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-11-02 10:00:00.006075') 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.5ms | 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.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.3ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = 'not_found,video', "updated_at" = '2012-11-04 10:00:00.000832' 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 "conflicting_placements_array" = '', "updated_at" = '2012-11-04 10:00:00.002517' 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.1ms) 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.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.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.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#create as HTML Parameters: {"placement"=>{"name"=>"new placement"}}  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) 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, 04 Nov 2012 10:00:00 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Sun, 04 Nov 2012 10: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.6ms)  (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 (6.0ms) AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-11-02 10:00:00.012942') 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 16ms (Views: 15.0ms | 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-11-02 10:00:00.007372') 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 11ms (Views: 9.8ms | 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.3ms) AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-11-02 10:00:00.009091') 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.5ms | 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.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-11-04 10:00:00.000385' 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 "updated_at" = '2012-11-04 10:00:00.002291', "confirmed" = 'f' 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 Nov 04 12:00:00 +0200 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-11-04 10:00:00.006584' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.006798' 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.0ms | 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.3ms) 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, 04 Nov 2012 10:00:00 UTC +00:00], ["name", "always_false"], ["position", 0], ["updated_at", Sun, 04 Nov 2012 10:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Nov 04 12:00:00 +0200 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-11-04 10:00:00.020659' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.020852' 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 5ms (Views: 4.3ms | 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.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-11-04 10:00:00.000402' 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 "updated_at" = '2012-11-04 10:00:00.002445', "confirmed" = 'f' 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, 04 Nov 2012 10:00:00 UTC +00:00], ["name", "raise_error"], ["position", 0], ["updated_at", Sun, 04 Nov 2012 10:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Nov 04 12:00:00 +0200 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-11-04 10:00:00.004266' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.004449' 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-11-04T12:00:00+02:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /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@global/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@global/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@global/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@global/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `each' [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 "/advert_selector/placements" for 127.0.0.1 at Sun Nov 04 12:00:00 +0200 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-11-02 10:00:00.022673') 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 18ms (Views: 16.5ms | 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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-11-04 10:00:00.000429' 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 "updated_at" = '2012-11-04 10:00:00.002517', "confirmed" = 'f' 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 "updated_at" = '2012-11-04 10:00:00.000348', "frequency" = 2 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Nov 04 12:00:00 +0200 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-11-04 10:00:00.003453' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.003653' 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.6ms | 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 Nov 07 12:00:00 +0200 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-11-07 10:00:00.018461' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.018687' 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.9ms | 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 Nov 07 12:00:00 +0200 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 2ms (Views: 1.5ms | 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-11-07 10:00:00.000441' 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 "updated_at" = '2012-11-07 10:00:00.002525', "confirmed" = 'f' 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 Nov 07 12:00:00 +0200 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-11-07 10:00:00.002431' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.002637' 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.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" = 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 Nov 07 12:00:00 +0200 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-11-07 10:00:00.016622' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.016823' 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 9ms (Views: 8.4ms | 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-11-07 10:00:00.000437' 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 "updated_at" = '2012-11-07 10:00:00.002506', "confirmed" = 'f' 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 "updated_at" = '2012-11-07 10:00:00.000475', "confirmed" = 't' 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 Started GET "/" for 127.0.0.1 at Wed Nov 07 12:00:00 +0200 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-11-07 10:00:00.004249' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.004445' 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] AdvertSelection finished Completed 200 OK in 7ms (Views: 6.0ms | 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" = 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 Nov 07 12:00:00 +0200 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.9ms | 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" = 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-11-07 10:00:00.000750' 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 "updated_at" = '2012-11-07 10:00:00.002825', "confirmed" = 'f' 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 "updated_at" = '2012-11-07 10:00:00.000481', "confirmed" = 't' 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.1ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = '', "updated_at" = '2012-11-07 10:00:00.002803' 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 "conflicting_placements_array" = '', "updated_at" = '2012-11-07 10:00:00.004168' 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 "conflicting_placements_array" = '', "updated_at" = '2012-11-07 10:00:00.005894' 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 Nov 07 12:00:00 +0200 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-11-07 10:00:00.009449' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.009637' 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 7ms (Views: 6.6ms | 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" = 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-11-07 10:00:00.000429' 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 "updated_at" = '2012-11-07 10:00:00.002642', "confirmed" = 'f' 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 Nov 07 12:00:00 +0200 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-11-07 10:00:00.000260' 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 6ms (Views: 5.0ms | 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 Nov 07 12:00:00 +0200 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.7ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Wed Nov 07 12:15:00 +0200 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.7ms | 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.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-11-07 10:00:00.000437' 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 "updated_at" = '2012-11-07 10:00:00.002510', "confirmed" = 'f' 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.2ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-11-07 10:00:00.000968', "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 Nov 07 12:00:00 +0200 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-11-07 10:00:00.004090' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.004288' 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) 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 Nov 07 12:00:00 +0200 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 2ms (Views: 1.5ms | 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]] 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-11-07 10:00:00.002493' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.002683' 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 Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-11-04 15:48:28', 100, '2012-11-09 00:00:00', 't', '2012-11-04 15:48:28', 50, 814558298, 1000, 'f', 0, '2012-10-30 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-11-04 15:48:28', '2012-11-14 00:00:00', 't', '2012-11-04 15:48:28', 100, 394627963, 1000, 't', 0, '2012-11-04 00:00:00') Fixture Insert (0.1ms) 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-11-04 15:48:28', '2012-11-14 00:00:00', 'f', '2012-11-04 15:48:28', 1000, 207249520, 1000, 't', 1, '2012-11-04 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-11-04 15:48:28', '2012-11-04 15:48:28', 960656439, 't', 394627963, '') 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-11-04 15:48:28', '2012-11-04 15:48:28', 929640376, 't', 814558298, '') 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-11-04 15:48:28', '2012-11-04 15:48:28', 281932184, 't', 207249520, '') 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-11-04 15:48:28', '2012-11-04 15:48:28', 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-11-04 15:48:28', '2012-11-04 15:48:28', '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-11-04 15:48:28', '2012-11-04 15:48:28', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-11-04 15:48:28', '2012-11-04 15:48:28', 'parade', 405688915)  (78.5ms) 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) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-11-04 10:00:00.000796' 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 "updated_at" = '2012-11-04 10:00:00.014916', "confirmed" = 'f' 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 Nov 04 12:00:00 +0200 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-11-04 10:00:00.029207' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.029409' 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 Rendered examples/index.html.erb within layouts/application (14.0ms) Completed 200 OK in 19ms (Views: 18.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" = 814558298 AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."banner_id" = 814558298 AND position >= 0) SQL (0.3ms) 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, 04 Nov 2012 10:00:00 UTC +00:00], ["name", "always_false"], ["position", 0], ["updated_at", Sun, 04 Nov 2012 10:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Nov 04 12:00:00 +0200 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-11-04 10:00:00.050229' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.050417' 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 Rendered examples/index.html.erb within layouts/application (3.7ms) Completed 200 OK in 5ms (Views: 4.3ms | 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.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-11-04 10:00:00.000408' 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.1ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-11-04 10:00:00.002458', "confirmed" = 'f' 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, 04 Nov 2012 10:00:00 UTC +00:00], ["name", "raise_error"], ["position", 0], ["updated_at", Sun, 04 Nov 2012 10:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Nov 04 12:00:00 +0200 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-11-04 10:00:00.008307' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.008540' 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-11-04T12:00:00+02:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /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@global/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@global/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@global/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@global/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `each' [AdvertSelector] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.6ms | 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 Nov 04 12:00:00 +0200 2012 Processing by AdvertSelector::PlacementsController#index as HTML Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 2ms (Views: 1.7ms | 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.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-11-04 10:00:00.000449' 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 "updated_at" = '2012-11-04 10:00:00.002531', "confirmed" = 'f' 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.1ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-11-04 10:00:00.004231', "frequency" = 2 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Nov 04 12:00:00 +0200 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-11-04 10:00:00.007162' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.007344' 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.6ms | 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 Nov 07 12:00:00 +0200 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-11-07 10:00:00.021330' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.021511' 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.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 "/" for 127.0.0.1 at Wed Nov 07 12:00:00 +0200 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 3ms (Views: 2.3ms | 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.1ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]]  (0.1ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-11-07 10:00:00.000640' 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 "updated_at" = '2012-11-07 10:00:00.003523', "confirmed" = 'f' 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 Nov 07 12:00:00 +0200 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-11-07 10:00:00.007337' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.007519' 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.3ms | 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" = 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 Nov 07 12:00:00 +0200 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-11-07 10:00:00.028437' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.028625' 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 9ms (Views: 8.2ms | 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.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-11-07 10:00:00.000440' 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 "updated_at" = '2012-11-07 10:00:00.002525', "confirmed" = 'f' 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 "updated_at" = '2012-11-07 10:00:00.004521', "confirmed" = 't' 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 Started GET "/" for 127.0.0.1 at Wed Nov 07 12:00:00 +0200 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-11-07 10:00:00.008168' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.008354' 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] 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" = 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 Nov 07 12:00:00 +0200 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.6ms | 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" = 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.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.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-11-07 10:00:00.000425' 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 "updated_at" = '2012-11-07 10:00:00.002556', "confirmed" = 'f' 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 "updated_at" = '2012-11-07 10:00:00.004477', "confirmed" = 't' 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.1ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = '', "updated_at" = '2012-11-07 10:00:00.007132' 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 "conflicting_placements_array" = '', "updated_at" = '2012-11-07 10:00:00.008530' 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 "conflicting_placements_array" = '', "updated_at" = '2012-11-07 10:00:00.010161' 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 Nov 07 12:00:00 +0200 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-11-07 10:00:00.013556' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.013737' 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 7ms (Views: 6.0ms | 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" = 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.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-11-07 10:00:00.000410' 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 "updated_at" = '2012-11-07 10:00:00.002450', "confirmed" = 'f' 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 Nov 07 12:00:00 +0200 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-11-07 10:00:00.004007' 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.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 "/" for 127.0.0.1 at Wed Nov 07 12:00:00 +0200 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.4ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Wed Nov 07 12:15:00 +0200 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.4ms | 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.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-11-07 10:00:00.000391' 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 "updated_at" = '2012-11-07 10:00:00.002415', "confirmed" = 'f' 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.2ms) UPDATE "advert_selector_placements" SET "only_once_per_session" = 't', "updated_at" = '2012-11-07 10:00:00.005023' WHERE "advert_selector_placements"."id" = 405688915  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Wed Nov 07 12:00:00 +0200 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-11-07 10:00:00.008030' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.008204' 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 5ms (Views: 4.9ms | 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 Nov 07 12:00:00 +0200 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 Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-11-04 15:49:40', 100, '2012-11-09 00:00:00', 't', '2012-11-04 15:49:40', 50, 814558298, 1000, 'f', 0, '2012-10-30 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-11-04 15:49:40', '2012-11-14 00:00:00', 't', '2012-11-04 15:49:40', 100, 394627963, 1000, 't', 0, '2012-11-04 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-11-04 15:49:40', '2012-11-14 00:00:00', 'f', '2012-11-04 15:49:40', 1000, 207249520, 1000, 't', 1, '2012-11-04 00:00:00') Fixture Delete (0.3ms) 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-11-04 15:49:40', '2012-11-04 15:49:40', 960656439, 't', 394627963, '') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "id", "content_for", "banner_id", "content") VALUES (1, 'banner_leaderboard', '2012-11-04 15:49:40', '2012-11-04 15:49:40', 929640376, 't', 814558298, '') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "id", "content_for", "banner_id", "content") VALUES ('banner_parade', 1, '2012-11-04 15:49:40', '2012-11-04 15:49:40', 281932184, 't', 207249520, '') 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-11-04 15:49:40', '2012-11-04 15:49:40', 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-11-04 15:49:40', '2012-11-04 15:49:40', '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-11-04 15:49:40', '2012-11-04 15:49:40', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-11-04 15:49:40', '2012-11-04 15:49:40', 'parade', 405688915)  (42.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.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-11-04 10:00:00.000788', "fast_mode" = 't' 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 "updated_at" = '2012-11-04 10:00:00.014225', "confirmed" = 'f' 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 Nov 04 12:00:00 +0200 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-11-04 10:00:00.028527' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.028727' 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 Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Rendered examples/index.html.erb within layouts/application (14.4ms) Completed 200 OK in 20ms (Views: 18.7ms | 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" = 814558298 AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."banner_id" = 814558298 AND position >= 0) SQL (0.3ms) 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, 04 Nov 2012 10:00:00 UTC +00:00], ["name", "always_false"], ["position", 0], ["updated_at", Sun, 04 Nov 2012 10:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Nov 04 12:00:00 +0200 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-11-04 10:00:00.050026' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.050216' 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 Rendered examples/index.html.erb within layouts/application (3.6ms) Completed 200 OK in 5ms (Views: 4.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  (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 "updated_at" = '2012-11-04 10:00:00.000404', "fast_mode" = 't' 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 "updated_at" = '2012-11-04 10:00:00.002359', "confirmed" = 'f' 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, 04 Nov 2012 10:00:00 UTC +00:00], ["name", "raise_error"], ["position", 0], ["updated_at", Sun, 04 Nov 2012 10:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Nov 04 12:00:00 +0200 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-11-04 10:00:00.008056' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.008255' 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-11-04T12:00:00+02:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /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@global/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@global/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@global/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@global/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `each' [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 "/advert_selector/placements" for 127.0.0.1 at Sun Nov 04 12:00:00 +0200 2012 Processing by AdvertSelector::PlacementsController#index as HTML Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 2ms (Views: 1.2ms | ActiveRecord: 0.0ms) Started GET "/advert_selector/placements" for 127.0.0.1 at Sun Nov 04 12:02:01 +0200 2012 Processing by AdvertSelector::PlacementsController#index as HTML Filter chain halted as :admin_access_only rendered or redirected Completed 403 Forbidden in 2ms (Views: 1.0ms | ActiveRecord: 0.0ms)  (0.2ms) rollback transaction  (0.1ms) 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 "updated_at" = '2012-11-04 10:00:00.000474', "fast_mode" = 't' 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 "updated_at" = '2012-11-04 10:00:00.003269', "confirmed" = 'f' 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-11-04 10:00:00.005575' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Nov 04 12:00:00 +0200 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-11-04 10:00:00.009010' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.009217' 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 7ms (Views: 6.3ms | 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" = 814558298 AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Wed Nov 07 12:00:00 +0200 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-11-07 10:00:00.026940' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.027147' 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 7ms (Views: 6.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" = 814558298 AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Wed Nov 07 12:00:00 +0200 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 2ms (Views: 1.5ms | 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 "updated_at" = '2012-11-07 10:00:00.000401', "fast_mode" = 't' 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 "updated_at" = '2012-11-07 10:00:00.002440', "confirmed" = 'f' 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 Nov 07 12:00:00 +0200 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-11-07 10:00:00.006112' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.006283' 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.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" = 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 Nov 07 12:00:00 +0200 2012 Processing by ExamplesController#index as HTML Parameters: {"advert_selector_force"=>"207249520"} [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelector::Banner Load (0.2ms) 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-11-07 10:00:00.122228' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.122426' 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 9ms (Views: 8.0ms | ActiveRecord: 0.7ms) 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 "updated_at" = '2012-11-07 10:00:00.000400', "fast_mode" = 't' 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 "updated_at" = '2012-11-07 10:00:00.002360', "confirmed" = 'f' 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 "updated_at" = '2012-11-07 10:00:00.004102', "confirmed" = 't' 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 Started GET "/" for 127.0.0.1 at Wed Nov 07 12:00:00 +0200 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-11-07 10:00:00.007677' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.007850' 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] 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" = 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 Nov 07 12:00:00 +0200 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) 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.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 "updated_at" = '2012-11-07 10:00:00.000430', "fast_mode" = 't' 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 "updated_at" = '2012-11-07 10:00:00.002415', "confirmed" = 'f' 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 "updated_at" = '2012-11-07 10:00:00.004105', "confirmed" = 't' 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.1ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-11-07 10:00:00.006638', "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-11-07 10:00:00.007942', "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-11-07 10:00:00.009606', "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 Nov 07 12:00:00 +0200 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-11-07 10:00:00.013001' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.013191' 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 7ms (Views: 6.0ms | 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" = 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.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-11-07 10:00:00.000406', "fast_mode" = 't' 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 "updated_at" = '2012-11-07 10:00:00.002333', "confirmed" = 'f' 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 Nov 07 12:00:00 +0200 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-11-07 10:00:00.003895' 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.6ms | 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 Nov 07 12:00:00 +0200 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.4ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Wed Nov 07 12:15:00 +0200 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 2ms (Views: 2.3ms | 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.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-11-07 10:00:00.000414', "fast_mode" = 't' 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 "updated_at" = '2012-11-07 10:00:00.002714', "confirmed" = 'f' 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 "only_once_per_session" = 't', "updated_at" = '2012-11-07 10:00:00.004950' WHERE "advert_selector_placements"."id" = 405688915  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Wed Nov 07 12:00:00 +0200 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-11-07 10:00:00.007832' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.008022' 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.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 Started GET "/" for 127.0.0.1 at Wed Nov 07 12:00:00 +0200 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 Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-11-04 15:53:24', 100, '2012-11-09 00:00:00', 't', '2012-11-04 15:53:24', 50, 814558298, 1000, 'f', 0, '2012-10-30 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-11-04 15:53:24', '2012-11-14 00:00:00', 't', '2012-11-04 15:53:24', 100, 394627963, 1000, 't', 0, '2012-11-04 00:00:00') Fixture Insert (0.1ms) 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-11-04 15:53:24', '2012-11-14 00:00:00', 'f', '2012-11-04 15:53:24', 1000, 207249520, 1000, 't', 1, '2012-11-04 00:00:00') Fixture Delete (0.4ms) 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-11-04 15:53:24', '2012-11-04 15:53:24', 960656439, 't', 394627963, '') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("position", "name", "created_at", "updated_at", "id", "content_for", "banner_id", "content") VALUES (1, 'banner_leaderboard', '2012-11-04 15:53:24', '2012-11-04 15:53:24', 929640376, 't', 814558298, '') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "id", "content_for", "banner_id", "content") VALUES ('banner_parade', 1, '2012-11-04 15:53:24', '2012-11-04 15:53:24', 281932184, 't', 207249520, '') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "id", "content_for", "banner_id", "content") VALUES ('request_params_include?', '2012-11-04 15:53:24', '2012-11-04 15:53:24', 435138789, 'f', 394627963, 'pepsi=true') Fixture Delete (0.2ms) DELETE FROM "advert_selector_placements" Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Parade', '2012-11-04 15:53:24', '2012-11-04 15:53:24', 'leaderboard,video', 718799085) Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "only_once_per_session", "id") VALUES ('Video', '2012-11-04 15:53:24', '2012-11-04 15:53:24', 'parade', 't', 1019730477) Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-11-04 15:53:24', '2012-11-04 15:53:24', 'parade', 405688915)  (42.4ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.4ms) 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.2ms) 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.9ms) 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, 04 Nov 2012 10:00:00 UTC +00:00], ["name", nil], ["position", 2], ["updated_at", Sun, 04 Nov 2012 10: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.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", true], ["created_at", Sun, 04 Nov 2012 10:00:00 UTC +00:00], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Sun, 04 Nov 2012 10:00:00 UTC +00:00]] SQL (0.3ms) 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, 04 Nov 2012 10:00:00 UTC +00:00], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Sun, 04 Nov 2012 10:00:00 UTC +00:00]] AdvertSelector::HelperItem Load (0.2ms) 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.2ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_helper_items"  AdvertSelector::HelperItem Load (0.2ms) 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.2ms) 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.2ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]]  (0.2ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-11-04 10:00:00.000131' OR end_time IS NULL)  (0.2ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-11-04 10:00:00.001654' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.001893' 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-11-04 10:00:00.003827' OR end_time IS NULL)  (0.2ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-11-04 10:00:00.005705' OR end_time IS NULL) AND (start_time < '2011-11-04 11:00:00.005980' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count)  (0.1ms) rollback transaction  (0.1ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]]  (0.1ms) rollback transaction  (0.1ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]]  (0.1ms) SAVEPOINT active_record_1  (0.5ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-11-04 10:00:00.001777', "running_view_count" = 0 WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.2ms) 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 AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]]  (0.1ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-11-04 10:00:00.013076', "running_view_count" = 551 WHERE "advert_selector_banners"."id" = 814558298  (0.1ms) RELEASE SAVEPOINT active_record_1 AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]]  (0.2ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]]  (0.1ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-11-04 10:00:00.001828', "running_view_count" = 0, "target_view_count" = 10 WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.2ms) 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.1ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-11-04 10:00:00.009068', "running_view_count" = 10 WHERE "advert_selector_banners"."id" = 814558298  (0.1ms) RELEASE SAVEPOINT active_record_1 AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]]  (0.2ms) rollback transaction  (0.1ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]]  (0.1ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-11-04 10:00:00.000723', "confirmed" = 'f' WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.2ms) 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.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-11-04 10:00:00.004842', "confirmed" = 't' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]]  (0.2ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 207249520]]  (0.1ms) SAVEPOINT active_record_1  (0.5ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-11-04 10:00:00.001510', "start_time" = '2012-11-04 11:00:00.000717' WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.2ms) 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.4ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-11-04 10:00:00.005673', "end_time" = '2012-11-04 09:00:00.004983', "start_time" = '2012-11-04 08:00:00.004823' WHERE "advert_selector_banners"."id" = 814558298  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-11-04 10:00:00.009844', "end_time" = '2012-11-04 11:00:00.009021', "start_time" = NULL WHERE "advert_selector_banners"."id" = 814558298  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) 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.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.5ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-11-04 10:00:00.001013', "end_time" = '2012-11-14 00:00:00.000000', "start_time" = '2012-11-03 22:00:00.000000', "target_view_count" = 100 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 "updated_at" = '2012-11-04 10:00:00.003944', "running_view_count" = 0 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.1ms) 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", 814558298]] 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.1ms) 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", 814558298]] AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]]  (0.1ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-11-04 17:00:00.002180', "start_time" = '2012-11-04 16:00:00.001234' 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.1ms) rollback transaction  (0.1ms) 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-11-14 00:00:00 UTC", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-11-04 00:00:00 UTC"}}  (0.1ms) SAVEPOINT active_record_1 SQL (1.0ms) 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, 04 Nov 2012 10:00:00 UTC +00:00], ["end_time", Wed, 14 Nov 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, 04 Nov 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Sun, 04 Nov 2012 10:00:00 UTC +00:00]] AdvertSelector::HelperItem Load (0.2ms) 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 9ms (ActiveRecord: 1.3ms)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners"  (0.2ms) 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.1ms) 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#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.1ms) SAVEPOINT active_record_1 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 SQL (0.5ms) DELETE FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."id" = ? [["id", 435138789]] SQL (0.1ms) 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.4ms) 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 8ms (ActiveRecord: 1.5ms)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners"   (0.2ms) 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.1ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", "394627963"]] AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  (0.2ms) SELECT COUNT(*) FROM "advert_selector_helper_items" WHERE "advert_selector_helper_items"."banner_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 Rendered /home/ohu/koodi/gems/advert_selector/app/views/advert_selector/banners/_form.html.erb (80.9ms) AdvertSelector::Banner Load (0.3ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-11-02 10:00:00.104486') ORDER BY priority desc LIMIT 10 AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = 718799085 LIMIT 1 AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = 405688915 LIMIT 1 AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = 405688915 LIMIT 1 AdvertSelector::Placement Load (0.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements"  Completed 200 OK in 113ms (Views: 110.1ms | ActiveRecord: 1.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#index as HTML AdvertSelector::Banner Load (0.2ms) 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-11-02 10:00:00.007982') 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.2ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = 405688915 LIMIT 1 AdvertSelector::Placement Load (0.2ms) 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.0ms | ActiveRecord: 1.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#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 (28.3ms) AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-11-02 10:00:00.034785') 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 39ms (Views: 37.1ms | 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]] 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.1ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-11-04 10:00:00.001397', "running_view_count" = 1 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.1ms) 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 1086ms (ActiveRecord: 0.6ms) AdvertSelector::Banner Load (0.1ms) 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 1ms (Views: 1.0ms | 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-11-02 10:00:00.004273') 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.4ms | 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.3ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-11-04 10:00:00.000812', "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-11-04 10:00:00.002327', "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.1ms) 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.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.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.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.1ms) SELECT COUNT(*) FROM "advert_selector_placements" Processing by AdvertSelector::PlacementsController#create as HTML Parameters: {"placement"=>{"name"=>"new placement"}}  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) 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, 04 Nov 2012 10:00:00 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Sun, 04 Nov 2012 10: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.6ms)  (0.1ms) 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.1ms) SELECT COUNT(*) FROM "advert_selector_placements"  Processing by AdvertSelector::PlacementsController#destroy as HTML Parameters: {"id"=>"405688915"} AdvertSelector::Placement Load (0.1ms) 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.3ms) 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.4ms)  (0.1ms) 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 (6.0ms) AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-11-02 10:00:00.011806') 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.7ms | 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-11-02 10:00:00.006460') 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.0ms | 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.3ms) AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-11-02 10:00:00.008798') 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.5ms | 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.1ms) 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.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 "updated_at" = '2012-11-04 10:00:00.000405', "fast_mode" = 't' 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 "updated_at" = '2012-11-04 10:00:00.002440', "confirmed" = 'f' 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 Nov 04 12:00:00 +0200 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-11-04 10:00:00.006809' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.007018' 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: 8.9ms | 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.3ms) 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, 04 Nov 2012 10:00:00 UTC +00:00], ["name", "always_false"], ["position", 0], ["updated_at", Sun, 04 Nov 2012 10:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Nov 04 12:00:00 +0200 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-11-04 10:00:00.020290' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.020464' 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: 4.0ms | 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 "updated_at" = '2012-11-04 10:00:00.000441', "fast_mode" = 't' 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 "updated_at" = '2012-11-04 10:00:00.002643', "confirmed" = 'f' 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, 04 Nov 2012 10:00:00 UTC +00:00], ["name", "raise_error"], ["position", 0], ["updated_at", Sun, 04 Nov 2012 10:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Nov 04 12:00:00 +0200 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-11-04 10:00:00.004454' OR end_time IS NULL) AND (start_time < '2012-11-04 11: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-11-04T12:00:00+02:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /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@global/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@global/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@global/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@global/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `each' [AdvertSelector] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.6ms | 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 Nov 04 12:00:00 +0200 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-11-02 10:00:00.021508') 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: 14.1ms | 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.1ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-11-04 10:00:00.000470', "fast_mode" = 't' 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 "updated_at" = '2012-11-04 10:00:00.002534', "confirmed" = 'f' 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 "updated_at" = '2012-11-04 10:00:00.000298', "frequency" = 2 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Nov 04 12:00:00 +0200 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-11-04 10:00:00.003254' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.003424' 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.6ms | 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 Nov 07 12:00:00 +0200 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-11-07 10:00:00.017092' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.017264' 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.7ms | 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 Nov 07 12:00:00 +0200 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 2ms (Views: 1.7ms | 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 "updated_at" = '2012-11-07 10:00:00.000453', "fast_mode" = 't' 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 "updated_at" = '2012-11-07 10:00:00.002509', "confirmed" = 'f' 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 Nov 07 12:00:00 +0200 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-11-07 10:00:00.002338' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.002521' 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.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" = 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 Nov 07 12:00:00 +0200 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] AdvertSelection fetching banners and placements [AdvertSelector] AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time > '2012-11-07 10:00:00.013145' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.013303' 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) 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.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-11-07 10:00:00.000448', "fast_mode" = 't' 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 "updated_at" = '2012-11-07 10:00:00.002712', "confirmed" = 'f' 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 "updated_at" = '2012-11-07 10:00:00.000482', "confirmed" = 't' 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 Started GET "/" for 127.0.0.1 at Wed Nov 07 12:00:00 +0200 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-11-07 10:00:00.004214' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.004389' 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] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.8ms | 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" = 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 Nov 07 12:00:00 +0200 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.8ms | 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" = 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.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-11-07 10:00:00.000423', "fast_mode" = 't' 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 "updated_at" = '2012-11-07 10:00:00.002517', "confirmed" = 'f' 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 "updated_at" = '2012-11-07 10:00:00.000448', "confirmed" = 't' 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.1ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-11-07 10:00:00.002699', "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-11-07 10:00:00.004006', "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-11-07 10:00:00.005811', "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 Nov 07 12:00:00 +0200 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements [AdvertSelector] AdvertSelector::Banner Load (0.5ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time > '2012-11-07 10:00:00.009376' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.009554' 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: 6.9ms | ActiveRecord: 0.7ms) 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.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 "updated_at" = '2012-11-07 10:00:00.000416', "fast_mode" = 't' 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 "updated_at" = '2012-11-07 10:00:00.002494', "confirmed" = 'f' 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 Nov 07 12:00:00 +0200 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-11-07 10:00:00.000233' 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.8ms | 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 Nov 07 12:00:00 +0200 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.7ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Wed Nov 07 12:15:00 +0200 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.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-11-07 10:00:00.000409', "fast_mode" = 't' 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 "updated_at" = '2012-11-07 10:00:00.002566', "confirmed" = 'f' 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 "only_once_per_session" = 't', "updated_at" = '2012-11-07 10:00:00.000985' WHERE "advert_selector_placements"."id" = 405688915  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Wed Nov 07 12:00:00 +0200 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-11-07 10:00:00.004077' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.004271' 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.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 "/" for 127.0.0.1 at Wed Nov 07 12:00:00 +0200 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 2ms (Views: 1.5ms | 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]] 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-11-07 10:00:00.002376' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.002550' 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.6ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-11-04 15:53:56', 100, '2012-11-09 00:00:00', 't', '2012-11-04 15:53:56', 50, 814558298, 1000, 'f', 0, '2012-10-30 00:00:00') Fixture Insert (0.0ms) 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-11-04 15:53:56', '2012-11-14 00:00:00', 't', '2012-11-04 15:53:56', 100, 394627963, 1000, 't', 0, '2012-11-04 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-11-04 15:53:56', '2012-11-14 00:00:00', 'f', '2012-11-04 15:53:56', 1000, 207249520, 1000, 't', 1, '2012-11-04 00:00:00') Fixture Delete (0.2ms) DELETE FROM "advert_selector_helper_items" Fixture Insert (0.0ms) INSERT INTO "advert_selector_helper_items" ("name", "position", "created_at", "updated_at", "id", "content_for", "banner_id", "content") VALUES ('banner_leaderboard', 2, '2012-11-04 15:53:56', '2012-11-04 15:53:56', 960656439, 't', 394627963, '') 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-11-04 15:53:56', '2012-11-04 15:53:56', 929640376, 't', 814558298, '') 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-11-04 15:53:56', '2012-11-04 15:53:56', 281932184, 't', 207249520, '') 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-11-04 15:53:56', '2012-11-04 15:53:56', 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-11-04 15:53:56', '2012-11-04 15:53:56', '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-11-04 15:53:56', '2012-11-04 15:53:56', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-11-04 15:53:56', '2012-11-04 15:53:56', 'parade', 405688915)  (184.1ms) 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.6ms) 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, 04 Nov 2012 10:00:00 UTC +00:00], ["name", nil], ["position", 2], ["updated_at", Sun, 04 Nov 2012 10: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, 04 Nov 2012 10:00:00 UTC +00:00], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Sun, 04 Nov 2012 10: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, 04 Nov 2012 10:00:00 UTC +00:00], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Sun, 04 Nov 2012 10: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-11-04 10:00:00.000066' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-11-04 10:00:00.000922' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.001043' 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-11-04 10:00:00.001959' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-11-04 10:00:00.002657' OR end_time IS NULL) AND (start_time < '2011-11-04 11:00:00.002783' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count)  (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.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-11-04 10:00:00.000918', "running_view_count" = 0 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 "updated_at" = '2012-11-04 10:00:00.007277', "running_view_count" = 551 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.3ms) UPDATE "advert_selector_banners" SET "target_view_count" = 10, "updated_at" = '2012-11-04 10:00:00.000910', "running_view_count" = 0 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 "updated_at" = '2012-11-04 10:00:00.004399', "running_view_count" = 10 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.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-11-04 10:00:00.000404', "confirmed" = 'f' 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 "updated_at" = '2012-11-04 10:00:00.002442', "confirmed" = 't' 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.3ms) UPDATE "advert_selector_banners" SET "start_time" = '2012-11-04 11:00:00.000388', "updated_at" = '2012-11-04 10:00:00.000822' 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-11-04 08:00:00.002553', "end_time" = '2012-11-04 09:00:00.002631', "updated_at" = '2012-11-04 10:00:00.002980' 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-11-04 11:00:00.004111', "updated_at" = '2012-11-04 10:00:00.004460' 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-11-03 22:00:00.000000', "target_view_count" = 100, "end_time" = '2012-11-14 00:00:00.000000', "updated_at" = '2012-11-04 10:00:00.000879' 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 "updated_at" = '2012-11-04 10:00:00.002999', "running_view_count" = 0 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]] 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 "start_time" = '2012-11-04 16:00:00.000938', "updated_at" = '2012-11-04 17:00:00.001733' 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.2ms) rollback transaction  (0.1ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) 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-11-14 00:00:00 UTC", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-11-04 00:00:00 UTC"}}  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) 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, 04 Nov 2012 10:00:00 UTC +00:00], ["end_time", Wed, 14 Nov 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, 04 Nov 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Sun, 04 Nov 2012 10: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.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]]  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" Processing by AdvertSelector::BannersController#destroy 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"]]  (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 (44.0ms) AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-11-02 10:00:00.056156') 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 61ms (Views: 59.5ms | ActiveRecord: 0.9ms)  (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-11-02 10:00:00.007077') 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 11ms (Views: 9.3ms | 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.1ms) AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-11-02 10:00:00.022804') 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.2ms | 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]] 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 "updated_at" = '2012-11-04 10:00:00.001300', "running_view_count" = 1 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 1084ms (ActiveRecord: 0.6ms) 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 1ms (Views: 1.0ms | 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-11-02 10:00:00.003973') 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.1ms | 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.3ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = 'not_found,video', "updated_at" = '2012-11-04 10:00:00.000842' 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 "conflicting_placements_array" = '', "updated_at" = '2012-11-04 10:00:00.002396' 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.1ms) 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.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.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.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.1ms) 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, 04 Nov 2012 10:00:00 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Sun, 04 Nov 2012 10: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.1ms) 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.1ms) 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.3ms) 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.4ms)  (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.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-11-02 10:00:00.011696') 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 16ms (Views: 14.2ms | ActiveRecord: 0.7ms)  (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-11-02 10:00:00.006593') 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.0ms | 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.1ms) AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-11-02 10:00:00.008285') 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.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#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.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."id" = ? LIMIT 1 [["id", "405688915"]]  (0.1ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/placements/405688915 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.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 "updated_at" = '2012-11-04 10:00:00.000427', "fast_mode" = 't' 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 "updated_at" = '2012-11-04 10:00:00.002625', "confirmed" = 'f' 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 Nov 04 12:00:00 +0200 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-11-04 10:00:00.006771' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.006975' 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.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  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."banner_id" = 814558298 AND position >= 0) SQL (0.3ms) 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, 04 Nov 2012 10:00:00 UTC +00:00], ["name", "always_false"], ["position", 0], ["updated_at", Sun, 04 Nov 2012 10:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Nov 04 12:00:00 +0200 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-11-04 10:00:00.020533' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.020700' 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.9ms | 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.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 "updated_at" = '2012-11-04 10:00:00.000442', "fast_mode" = 't' 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 "updated_at" = '2012-11-04 10:00:00.002556', "confirmed" = 'f' 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, 04 Nov 2012 10:00:00 UTC +00:00], ["name", "raise_error"], ["position", 0], ["updated_at", Sun, 04 Nov 2012 10:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Nov 04 12:00:00 +0200 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-11-04 10:00:00.004485' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.004670' 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-11-04T12:00:00+02:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /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@global/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@global/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@global/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@global/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `each' [AdvertSelector] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.6ms | 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 Nov 04 12:00:00 +0200 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-11-02 10:00:00.021522') 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.7ms | 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.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-11-04 10:00:00.000431', "fast_mode" = 't' 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 "updated_at" = '2012-11-04 10:00:00.002542', "confirmed" = 'f' 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 "updated_at" = '2012-11-04 10:00:00.000301', "frequency" = 2 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Nov 04 12:00:00 +0200 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-11-04 10:00:00.003334' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.003518' 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) 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 Nov 07 12:00:00 +0200 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-11-07 10:00:00.017540' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.017728' 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) 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 Nov 07 12:00:00 +0200 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 2ms (Views: 1.5ms | 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.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-11-07 10:00:00.000433', "fast_mode" = 't' WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.2ms) 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 "updated_at" = '2012-11-07 10:00:00.003361', "confirmed" = 'f' 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 Nov 07 12:00:00 +0200 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-11-07 10:00:00.002948' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.003157' 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.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" = 207249520 AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/?advert_selector_force=207249520&advert_selector_force_stamp=1352044436" for 127.0.0.1 at Wed Nov 07 12:00:00 +0200 2012 Processing by ExamplesController#index as HTML Parameters: {"advert_selector_force"=>"207249520", "advert_selector_force_stamp"=>"1352044436"} [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] AdvertSelection fetching banners and placements [AdvertSelector] AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time > '2012-11-07 10:00:00.013873' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.014070' 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 8ms (Views: 7.7ms | ActiveRecord: 0.6ms) 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  (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 "updated_at" = '2012-11-07 10:00:00.000444', "fast_mode" = 't' 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 "updated_at" = '2012-11-07 10:00:00.002618', "confirmed" = 'f' 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 "updated_at" = '2012-11-07 10:00:00.000556', "confirmed" = 't' 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 Started GET "/" for 127.0.0.1 at Wed Nov 07 12:00:00 +0200 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-11-07 10:00:00.004417' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.004608' 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] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.8ms | 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" = 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 Nov 07 12:00:00 +0200 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.8ms | 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" = 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 "updated_at" = '2012-11-07 10:00:00.000438', "fast_mode" = 't' 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 "updated_at" = '2012-11-07 10:00:00.002534', "confirmed" = 'f' 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 "updated_at" = '2012-11-07 10:00:00.000461', "confirmed" = 't' 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 "conflicting_placements_array" = '', "updated_at" = '2012-11-07 10:00:00.002706' 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 "conflicting_placements_array" = '', "updated_at" = '2012-11-07 10:00:00.004114' 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 "conflicting_placements_array" = '', "updated_at" = '2012-11-07 10:00:00.005869' 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 Nov 07 12:00:00 +0200 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection fetching banners and placements [AdvertSelector] AdvertSelector::Banner Load (0.5ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time > '2012-11-07 10:00:00.009466' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.009650' 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 7ms (Views: 6.6ms | ActiveRecord: 0.7ms) 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.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 "updated_at" = '2012-11-07 10:00:00.000432', "fast_mode" = 't' 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 "updated_at" = '2012-11-07 10:00:00.002569', "confirmed" = 'f' 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 Nov 07 12:00:00 +0200 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-11-07 10:00:00.000242' 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.9ms | 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 Nov 07 12:00:00 +0200 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.6ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Wed Nov 07 12:15:00 +0200 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.7ms | 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.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-11-07 10:00:00.000442', "fast_mode" = 't' 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 "updated_at" = '2012-11-07 10:00:00.002684', "confirmed" = 'f' 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 "only_once_per_session" = 't', "updated_at" = '2012-11-07 10:00:00.000953' WHERE "advert_selector_placements"."id" = 405688915  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Wed Nov 07 12:00:00 +0200 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-11-07 10:00:00.003999' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.004182' 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.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 Started GET "/" for 127.0.0.1 at Wed Nov 07 12:00:00 +0200 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 2ms (Views: 1.5ms | 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]] 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-11-07 10:00:00.002436' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.002615' 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.6ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-11-04 15:54:25', 100, '2012-11-09 00:00:00', 't', '2012-11-04 15:54:25', 50, 814558298, 1000, 'f', 0, '2012-10-30 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-11-04 15:54:25', '2012-11-14 00:00:00', 't', '2012-11-04 15:54:25', 100, 394627963, 1000, 't', 0, '2012-11-04 00:00:00') Fixture Insert (0.1ms) 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-11-04 15:54:25', '2012-11-14 00:00:00', 'f', '2012-11-04 15:54:25', 1000, 207249520, 1000, 't', 1, '2012-11-04 00:00:00') Fixture Delete (0.3ms) 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-11-04 15:54:25', '2012-11-04 15:54:25', 960656439, 't', 394627963, '') 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-11-04 15:54:25', '2012-11-04 15:54:25', 929640376, 't', 814558298, '') 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-11-04 15:54:25', '2012-11-04 15:54:25', 281932184, 't', 207249520, '') 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-11-04 15:54:25', '2012-11-04 15:54:25', 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-11-04 15:54:25', '2012-11-04 15:54:25', '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-11-04 15:54:25', '2012-11-04 15:54:25', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-11-04 15:54:25', '2012-11-04 15:54:25', 'parade', 405688915)  (446.8ms) commit 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) 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.6ms) 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, 04 Nov 2012 10:00:00 UTC +00:00], ["name", nil], ["position", 2], ["updated_at", Sun, 04 Nov 2012 10: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, 04 Nov 2012 10:00:00 UTC +00:00], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Sun, 04 Nov 2012 10: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, 04 Nov 2012 10:00:00 UTC +00:00], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Sun, 04 Nov 2012 10: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-11-04 10:00:00.000068' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-11-04 10:00:00.000925' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.001048' 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-11-04 10:00:00.002050' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-11-04 10:00:00.002795' OR end_time IS NULL) AND (start_time < '2011-11-04 11:00:00.002911' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count)  (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.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-11-04 10:00:00.001008', "running_view_count" = 0 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 "updated_at" = '2012-11-04 10:00:00.007424', "running_view_count" = 551 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.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-11-04 10:00:00.001036', "running_view_count" = 0, "target_view_count" = 10 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 "updated_at" = '2012-11-04 10:00:00.004885', "running_view_count" = 10 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.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-11-04 10:00:00.000460', "confirmed" = 'f' 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 "updated_at" = '2012-11-04 10:00:00.002956', "confirmed" = 't' WHERE "advert_selector_banners"."id" = 814558298  (0.1ms) RELEASE SAVEPOINT active_record_1 AdvertSelector::Banner Load (0.1ms) 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.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-11-04 10:00:00.000871', "start_time" = '2012-11-04 11:00:00.000410' 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.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-11-04 10:00:00.003471', "start_time" = '2012-11-04 08:00:00.002932', "end_time" = '2012-11-04 09:00:00.003039' 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 "updated_at" = '2012-11-04 10:00:00.005268', "start_time" = NULL, "end_time" = '2012-11-04 11:00:00.004868' 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.4ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-11-04 10:00:00.000941', "start_time" = '2012-11-03 22:00:00.000000', "target_view_count" = 100, "end_time" = '2012-11-14 00:00:00.000000' 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 "updated_at" = '2012-11-04 10:00:00.003384', "running_view_count" = 0 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.1ms) 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", 814558298]] 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", 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.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-11-04 17:00:00.001699', "start_time" = '2012-11-04 16:00:00.000897' 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.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-11-14 00:00:00 UTC", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-11-04 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, 04 Nov 2012 10:00:00 UTC +00:00], ["end_time", Wed, 14 Nov 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, 04 Nov 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Sun, 04 Nov 2012 10: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.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]]  (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.3ms) 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.9ms)  (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 (44.5ms) AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-11-02 10:00:00.057035') 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 62ms (Views: 60.2ms | 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-11-02 10:00:00.007011') 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 11ms (Views: 9.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#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.5ms) AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-11-02 10:00:00.023412') 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.6ms | 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.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-11-04 10:00:00.001266', "running_view_count" = 1 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.1ms) 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 1119ms (ActiveRecord: 0.5ms) AdvertSelector::Banner Load (0.1ms) 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 1ms (Views: 1.0ms | 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-11-02 10:00:00.004009') 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.0ms | 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.3ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-11-04 10:00:00.000880', "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-11-04 10:00:00.002455', "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.1ms) 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.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#create as HTML Parameters: {"placement"=>{"name"=>"new placement"}}  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) 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, 04 Nov 2012 10:00:00 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Sun, 04 Nov 2012 10: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.1ms) 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.3ms) 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.4ms)  (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.1ms) 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 (6.3ms) AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-11-02 10:00:00.012151') 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: 14.1ms | 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-11-02 10:00:00.006471') 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.0ms | 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-11-02 10:00:00.008407') 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.0ms | 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.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 "updated_at" = '2012-11-04 10:00:00.000397', "fast_mode" = 't' 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 "updated_at" = '2012-11-04 10:00:00.002396', "confirmed" = 'f' 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 Nov 04 12:00:00 +0200 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-11-04 10:00:00.006622' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.006824' 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: 8.9ms | 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.3ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."banner_id" = 814558298 AND position >= 0) SQL (0.3ms) 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, 04 Nov 2012 10:00:00 UTC +00:00], ["name", "always_false"], ["position", 0], ["updated_at", Sun, 04 Nov 2012 10:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Nov 04 12:00:00 +0200 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-11-04 10:00:00.019857' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.020023' 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: 4.0ms | 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 "updated_at" = '2012-11-04 10:00:00.000454', "fast_mode" = 't' 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 "updated_at" = '2012-11-04 10:00:00.002797', "confirmed" = 'f' 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.3ms) 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, 04 Nov 2012 10:00:00 UTC +00:00], ["name", "raise_error"], ["position", 0], ["updated_at", Sun, 04 Nov 2012 10:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Nov 04 12:00:00 +0200 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-11-04 10:00:00.004416' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.004602' 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-11-04T12:00:00+02:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /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:55:in `send' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:55:in `advert_selector_banner_try' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/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@global/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@global/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:51:in `advert_selector_banner_try' /home/ohu/koodi/gems/advert_selector/app/helpers/advert_selector/application_helper.rb:22:in `advert_selector_initialize' /home/ohu/.rvm/gems/ree-1.8.7-2011.03@global/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 Nov 04 12:00:00 +0200 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-11-02 10:00:00.021236') 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.7ms | ActiveRecord: 0.4ms)  (0.2ms) 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 "updated_at" = '2012-11-04 10:00:00.000420', "fast_mode" = 't' 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 "updated_at" = '2012-11-04 10:00:00.002505', "confirmed" = 'f' 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-11-04 10:00:00.000296' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Nov 04 12:00:00 +0200 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-11-04 10:00:00.003233' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.003409' 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.6ms | 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 Nov 07 12:00:00 +0200 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-11-07 10:00:00.017014' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.017232' 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.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 "/" for 127.0.0.1 at Wed Nov 07 12:00:00 +0200 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 2ms (Views: 1.5ms | 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 "updated_at" = '2012-11-07 10:00:00.000417', "fast_mode" = 't' 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 "updated_at" = '2012-11-07 10:00:00.002560', "confirmed" = 'f' 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 Nov 07 12:00:00 +0200 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-11-07 10:00:00.002352' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.002529' 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.3ms | 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" = 207249520 AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/?advert_selector_force=207249520&advert_selector_force_stamp=1352044465" for 127.0.0.1 at Wed Nov 07 12:00:00 +0200 2012 Processing by ExamplesController#index as HTML Parameters: {"advert_selector_force"=>"207249520", "advert_selector_force_stamp"=>"1352044465"} [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-11-07 10:00:26.617264' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:26.617455' 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 26610ms (Views: 26609.3ms | ActiveRecord: 0.7ms) 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.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-11-07 10:00:00.000425', "fast_mode" = 't' 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 "updated_at" = '2012-11-07 10:00:00.002463', "confirmed" = 'f' 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 "updated_at" = '2012-11-07 10:00:00.000462', "confirmed" = 't' 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 Started GET "/" for 127.0.0.1 at Wed Nov 07 12:00:00 +0200 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-11-07 10:00:00.006114' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.006720' 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] AdvertSelection finished Completed 200 OK in 10ms (Views: 9.0ms | 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" = 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 Nov 07 12:00:00 +0200 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: 3.1ms | 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" = 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 "updated_at" = '2012-11-07 10:00:00.000579', "fast_mode" = 't' 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 "updated_at" = '2012-11-07 10:00:00.002768', "confirmed" = 'f' 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 "updated_at" = '2012-11-07 10:00:00.000464', "confirmed" = 't' 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.1ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-11-07 10:00:00.002894', "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-11-07 10:00:00.004244', "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-11-07 10:00:00.005931', "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 Nov 07 12:00:00 +0200 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-11-07 10:00:00.009378' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.009591' 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 7ms (Views: 6.6ms | 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" = 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 "updated_at" = '2012-11-07 10:00:00.000423', "fast_mode" = 't' 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 "updated_at" = '2012-11-07 10:00:00.002453', "confirmed" = 'f' 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 Nov 07 12:00:00 +0200 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-11-07 10:00:00.000268' 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.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 Started GET "/" for 127.0.0.1 at Wed Nov 07 12:00:00 +0200 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.6ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Wed Nov 07 12:15:00 +0200 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.5ms | 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.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-11-07 10:00:00.000411', "fast_mode" = 't' 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 "updated_at" = '2012-11-07 10:00:00.002451', "confirmed" = 'f' 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-11-07 10:00:00.000916', "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 Nov 07 12:00:00 +0200 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-11-07 10:00:00.004003' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.004179' 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.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 "/" for 127.0.0.1 at Wed Nov 07 12:00:00 +0200 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]] 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-11-07 10:00:00.002345' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.002531' 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.5ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-11-04 15:55:00', 100, '2012-11-09 00:00:00', 't', '2012-11-04 15:55:00', 50, 814558298, 1000, 'f', 0, '2012-10-30 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-11-04 15:55:00', '2012-11-14 00:00:00', 't', '2012-11-04 15:55:00', 100, 394627963, 1000, 't', 0, '2012-11-04 00:00:00') Fixture Insert (0.1ms) 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-11-04 15:55:00', '2012-11-14 00:00:00', 'f', '2012-11-04 15:55:00', 1000, 207249520, 1000, 't', 1, '2012-11-04 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-11-04 15:55:00', '2012-11-04 15:55:00', 960656439, 't', 394627963, '') 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-11-04 15:55:00', '2012-11-04 15:55:00', 929640376, 't', 814558298, '') 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-11-04 15:55:00', '2012-11-04 15:55:00', 281932184, 't', 207249520, '') 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-11-04 15:55:00', '2012-11-04 15:55:00', 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-11-04 15:55:00', '2012-11-04 15:55:00', '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-11-04 15:55:00', '2012-11-04 15:55:00', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-11-04 15:55:00', '2012-11-04 15:55:00', 'parade', 405688915)  (70.6ms) 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.2ms) 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.6ms) 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, 04 Nov 2012 10:00:00 UTC +00:00], ["name", nil], ["position", 2], ["updated_at", Sun, 04 Nov 2012 10: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.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", true], ["created_at", Sun, 04 Nov 2012 10:00:00 UTC +00:00], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Sun, 04 Nov 2012 10:00:00 UTC +00:00]] 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.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, 04 Nov 2012 10:00:00 UTC +00:00], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Sun, 04 Nov 2012 10: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.1ms) 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.2ms) 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.1ms) 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-11-04 10:00:00.000143' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-11-04 10:00:00.001430' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.001605' 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-11-04 10:00:00.002739' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-11-04 10:00:00.003660' OR end_time IS NULL) AND (start_time < '2011-11-04 11:00:00.003797' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count)  (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) 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.4ms) UPDATE "advert_selector_banners" SET "running_view_count" = 0, "updated_at" = '2012-11-04 10:00:00.001100' 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.1ms) 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-11-04 10:00:00.008104' 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.3ms) UPDATE "advert_selector_banners" SET "target_view_count" = 10, "running_view_count" = 0, "updated_at" = '2012-11-04 10:00:00.001024' 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-11-04 10:00:00.004590' 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 "updated_at" = '2012-11-04 10:00:00.000404', "confirmed" = 'f' 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 "updated_at" = '2012-11-04 10:00:00.002691', "confirmed" = 't' 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.3ms) UPDATE "advert_selector_banners" SET "start_time" = '2012-11-04 11:00:00.000393', "updated_at" = '2012-11-04 10:00:00.000829' 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-11-04 08:00:00.002624', "end_time" = '2012-11-04 09:00:00.002700', "updated_at" = '2012-11-04 10:00:00.003047' 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-11-04 11:00:00.004147', "updated_at" = '2012-11-04 10:00:00.004471' 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 "target_view_count" = 100, "start_time" = '2012-11-03 22:00:00.000000', "end_time" = '2012-11-14 00:00:00.000000', "updated_at" = '2012-11-04 10:00:00.000873' 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" = 0, "updated_at" = '2012-11-04 10:00:00.003206' 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]] 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 "start_time" = '2012-11-04 16:00:00.000851', "updated_at" = '2012-11-04 17:00:00.001636' 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.1ms) rollback transaction  (0.1ms) 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-11-14 00:00:00 UTC", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-11-04 00:00:00 UTC"}}  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) 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, 04 Nov 2012 10:00:00 UTC +00:00], ["end_time", Wed, 14 Nov 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, 04 Nov 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Sun, 04 Nov 2012 10: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 6ms (ActiveRecord: 1.0ms)  (0.1ms) 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.1ms) SELECT COUNT(*) FROM "advert_selector_banners" Processing by AdvertSelector::BannersController#destroy 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"]]  (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.4ms) 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.3ms) 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 5ms (ActiveRecord: 0.9ms)  (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 (44.3ms) AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-11-02 10:00:00.056509') 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 61ms (Views: 59.4ms | 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-11-02 10:00:00.007088') 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.5ms) AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-11-02 10:00:00.023146') 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.5ms | 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.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  (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-11-04 10:00:00.001369' 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.3ms) 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 1105ms (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.2ms) rollback transaction  (0.1ms) 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) 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 2ms (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-11-02 10:00:00.004179') 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.3ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = 'not_found,video', "updated_at" = '2012-11-04 10:00:00.000825' 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 "conflicting_placements_array" = '', "updated_at" = '2012-11-04 10:00:00.002348' 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.1ms) 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.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.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.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#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, 04 Nov 2012 10:00:00 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Sun, 04 Nov 2012 10: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.1ms) SELECT COUNT(*) FROM "advert_selector_placements"  Processing by AdvertSelector::PlacementsController#destroy as HTML Parameters: {"id"=>"405688915"} AdvertSelector::Placement Load (0.1ms) 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.3ms) 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.4ms)  (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.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-11-02 10:00:00.011537') 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.4ms | 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.1ms) 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-11-02 10:00:00.006794') 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-11-02 10:00:00.008466') 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.2ms) 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: 10.9ms | 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#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.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-11-04 10:00:00.000403' 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 "updated_at" = '2012-11-04 10:00:00.002448', "confirmed" = 'f' 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 Nov 04 12:00:00 +0200 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-11-04 10:00:00.006861' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.007053' 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.0ms | 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.3ms) 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, 04 Nov 2012 10:00:00 UTC +00:00], ["name", "always_false"], ["position", 0], ["updated_at", Sun, 04 Nov 2012 10:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Nov 04 12:00:00 +0200 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-11-04 10:00:00.020301' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.020477' 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: 4.0ms | 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.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-11-04 10:00:00.000431' 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 "updated_at" = '2012-11-04 10:00:00.002619', "confirmed" = 'f' 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, 04 Nov 2012 10:00:00 UTC +00:00], ["name", "raise_error"], ["position", 0], ["updated_at", Sun, 04 Nov 2012 10:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Nov 04 12:00:00 +0200 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-11-04 10:00:00.004348' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.004531' 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-11-04T12:00:00+02:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /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@global/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@global/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@global/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@global/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `each' [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 "/advert_selector/placements" for 127.0.0.1 at Sun Nov 04 12:00:00 +0200 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-11-02 10:00:00.020895') 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.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-11-04 10:00:00.000421' 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 "updated_at" = '2012-11-04 10:00:00.002501', "confirmed" = 'f' 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-11-04 10:00:00.000290' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Nov 04 12:00:00 +0200 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-11-04 10:00:00.003344' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.003526' 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.6ms | 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 Nov 07 12:00:00 +0200 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-11-07 10:00:00.017695' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.017893' 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.6ms | 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 Nov 07 12:00:00 +0200 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 2ms (Views: 1.5ms | 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-11-07 10:00:00.000430' 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 "updated_at" = '2012-11-07 10:00:00.002453', "confirmed" = 'f' 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 Nov 07 12:00:00 +0200 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-11-07 10:00:00.002303' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.002478' 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.3ms | 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" = 207249520 AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/?advert_selector_force=207249520&advert_selector_force_stamp=1352044500" for 127.0.0.1 at Wed Nov 07 12:00:00 +0200 2012 Processing by ExamplesController#index as HTML Parameters: {"advert_selector_force"=>"207249520", "advert_selector_force_stamp"=>"1352044500"} [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-11-07 10:00:00.015870' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.016086' 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 9ms (Views: 7.9ms | 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.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-11-07 10:00:00.000427' 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 "updated_at" = '2012-11-07 10:00:00.002518', "confirmed" = 'f' 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 "updated_at" = '2012-11-07 10:00:00.000447', "confirmed" = 't' 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 Started GET "/" for 127.0.0.1 at Wed Nov 07 12:00:00 +0200 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-11-07 10:00:00.004018' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.004207' 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] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.7ms | 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" = 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 Nov 07 12:00:00 +0200 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.8ms | 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" = 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-11-07 10:00:00.000732' 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 "updated_at" = '2012-11-07 10:00:00.002809', "confirmed" = 'f' 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 "updated_at" = '2012-11-07 10:00:00.000477', "confirmed" = 't' 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.1ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = '', "updated_at" = '2012-11-07 10:00:00.002739' 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.0ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = '', "updated_at" = '2012-11-07 10:00:00.004070' 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 "conflicting_placements_array" = '', "updated_at" = '2012-11-07 10:00:00.005723' 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 Nov 07 12:00:00 +0200 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-11-07 10:00:00.009201' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.009390' 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 parade_banner in placement Parade [AdvertSelector] Showing banner Coke in placement Leaderboard [AdvertSelector] AdvertSelection finished Completed 200 OK in 7ms (Views: 6.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" = 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-11-07 10:00:00.000515' 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 "updated_at" = '2012-11-07 10:00:00.002611', "confirmed" = 'f' 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 Nov 07 12:00:00 +0200 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-11-07 10:00:00.000246' 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.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 Started GET "/" for 127.0.0.1 at Wed Nov 07 12:00:00 +0200 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.6ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Wed Nov 07 12:15:00 +0200 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.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-11-07 10:00:00.000409' 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 "updated_at" = '2012-11-07 10:00:00.002490', "confirmed" = 'f' 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 "only_once_per_session" = 't', "updated_at" = '2012-11-07 10:00:00.000962' WHERE "advert_selector_placements"."id" = 405688915  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Wed Nov 07 12:00:00 +0200 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-11-07 10:00:00.003966' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.004160' 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.3ms | 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 Nov 07 12:00:00 +0200 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 2ms (Views: 1.5ms | 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]] 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-11-07 10:00:00.002305' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.002490' 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 Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-11-04 15:55:07', 100, '2012-11-09 00:00:00', 't', '2012-11-04 15:55:07', 50, 814558298, 1000, 'f', 0, '2012-10-30 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-11-04 15:55:07', '2012-11-14 00:00:00', 't', '2012-11-04 15:55:07', 100, 394627963, 1000, 't', 0, '2012-11-04 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-11-04 15:55:07', '2012-11-14 00:00:00', 'f', '2012-11-04 15:55:07', 1000, 207249520, 1000, 't', 1, '2012-11-04 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-11-04 15:55:07', '2012-11-04 15:55:07', 960656439, 't', 394627963, '') 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-11-04 15:55:07', '2012-11-04 15:55:07', 929640376, 't', 814558298, '') 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-11-04 15:55:07', '2012-11-04 15:55:07', 281932184, 't', 207249520, '') 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-11-04 15:55:07', '2012-11-04 15:55:07', 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-11-04 15:55:07', '2012-11-04 15:55:07', '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-11-04 15:55:07', '2012-11-04 15:55:07', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-11-04 15:55:07', '2012-11-04 15:55:07', 'parade', 405688915)  (432.3ms) 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.6ms) 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, 04 Nov 2012 10:00:00 UTC +00:00], ["name", nil], ["position", 2], ["updated_at", Sun, 04 Nov 2012 10: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, 04 Nov 2012 10:00:00 UTC +00:00], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Sun, 04 Nov 2012 10: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, 04 Nov 2012 10:00:00 UTC +00:00], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Sun, 04 Nov 2012 10: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-11-04 10:00:00.000069' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-11-04 10:00:00.000910' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.001034' 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-11-04 10:00:00.001943' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-11-04 10:00:00.002660' OR end_time IS NULL) AND (start_time < '2011-11-04 11:00:00.002774' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count)  (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) 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 "updated_at" = '2012-11-04 10:00:00.001017', "running_view_count" = 0 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 "updated_at" = '2012-11-04 10:00:00.007445', "running_view_count" = 551 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 "updated_at" = '2012-11-04 10:00:00.000926', "running_view_count" = 0, "target_view_count" = 10 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 "updated_at" = '2012-11-04 10:00:00.004343', "running_view_count" = 10 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.1ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-11-04 10:00:00.000555', "confirmed" = 'f' 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 "updated_at" = '2012-11-04 10:00:00.002626', "confirmed" = 't' 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-11-04 11:00:00.000360', "updated_at" = '2012-11-04 10:00:00.000779' 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-11-04 08:00:00.002457', "updated_at" = '2012-11-04 10:00:00.002867', "end_time" = '2012-11-04 09:00:00.002529' 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, "updated_at" = '2012-11-04 10:00:00.004239', "end_time" = '2012-11-04 11:00:00.003924' 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.4ms) UPDATE "advert_selector_banners" SET "start_time" = '2012-11-03 22:00:00.000000', "updated_at" = '2012-11-04 10:00:00.000879', "end_time" = '2012-11-14 00:00:00.000000', "target_view_count" = 100 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 "updated_at" = '2012-11-04 10:00:00.003158', "running_view_count" = 0 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]] 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 "start_time" = '2012-11-04 16:00:00.000908', "updated_at" = '2012-11-04 17:00:00.001729' 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.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-11-14 00:00:00 UTC", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-11-04 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, 04 Nov 2012 10:00:00 UTC +00:00], ["end_time", Wed, 14 Nov 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, 04 Nov 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Sun, 04 Nov 2012 10: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.8ms)  (0.1ms) 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.1ms) 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.9ms)  (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 (44.6ms) AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-11-02 10:00:00.056844') 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 61ms (Views: 59.9ms | 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-11-02 10:00:00.007185') 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 11ms (Views: 9.5ms | 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]] 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 (19.6ms) AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-11-02 10:00:00.024502') 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 28ms (Views: 26.7ms | 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.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  (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 "updated_at" = '2012-11-04 10:00:00.001197', "running_view_count" = 1 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.1ms) 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.1ms) 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 1116ms (ActiveRecord: 0.3ms) AdvertSelector::Banner Load (0.1ms) 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 1ms (Views: 1.0ms | 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-11-02 10:00:00.004062') 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.0ms | 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.1ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = 'not_found,video', "updated_at" = '2012-11-04 10:00:00.001167' 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.2ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = '', "updated_at" = '2012-11-04 10:00:00.003912' 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.1ms) SELECT "advert_selector_placements".* FROM "advert_selector_placements" WHERE "advert_selector_placements"."name" = 'video' LIMIT 1  (0.1ms) RELEASE SAVEPOINT active_record_1 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.2ms) 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) 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", 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, 04 Nov 2012 10:00:00 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Sun, 04 Nov 2012 10: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.1ms) 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 (6.0ms) AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-11-02 10:00:00.011567') 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-11-02 10:00:00.006463') 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: 8.7ms | 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.3ms) AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-11-02 10:00:00.008428') 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.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#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-11-04 10:00:00.000380' 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 "updated_at" = '2012-11-04 10:00:00.002312', "confirmed" = 'f' 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 Nov 04 12:00:00 +0200 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-11-04 10:00:00.006509' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.006708' 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 9ms (Views: 8.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  (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, 04 Nov 2012 10:00:00 UTC +00:00], ["name", "always_false"], ["position", 0], ["updated_at", Sun, 04 Nov 2012 10:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Nov 04 12:00:00 +0200 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-11-04 10:00:00.019524' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.019696' 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.9ms | 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.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-11-04 10:00:00.000400' 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 "updated_at" = '2012-11-04 10:00:00.002291', "confirmed" = 'f' 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, 04 Nov 2012 10:00:00 UTC +00:00], ["name", "raise_error"], ["position", 0], ["updated_at", Sun, 04 Nov 2012 10:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Nov 04 12:00:00 +0200 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-11-04 10:00:00.004130' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.004331' 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-11-04T12:00:00+02:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /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@global/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@global/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@global/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@global/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `each' [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 "/advert_selector/placements" for 127.0.0.1 at Sun Nov 04 12:00:00 +0200 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-11-02 10:00:00.021149') 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.6ms | ActiveRecord: 0.4ms)  (0.2ms) 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-11-04 10:00:00.000408' 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 "updated_at" = '2012-11-04 10:00:00.002551', "confirmed" = 'f' 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-11-04 10:00:00.000290' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Nov 04 12:00:00 +0200 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-11-04 10:00:00.003193' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.003375' 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 Nov 07 12:00:00 +0200 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-11-07 10:00:00.016795' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.016982' 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.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 "/" for 127.0.0.1 at Wed Nov 07 12:00:00 +0200 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 2ms (Views: 1.5ms | 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-11-07 10: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 "updated_at" = '2012-11-07 10:00:00.002345', "confirmed" = 'f' 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 Nov 07 12:00:00 +0200 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-11-07 10:00:00.002296' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.002479' 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.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 Started GET "/?advert_selector_force=207249520&advert_selector_force_stamp=1352044507" for 127.0.0.1 at Wed Nov 07 12:00:00 +0200 2012 Processing by ExamplesController#index as HTML Parameters: {"advert_selector_force"=>"207249520", "advert_selector_force_stamp"=>"1352044507"} [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-11-07 10:00:00.015652' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.015829' 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 9ms (Views: 7.8ms | 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-11-07 10:00:00.000413' 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 "updated_at" = '2012-11-07 10:00:00.002375', "confirmed" = 'f' 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 "updated_at" = '2012-11-07 10:00:00.000451', "confirmed" = 't' 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 Started GET "/" for 127.0.0.1 at Wed Nov 07 12:00:00 +0200 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-11-07 10:00:00.003919' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.004097' 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] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.8ms | 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" = 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 Nov 07 12:00:00 +0200 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.8ms | 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" = 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.1ms) SAVEPOINT active_record_1  (0.9ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-11-07 10:00:00.001788' WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.3ms) 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.1ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-11-07 10:00:00.009196', "confirmed" = 'f' 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 "updated_at" = '2012-11-07 10:00:00.000472', "confirmed" = 't' 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.1ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = '', "updated_at" = '2012-11-07 10:00:00.002731' 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.0ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = '', "updated_at" = '2012-11-07 10:00:00.004020' 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 "conflicting_placements_array" = '', "updated_at" = '2012-11-07 10:00:00.005605' 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 Nov 07 12:00:00 +0200 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-11-07 10:00:00.009114' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.009310' 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 7ms (Views: 6.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" = 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.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-11-07 10:00:00.000392' 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 "updated_at" = '2012-11-07 10:00:00.002276', "confirmed" = 'f' 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 Nov 07 12:00:00 +0200 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-11-07 10:00:00.000251' 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 Nov 07 12:00:00 +0200 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.4ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Wed Nov 07 12:15:00 +0200 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.5ms | 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.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-11-07 10:00:00.000414' 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 "updated_at" = '2012-11-07 10:00:00.002484', "confirmed" = 'f' 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.2ms) UPDATE "advert_selector_placements" SET "only_once_per_session" = 't', "updated_at" = '2012-11-07 10:00:00.001026' WHERE "advert_selector_placements"."id" = 405688915  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Wed Nov 07 12:00:00 +0200 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-11-07 10:00:00.004237' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.004440' 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.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 "/" for 127.0.0.1 at Wed Nov 07 12:00:00 +0200 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 2ms (Views: 1.5ms | 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]] 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-11-07 10:00:00.002481' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.002681' 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.7ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-11-04 15:59:16', 100, '2012-11-09 00:00:00', 't', '2012-11-04 15:59:16', 50, 814558298, 1000, 'f', 0, '2012-10-30 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-11-04 15:59:16', '2012-11-14 00:00:00', 't', '2012-11-04 15:59:16', 100, 394627963, 1000, 't', 0, '2012-11-04 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-11-04 15:59:16', '2012-11-14 00:00:00', 'f', '2012-11-04 15:59:16', 1000, 207249520, 1000, 't', 1, '2012-11-04 00:00:00') Fixture Delete (0.3ms) 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-11-04 15:59:16', '2012-11-04 15:59:16', 960656439, 't', 394627963, '') 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-11-04 15:59:16', '2012-11-04 15:59:16', 929640376, 't', 814558298, '') 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-11-04 15:59:16', '2012-11-04 15:59:16', 281932184, 't', 207249520, '') 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-11-04 15:59:16', '2012-11-04 15:59:16', 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-11-04 15:59:16', '2012-11-04 15:59:16', 'leaderboard,video', 718799085) Fixture Insert (0.1ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "only_once_per_session", "id") VALUES ('Video', '2012-11-04 15:59:16', '2012-11-04 15:59:16', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-11-04 15:59:16', '2012-11-04 15:59:16', 'parade', 405688915)  (37.2ms) commit 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.2ms) 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.6ms) 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, 04 Nov 2012 10:00:00 UTC +00:00], ["name", nil], ["position", 2], ["updated_at", Sun, 04 Nov 2012 10: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, 04 Nov 2012 10:00:00 UTC +00:00], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Sun, 04 Nov 2012 10: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, 04 Nov 2012 10:00:00 UTC +00:00], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Sun, 04 Nov 2012 10: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-11-04 10:00:00.000065' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-11-04 10:00:00.001034' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.001175' 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-11-04 10:00:00.002129' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-11-04 10:00:00.002856' OR end_time IS NULL) AND (start_time < '2011-11-04 11:00:00.002976' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count)  (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) 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-11-04 10:00:00.001034' 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-11-04 10:00:00.007468' 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-11-04 10:00:00.000946' 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-11-04 10:00:00.004592' 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.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-11-04 10:00:00.000417', "confirmed" = 'f' 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 "updated_at" = '2012-11-04 10:00:00.002604', "confirmed" = 't' 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.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-11-04 10:00:00.000790', "start_time" = '2012-11-04 11:00:00.000364' 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 "updated_at" = '2012-11-04 10:00:00.002951', "end_time" = '2012-11-04 09:00:00.002554', "start_time" = '2012-11-04 08:00:00.002481' 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 "updated_at" = '2012-11-04 10:00:00.004447', "end_time" = '2012-11-04 11:00:00.004122', "start_time" = NULL 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 "target_view_count" = 100, "updated_at" = '2012-11-04 10:00:00.000908', "end_time" = '2012-11-14 00:00:00.000000', "start_time" = '2012-11-03 22:00:00.000000' 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" = 0, "updated_at" = '2012-11-04 10:00:00.003224' 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.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", 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.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-11-04 17:00:00.001915', "start_time" = '2012-11-04 16:00:00.001068' 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.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-11-14 00:00:00 UTC", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-11-04 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, 04 Nov 2012 10:00:00 UTC +00:00], ["end_time", Wed, 14 Nov 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, 04 Nov 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Sun, 04 Nov 2012 10: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.8ms)  (0.1ms) 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.1ms) 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 5ms (ActiveRecord: 0.9ms)  (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.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]] 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 (48.6ms) AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-11-02 10:00:00.061531') 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 66ms (Views: 64.6ms | ActiveRecord: 0.9ms)  (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-11-02 10:00:00.007430') 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 11ms (Views: 9.8ms | 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 (19.9ms) AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-11-02 10:00:00.024767') 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 29ms (Views: 27.5ms | 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]] 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.3ms) UPDATE "advert_selector_banners" SET "running_view_count" = 1, "updated_at" = '2012-11-04 10:00:00.001325' 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 1614ms (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.2ms) rollback transaction  (0.1ms) 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.3ms | 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.1ms) 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 2ms (ActiveRecord: 0.0ms)  (0.2ms) rollback transaction  (0.2ms) 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-11-02 10:00:00.004200') 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.1ms | 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.3ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-11-04 10:00:00.000773', "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-11-04 10:00:00.002220', "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.1ms) 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.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.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#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, 04 Nov 2012 10:00:00 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Sun, 04 Nov 2012 10: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.1ms) 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.3ms) 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.4ms)  (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.8ms) AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-11-02 10:00:00.011281') 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.5ms | 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-11-02 10:00:00.006794') 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.0ms | 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.1ms) 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.3ms) AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-11-02 10:00:00.008562') 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.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#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.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 "updated_at" = '2012-11-04 10:00:00.000403', "fast_mode" = 't' 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 "updated_at" = '2012-11-04 10:00:00.002543', "confirmed" = 'f' 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 Nov 04 12:00:00 +0200 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-11-04 10:00:00.006513' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.006720' 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 9ms (Views: 8.6ms | 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, 04 Nov 2012 10:00:00 UTC +00:00], ["name", "always_false"], ["position", 0], ["updated_at", Sun, 04 Nov 2012 10:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Nov 04 12:00:00 +0200 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-11-04 10:00:00.019501' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.019669' 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 5ms (Views: 4.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.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 "updated_at" = '2012-11-04 10:00:00.000407', "fast_mode" = 't' 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 "updated_at" = '2012-11-04 10:00:00.002375', "confirmed" = 'f' 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, 04 Nov 2012 10:00:00 UTC +00:00], ["name", "raise_error"], ["position", 0], ["updated_at", Sun, 04 Nov 2012 10:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Nov 04 12:00:00 +0200 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-11-04 10:00:00.004256' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.004454' 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-11-04T12:00:00+02:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /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@global/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@global/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@global/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@global/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `each' [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 "/advert_selector/placements" for 127.0.0.1 at Sun Nov 04 12:00:00 +0200 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-11-02 10:00:00.021272') 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: 14.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]]  (0.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-11-04 10:00:00.000395', "fast_mode" = 't' 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 "updated_at" = '2012-11-04 10:00:00.002398', "confirmed" = 'f' 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-11-04 10:00:00.000305' WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Nov 04 12:00:00 +0200 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-11-04 10:00:00.003864' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.004079' 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 7ms (Views: 6.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 Started GET "/" for 127.0.0.1 at Wed Nov 07 12:00:00 +0200 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-11-07 10:00:00.018443' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.018629' 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.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 "/" for 127.0.0.1 at Wed Nov 07 12:00:00 +0200 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 2ms (Views: 1.5ms | 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.2ms) 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 "updated_at" = '2012-11-07 10:00:00.000396', "fast_mode" = 't' 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 "updated_at" = '2012-11-07 10:00:00.002323', "confirmed" = 'f' 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 Nov 07 12:00:00 +0200 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-11-07 10:00:00.002292' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.002460' 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.3ms | 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" = 207249520 AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/?advert_selector_force=207249520&advert_selector_force_stamp=1352044756" for 127.0.0.1 at Wed Nov 07 12:00:00 +0200 2012 Processing by ExamplesController#index as HTML Parameters: {"advert_selector_force"=>"207249520", "advert_selector_force_stamp"=>"1352044756"} [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-11-07 10:00:00.015876' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.016058' 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 9ms (Views: 8.2ms | 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 "updated_at" = '2012-11-07 10:00:00.000390', "fast_mode" = 't' 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 "updated_at" = '2012-11-07 10:00:00.002359', "confirmed" = 'f' 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 "updated_at" = '2012-11-07 10:00:00.000412', "confirmed" = 't' 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 Started GET "/" for 127.0.0.1 at Wed Nov 07 12:00:00 +0200 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-11-07 10:00:00.003970' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.004151' 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] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.6ms | 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" = 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 Nov 07 12:00:00 +0200 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.8ms | 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" = 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.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-11-07 10:00:00.000696', "fast_mode" = 't' 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 "updated_at" = '2012-11-07 10:00:00.002685', "confirmed" = 'f' 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 "updated_at" = '2012-11-07 10:00:00.000434', "confirmed" = 't' 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.1ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-11-07 10:00:00.002531', "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-11-07 10:00:00.003749', "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-11-07 10:00:00.005512', "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 Nov 07 12:00:00 +0200 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-11-07 10:00:00.009574' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.009799' 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.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 "updated_at" = '2012-11-07 10:00:00.000422', "fast_mode" = 't' 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 "updated_at" = '2012-11-07 10:00:00.002546', "confirmed" = 'f' 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 Nov 07 12:00:00 +0200 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-11-07 10:00:00.000245' 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 6ms (Views: 5.0ms | 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" = 814558298 AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Wed Nov 07 12:00:00 +0200 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.6ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Wed Nov 07 12:15:00 +0200 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.7ms | 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.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-11-07 10:00:00.000411', "fast_mode" = 't' 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 "updated_at" = '2012-11-07 10:00:00.002506', "confirmed" = 'f' 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.2ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-11-07 10:00:00.001080', "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 Nov 07 12:00:00 +0200 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-11-07 10:00:00.004212' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.004449' 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.6ms | 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 Nov 07 12:00:00 +0200 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 2ms (Views: 1.5ms | 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]] 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-11-07 10:00:00.002408' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.002600' 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.7ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-11-04 16:01:22', 100, '2012-11-09 00:00:00', 't', '2012-11-04 16:01:22', 50, 814558298, 1000, 'f', 0, '2012-10-30 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-11-04 16:01:22', '2012-11-14 00:00:00', 't', '2012-11-04 16:01:22', 100, 394627963, 1000, 't', 0, '2012-11-04 00:00:00') Fixture Insert (0.1ms) 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-11-04 16:01:22', '2012-11-14 00:00:00', 'f', '2012-11-04 16:01:22', 1000, 207249520, 1000, 't', 1, '2012-11-04 00:00:00') Fixture Delete (0.3ms) 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-11-04 16:01:22', '2012-11-04 16:01:22', 960656439, 't', 394627963, '') 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-11-04 16:01:22', '2012-11-04 16:01:22', 929640376, 't', 814558298, '') 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-11-04 16:01:22', '2012-11-04 16:01:22', 281932184, 't', 207249520, '') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "id", "content_for", "banner_id", "content") VALUES ('request_params_include?', '2012-11-04 16:01:22', '2012-11-04 16:01:22', 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-11-04 16:01:22', '2012-11-04 16:01:22', '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-11-04 16:01:22', '2012-11-04 16:01:22', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-11-04 16:01:22', '2012-11-04 16:01:22', 'parade', 405688915)  (45.9ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.3ms) 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.6ms) 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, 04 Nov 2012 10:00:00 UTC +00:00], ["name", nil], ["position", 2], ["updated_at", Sun, 04 Nov 2012 10: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, 04 Nov 2012 10:00:00 UTC +00:00], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Sun, 04 Nov 2012 10: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, 04 Nov 2012 10:00:00 UTC +00:00], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Sun, 04 Nov 2012 10: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-11-04 10:00:00.000067' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-11-04 10:00:00.000894' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.001014' 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-11-04 10:00:00.001902' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-11-04 10:00:00.002617' OR end_time IS NULL) AND (start_time < '2011-11-04 11:00:00.002726' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count)  (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) 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.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.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-11-04 10:00:00.000909', "running_view_count" = 0 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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 814558298]]  (0.1ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-11-04 10:00:00.007389', "running_view_count" = 551 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.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-11-04 10:00:00.000918', "running_view_count" = 0, "target_view_count" = 10 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 "updated_at" = '2012-11-04 10:00:00.004299', "running_view_count" = 10 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.1ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-11-04 10:00:00.000648', "confirmed" = 'f' 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 "updated_at" = '2012-11-04 10:00:00.003790', "confirmed" = 't' 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.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-11-04 10:00:00.000812', "start_time" = '2012-11-04 11:00:00.000382' 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 "updated_at" = '2012-11-04 10:00:00.002915', "start_time" = '2012-11-04 08:00:00.002495', "end_time" = '2012-11-04 09:00:00.002569' 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 "updated_at" = '2012-11-04 10:00:00.004414', "start_time" = NULL, "end_time" = '2012-11-04 11:00:00.004070' 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 "updated_at" = '2012-11-04 10:00:00.000881', "start_time" = '2012-11-03 22:00:00.000000', "target_view_count" = 100, "end_time" = '2012-11-14 00:00:00.000000' 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 "updated_at" = '2012-11-04 10:00:00.002989', "running_view_count" = 0 WHERE "advert_selector_banners"."id" = 814558298  (0.1ms) 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.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", 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.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-11-04 17:00:00.001683', "start_time" = '2012-11-04 16:00:00.000851' 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.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-11-14 00:00:00 UTC", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-11-04 00:00:00 UTC"}}  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) 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, 04 Nov 2012 10:00:00 UTC +00:00], ["end_time", Wed, 14 Nov 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, 04 Nov 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Sun, 04 Nov 2012 10: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.8ms)  (0.1ms) 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.1ms) SELECT COUNT(*) FROM "advert_selector_banners" Processing by AdvertSelector::BannersController#destroy 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"]]  (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.3ms) 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.9ms)  (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.1ms) 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 (45.1ms) AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-11-02 10:00:00.058076') 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 62ms (Views: 60.7ms | 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-11-02 10:00:00.007102') 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 11ms (Views: 9.5ms | 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 (19.2ms) AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-11-02 10:00:00.024024') 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 29ms (Views: 27.2ms | 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]] 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.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  (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.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-11-04 10:00:00.001284', "running_view_count" = 1 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.1ms) 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 1115ms (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.1ms) 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 1ms (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-11-02 10:00:00.003989') 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.0ms | 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.4ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = 'not_found,video', "updated_at" = '2012-11-04 10:00:00.000802' 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 "conflicting_placements_array" = '', "updated_at" = '2012-11-04 10:00:00.002568' 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.1ms) 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.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.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.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#create as HTML Parameters: {"placement"=>{"name"=>"new placement"}}  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) 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, 04 Nov 2012 10:00:00 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Sun, 04 Nov 2012 10: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.1ms) SELECT COUNT(*) FROM "advert_selector_placements"  Processing by AdvertSelector::PlacementsController#destroy as HTML Parameters: {"id"=>"405688915"} AdvertSelector::Placement Load (0.1ms) 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.3ms) 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.4ms)  (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 (6.1ms) AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-11-02 10:00:00.011794') 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.9ms | 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-11-02 10:00:00.006759') 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.7ms) AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-11-02 10:00:00.009256') 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 13ms (Views: 12.3ms | 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#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.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 "updated_at" = '2012-11-04 10:00:00.000409', "fast_mode" = 't' 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 "updated_at" = '2012-11-04 10:00:00.002480', "confirmed" = 'f' 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 Nov 04 12:00:00 +0200 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-11-04 10:00:00.007136' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.007348' 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.3ms | 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.3ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."banner_id" = 814558298 AND position >= 0) SQL (0.3ms) 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, 04 Nov 2012 10:00:00 UTC +00:00], ["name", "always_false"], ["position", 0], ["updated_at", Sun, 04 Nov 2012 10:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Nov 04 12:00:00 +0200 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-11-04 10:00:00.020767' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.020937' 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: 4.0ms | 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.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 "updated_at" = '2012-11-04 10:00:00.000551', "fast_mode" = 't' 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 "updated_at" = '2012-11-04 10:00:00.002994', "confirmed" = 'f' 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.3ms) UPDATE "advert_selector_helper_items" SET position = (position + 1) WHERE ("advert_selector_helper_items"."banner_id" = 814558298 AND position >= 0) SQL (0.3ms) 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, 04 Nov 2012 10:00:00 UTC +00:00], ["name", "raise_error"], ["position", 0], ["updated_at", Sun, 04 Nov 2012 10:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Nov 04 12:00:00 +0200 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-11-04 10:00:00.005071' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.005282' 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-11-04T12:00:00+02:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /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@global/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@global/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@global/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@global/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `each' [AdvertSelector] AdvertSelection finished Completed 200 OK in 7ms (Views: 5.9ms | 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 Nov 04 12:00:00 +0200 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-11-02 10:00:00.023564') 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 17ms (Views: 15.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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-11-04 10:00:00.000460', "fast_mode" = 't' 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 "updated_at" = '2012-11-04 10:00:00.002731', "confirmed" = 'f' 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 "updated_at" = '2012-11-04 10:00:00.000314', "frequency" = 2 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Nov 04 12:00:00 +0200 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-11-04 10:00:00.003292' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.003478' 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.7ms | 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 Nov 07 12:00:00 +0200 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-11-07 10:00:00.017550' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.017717' 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.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 "/" for 127.0.0.1 at Wed Nov 07 12:00:00 +0200 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 2ms (Views: 1.5ms | 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 "updated_at" = '2012-11-07 10:00:00.000418', "fast_mode" = 't' 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 "updated_at" = '2012-11-07 10:00:00.002428', "confirmed" = 'f' 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 Nov 07 12:00:00 +0200 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-11-07 10:00:00.002256' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.002464' 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" = 207249520 AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/?advert_selector_force=207249520&advert_selector_force_stamp=1352044882" for 127.0.0.1 at Wed Nov 07 12:00:00 +0200 2012 Processing by ExamplesController#index as HTML Parameters: {"advert_selector_force"=>"207249520", "advert_selector_force_stamp"=>"1352044882"} [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-11-07 10:00:00.016183' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.016375' 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 9ms (Views: 8.1ms | 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.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-11-07 10:00:00.000422', "fast_mode" = 't' 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 "updated_at" = '2012-11-07 10:00:00.002532', "confirmed" = 'f' 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 "updated_at" = '2012-11-07 10:00:00.000506', "confirmed" = 't' 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 Started GET "/" for 127.0.0.1 at Wed Nov 07 12:00:00 +0200 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-11-07 10:00:00.004082' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.004334' 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] AdvertSelection finished Completed 200 OK in 6ms (Views: 5.6ms | 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" = 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 Nov 07 12:00:00 +0200 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.7ms | 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" = 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 "updated_at" = '2012-11-07 10:00:00.000757', "fast_mode" = 't' 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 "updated_at" = '2012-11-07 10:00:00.002933', "confirmed" = 'f' 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 "updated_at" = '2012-11-07 10:00:00.000485', "confirmed" = 't' 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 "conflicting_placements_array" = '', "updated_at" = '2012-11-07 10:00:00.002937' 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 "conflicting_placements_array" = '', "updated_at" = '2012-11-07 10:00:00.004641' 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 "conflicting_placements_array" = '', "updated_at" = '2012-11-07 10:00:00.007364' 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 Nov 07 12:00:00 +0200 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-11-07 10:00:00.010973' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.011160' 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 7ms (Views: 6.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" = 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.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-11-07 10:00:00.000421', "fast_mode" = 't' 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 "updated_at" = '2012-11-07 10:00:00.002487', "confirmed" = 'f' 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 Nov 07 12:00:00 +0200 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-11-07 10:00:00.000236' 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.9ms | 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 Nov 07 12:00:00 +0200 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 Nov 07 12:15:00 +0200 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.7ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) 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 "updated_at" = '2012-11-07 10:00:00.000465', "fast_mode" = 't' WHERE "advert_selector_banners"."id" = 814558298 AdvertSelector::HelperItem Load (0.2ms) 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 "updated_at" = '2012-11-07 10:00:00.003546', "confirmed" = 'f' 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 "only_once_per_session" = 't', "updated_at" = '2012-11-07 10:00:00.001154' WHERE "advert_selector_placements"."id" = 405688915  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Wed Nov 07 12:00:00 +0200 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-11-07 10:00:00.004363' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.004551' 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 Nov 07 12:00:00 +0200 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 2ms (Views: 1.5ms | 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]] 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-11-07 10:00:00.002304' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.002472' 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.3ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-11-04 16:05:59', 100, '2012-11-09 00:00:00', 't', '2012-11-04 16:05:59', 50, 814558298, 1000, 'f', 0, '2012-10-30 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-11-04 16:05:59', '2012-11-14 00:00:00', 't', '2012-11-04 16:05:59', 100, 394627963, 1000, 't', 0, '2012-11-04 00:00:00') Fixture Insert (0.1ms) 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-11-04 16:05:59', '2012-11-14 00:00:00', 'f', '2012-11-04 16:05:59', 1000, 207249520, 1000, 't', 1, '2012-11-04 00:00:00') Fixture Delete (0.3ms) 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-11-04 16:05:59', '2012-11-04 16:05:59', 960656439, 't', 394627963, '') 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-11-04 16:05:59', '2012-11-04 16:05:59', 929640376, 't', 814558298, '') 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-11-04 16:05:59', '2012-11-04 16:05:59', 281932184, 't', 207249520, '') Fixture Insert (0.1ms) INSERT INTO "advert_selector_helper_items" ("name", "created_at", "updated_at", "id", "content_for", "banner_id", "content") VALUES ('request_params_include?', '2012-11-04 16:05:59', '2012-11-04 16:05:59', 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-11-04 16:05:59', '2012-11-04 16:05:59', '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-11-04 16:05:59', '2012-11-04 16:05:59', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-11-04 16:05:59', '2012-11-04 16:05:59', 'parade', 405688915)  (47.2ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.7ms) 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.2ms) 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.6ms) 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, 04 Nov 2012 10:00:00 UTC +00:00], ["name", nil], ["position", 2], ["updated_at", Sun, 04 Nov 2012 10: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, 04 Nov 2012 10:00:00 UTC +00:00], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Sun, 04 Nov 2012 10: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, 04 Nov 2012 10:00:00 UTC +00:00], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Sun, 04 Nov 2012 10: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.1ms) 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-11-04 10:00:00.000071' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-11-04 10:00:00.000897' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.001035' 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-11-04 10:00:00.001914' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-11-04 10:00:00.002593' OR end_time IS NULL) AND (start_time < '2011-11-04 11:00:00.002701' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count)  (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) 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 "updated_at" = '2012-11-04 10:00:00.001051', "running_view_count" = 0 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.1ms) 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 "updated_at" = '2012-11-04 10:00:00.007705', "running_view_count" = 551 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 "updated_at" = '2012-11-04 10:00:00.000880', "target_view_count" = 10, "running_view_count" = 0 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 "updated_at" = '2012-11-04 10:00:00.004351', "running_view_count" = 10 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 "updated_at" = '2012-11-04 10:00:00.000403', "confirmed" = 'f' 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 "updated_at" = '2012-11-04 10:00:00.002530', "confirmed" = 't' 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.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-11-04 10:00:00.000758', "start_time" = '2012-11-04 11:00:00.000348' 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 "end_time" = '2012-11-04 09:00:00.002534', "updated_at" = '2012-11-04 10:00:00.002877', "start_time" = '2012-11-04 08:00:00.002456' 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 "end_time" = '2012-11-04 11:00:00.003982', "updated_at" = '2012-11-04 10:00:00.004308', "start_time" = NULL 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 "end_time" = '2012-11-14 00:00:00.000000', "updated_at" = '2012-11-04 10:00:00.000907', "target_view_count" = 100, "start_time" = '2012-11-03 22:00:00.000000' 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 "updated_at" = '2012-11-04 10:00:00.003019', "running_view_count" = 0 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]] 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 "updated_at" = '2012-11-04 17:00:00.001665', "start_time" = '2012-11-04 16:00:00.000889' 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.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-11-14 00:00:00 UTC", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-11-04 00:00:00 UTC"}}  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) 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, 04 Nov 2012 10:00:00 UTC +00:00], ["end_time", Wed, 14 Nov 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, 04 Nov 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Sun, 04 Nov 2012 10: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 6ms (ActiveRecord: 0.8ms)  (0.1ms) 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.1ms) 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.1ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/advert_selector/banners Completed 302 Found in 4ms (ActiveRecord: 0.9ms)  (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.1ms) 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 (45.2ms) AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-11-02 10:00:00.057646') 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 62ms (Views: 60.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.2ms) 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-11-02 10:00:00.007159') 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 11ms (Views: 9.3ms | 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]] 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.5ms) AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-11-02 10:00:00.023563') 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.5ms | 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.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  (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 "updated_at" = '2012-11-04 10:00:00.001329', "running_view_count" = 1 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.1ms) 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 1119ms (ActiveRecord: 0.5ms) AdvertSelector::Banner Load (0.1ms) 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 1ms (Views: 1.0ms | 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-11-02 10:00:00.004100') 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 9ms (Views: 8.1ms | 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.3ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-11-04 10:00:00.000870', "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-11-04 10:00:00.002403', "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.1ms) 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.1ms) rollback transaction  (0.1ms) 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.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]] 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", 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.5ms) 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, 04 Nov 2012 10:00:00 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Sun, 04 Nov 2012 10: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.6ms)  (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.8ms) AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-11-02 10:00:00.011358') 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.5ms | 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-11-02 10:00:00.006510') 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 11ms (Views: 9.2ms | 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#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.3ms) AdvertSelector::Banner Load (0.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-11-02 10:00:00.008484') 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: 10.9ms | 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.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-11-04 10:00:00.000376' 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 "updated_at" = '2012-11-04 10:00:00.002400', "confirmed" = 'f' 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 Nov 04 12:00:00 +0200 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-11-04 10:00:00.006641' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.006828' 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 9ms (Views: 8.6ms | 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, 04 Nov 2012 10:00:00 UTC +00:00], ["name", "always_false"], ["position", 0], ["updated_at", Sun, 04 Nov 2012 10:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Nov 04 12:00:00 +0200 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-11-04 10:00:00.019851' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.020022' 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 5ms (Views: 4.0ms | 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.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-11-04 10:00:00.000454' 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 "updated_at" = '2012-11-04 10:00:00.002422', "confirmed" = 'f' 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, 04 Nov 2012 10:00:00 UTC +00:00], ["name", "raise_error"], ["position", 0], ["updated_at", Sun, 04 Nov 2012 10:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Nov 04 12:00:00 +0200 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-11-04 10:00:00.004193' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.004376' 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-11-04T12:00:00+02:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /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@global/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@global/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@global/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@global/gems/activerecord-3.2.8/lib/active_record/relation/delegation.rb:6:in `each' [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 "/advert_selector/placements" for 127.0.0.1 at Sun Nov 04 12:00:00 +0200 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-11-02 10:00:00.021103') 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.9ms | 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.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.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-11-04 10:00:00.000397' 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 "updated_at" = '2012-11-04 10:00:00.002343', "confirmed" = 'f' 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 "updated_at" = '2012-11-04 10:00:00.000273', "frequency" = 2 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Nov 04 12:00:00 +0200 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-11-04 10:00:00.003240' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.003440' 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.6ms | 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" = 814558298 AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Wed Nov 07 12:00:00 +0200 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-11-07 10:00:00.016967' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.017142' 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.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 "/" for 127.0.0.1 at Wed Nov 07 12:00:00 +0200 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 2ms (Views: 1.8ms | 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]]  (0.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-11-07 10:00:00.000435' 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 "updated_at" = '2012-11-07 10:00:00.002557', "confirmed" = 'f' 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 Nov 07 12:00:00 +0200 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-11-07 10:00:00.002455' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.002647' 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.7ms | 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" = 207249520 AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/?advert_selector_force=207249520&advert_selector_force_stamp=1351987200" for 127.0.0.1 at Wed Nov 07 12:00:00 +0200 2012 Processing by ExamplesController#index as HTML Parameters: {"advert_selector_force"=>"207249520", "advert_selector_force_stamp"=>"1351987200"} [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-11-07 10:00:00.017147' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.017355' 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 9ms (Views: 8.6ms | ActiveRecord: 0.7ms) 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.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-11-07 10:00:00.000453' 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 "updated_at" = '2012-11-07 10:00:00.002614', "confirmed" = 'f' 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 "updated_at" = '2012-11-07 10:00:00.000483', "confirmed" = 't' 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 Started GET "/" for 127.0.0.1 at Wed Nov 07 12:00:00 +0200 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-11-07 10:00:00.004276' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.004466' 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] AdvertSelection finished Completed 200 OK in 7ms (Views: 6.0ms | 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" = 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 Nov 07 12:00:00 +0200 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.9ms | 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" = 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-11-07 10:00:00.000760' 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 "updated_at" = '2012-11-07 10:00:00.002997', "confirmed" = 'f' 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 "updated_at" = '2012-11-07 10:00:00.000504', "confirmed" = 't' 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.1ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-11-07 10:00:00.003085', "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-11-07 10:00:00.004584', "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-11-07 10:00:00.006353', "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 Nov 07 12:00:00 +0200 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-11-07 10:00:00.010122' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.010318' 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 7ms (Views: 6.7ms | 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" = 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.1ms) 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-11-07 10:00:00.000424' 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 "updated_at" = '2012-11-07 10:00:00.002687', "confirmed" = 'f' 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 Nov 07 12:00:00 +0200 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-11-07 10: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.9ms | 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 Nov 07 12:00:00 +0200 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.6ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Wed Nov 07 12:15:00 +0200 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.7ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) 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-11-07 10:00:00.000419' 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 "updated_at" = '2012-11-07 10:00:00.002577', "confirmed" = 'f' 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 "only_once_per_session" = 't', "updated_at" = '2012-11-07 10:00:00.000965' WHERE "advert_selector_placements"."id" = 405688915  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Wed Nov 07 12:00:00 +0200 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-11-07 10:00:00.004089' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.004330' 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.6ms | 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" = 814558298 AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/" for 127.0.0.1 at Wed Nov 07 12:00:00 +0200 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.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.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-11-07 10:00:00.002522' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.002718' 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.7ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction Connecting to database specified by database.yml  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "advert_selector_banners" Fixture Insert (0.2ms) 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-11-04 16:07:22', 100, '2012-11-09 00:00:00', 't', '2012-11-04 16:07:22', 50, 814558298, 1000, 'f', 0, '2012-10-30 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-11-04 16:07:22', '2012-11-14 00:00:00', 't', '2012-11-04 16:07:22', 100, 394627963, 1000, 't', 0, '2012-11-04 00:00:00') Fixture Insert (0.1ms) 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-11-04 16:07:22', '2012-11-14 00:00:00', 'f', '2012-11-04 16:07:22', 1000, 207249520, 1000, 't', 1, '2012-11-04 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-11-04 16:07:22', '2012-11-04 16:07:22', 960656439, 't', 394627963, '') 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-11-04 16:07:22', '2012-11-04 16:07:22', 929640376, 't', 814558298, '') 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-11-04 16:07:22', '2012-11-04 16:07:22', 281932184, 't', 207249520, '') 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-11-04 16:07:22', '2012-11-04 16:07:22', 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-11-04 16:07:22', '2012-11-04 16:07:22', '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-11-04 16:07:22', '2012-11-04 16:07:22', 'parade', 't', 1019730477) Fixture Insert (0.0ms) INSERT INTO "advert_selector_placements" ("name", "created_at", "updated_at", "conflicting_placements_array", "id") VALUES ('Leaderboard', '2012-11-04 16:07:22', '2012-11-04 16:07:22', 'parade', 405688915)  (45.1ms) commit transaction  (0.1ms) begin transaction AdvertSelector::Banner Load (0.7ms) 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.6ms) 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, 04 Nov 2012 10:00:00 UTC +00:00], ["name", nil], ["position", 2], ["updated_at", Sun, 04 Nov 2012 10: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, 04 Nov 2012 10:00:00 UTC +00:00], ["name", "content_for_invalid"], ["position", 10], ["updated_at", Sun, 04 Nov 2012 10:00:00 UTC +00:00]] 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.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, 04 Nov 2012 10:00:00 UTC +00:00], ["name", "some_limit_helper_here"], ["position", 0], ["updated_at", Sun, 04 Nov 2012 10: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-11-04 10:00:00.000073' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2012-11-04 10:00:00.000899' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.001019' 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-11-04 10:00:00.001945' OR end_time IS NULL)  (0.1ms) SELECT COUNT(*) FROM "advert_selector_banners" WHERE (end_time > '2011-11-04 10:00:00.002648' OR end_time IS NULL) AND (start_time < '2011-11-04 11:00:00.002763' OR start_time IS NULL) AND (target_view_count IS NULL OR target_view_count > running_view_count)  (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.3ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-11-04 10:00:00.000991', "running_view_count" = 0 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 "updated_at" = '2012-11-04 10:00:00.007254', "running_view_count" = 551 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 "target_view_count" = 10, "updated_at" = '2012-11-04 10:00:00.000941', "running_view_count" = 0 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 "updated_at" = '2012-11-04 10:00:00.004362', "running_view_count" = 10 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 "updated_at" = '2012-11-04 10:00:00.000435', "confirmed" = 'f' 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 "updated_at" = '2012-11-04 10:00:00.002438', "confirmed" = 't' 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 "updated_at" = '2012-11-04 10:00:00.000784', "start_time" = '2012-11-04 11: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.2ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-11-04 10:00:00.002887', "end_time" = '2012-11-04 09:00:00.002544', "start_time" = '2012-11-04 08:00:00.002474' 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 "updated_at" = '2012-11-04 10:00:00.004304', "end_time" = '2012-11-04 11:00:00.003962', "start_time" = NULL 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 "target_view_count" = 100, "updated_at" = '2012-11-04 10:00:00.000891', "end_time" = '2012-11-14 00:00:00.000000', "start_time" = '2012-11-03 22:00:00.000000' 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 "updated_at" = '2012-11-04 10:00:00.003060', "running_view_count" = 0 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.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", 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.0ms) SAVEPOINT active_record_1  (0.1ms) UPDATE "advert_selector_banners" SET "updated_at" = '2012-11-04 17:00:00.001592', "start_time" = '2012-11-04 16:00:00.000834' 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.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-11-14 00:00:00 UTC", "target_view_count"=>"1000", "frequency"=>"0", "start_time"=>"2012-11-04 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, 04 Nov 2012 10:00:00 UTC +00:00], ["end_time", Wed, 14 Nov 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, 04 Nov 2012 00:00:00 UTC +00:00], ["target_view_count", 1000], ["updated_at", Sun, 04 Nov 2012 10: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.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]]  (0.0ms) SELECT COUNT(*) FROM "advert_selector_banners" Processing by AdvertSelector::BannersController#destroy 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"]]  (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.3ms) 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.9ms)  (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 (44.8ms) AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-11-02 10:00:00.057212') 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 62ms (Views: 60.2ms | 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-11-02 10:00:00.007061') 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 11ms (Views: 9.5ms | 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]] 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.8ms) AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-11-02 10:00:00.023655') 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: 26.0ms | 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.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 "updated_at" = '2012-11-04 10:00:00.001167', "running_view_count" = 1 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.1ms) 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 1091ms (ActiveRecord: 0.6ms) AdvertSelector::Banner Load (0.1ms) 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 1ms (Views: 1.0ms | 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-11-02 10:00:00.004001') 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: 6.9ms | 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.3ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = 'not_found,video', "updated_at" = '2012-11-04 10:00:00.000853' 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 "conflicting_placements_array" = '', "updated_at" = '2012-11-04 10:00:00.002433' 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.1ms) 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.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.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.1ms) 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", 405688915]]  (0.1ms) 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.5ms) 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, 04 Nov 2012 10:00:00 UTC +00:00], ["name", "new placement"], ["only_once_per_session", nil], ["updated_at", Sun, 04 Nov 2012 10: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.1ms) 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.3ms) 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.4ms)  (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.1ms) 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 (6.2ms) AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-11-02 10:00:00.012483') 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 16ms (Views: 14.5ms | ActiveRecord: 0.7ms)  (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-11-02 10:00:00.006696') 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.5ms) AdvertSelector::Banner Load (0.2ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE (end_time is null or end_time > '2012-11-02 10:00:00.008960') 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 13ms (Views: 11.8ms | 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#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.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-11-04 10:00:00.000409' 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 "updated_at" = '2012-11-04 10:00:00.002435', "confirmed" = 'f' 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 Nov 04 12:00:00 +0200 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-11-04 10:00:00.006712' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.006928' 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 9ms (Views: 8.7ms | 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.3ms) 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, 04 Nov 2012 10:00:00 UTC +00:00], ["name", "always_false"], ["position", 0], ["updated_at", Sun, 04 Nov 2012 10:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Nov 04 12:00:00 +0200 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-11-04 10:00:00.019795' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.019968' 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.9ms | 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.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.1ms) SELECT "advert_selector_banners".* FROM "advert_selector_banners" WHERE "advert_selector_banners"."id" = ? LIMIT 1 [["id", 394627963]] AdvertSelector::Banner Load (0.1ms) 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-11-04 10:00:00.000449' 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 "updated_at" = '2012-11-04 10:00:00.002600', "confirmed" = 'f' 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.3ms) 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, 04 Nov 2012 10:00:00 UTC +00:00], ["name", "raise_error"], ["position", 0], ["updated_at", Sun, 04 Nov 2012 10:00:00 UTC +00:00]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Nov 04 12:00:00 +0200 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-11-04 10:00:00.004371' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.004562' 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-11-04T12:00:00+02:00 - http://www.example.com/ - {"action"=>"index", "controller"=>"examples"} # /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@global/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@global/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@global/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@global/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 Nov 04 12:00:00 +0200 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-11-02 10:00:00.021459') 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.7ms | 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-11-04 10:00:00.000442' 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 "updated_at" = '2012-11-04 10:00:00.002528', "confirmed" = 'f' 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 "updated_at" = '2012-11-04 10:00:00.000298', "frequency" = 2 WHERE "advert_selector_banners"."id" = 814558298  (0.0ms) RELEASE SAVEPOINT active_record_1 Started GET "/" for 127.0.0.1 at Sun Nov 04 12:00:00 +0200 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-11-04 10:00:00.003297' OR end_time IS NULL) AND (start_time < '2012-11-04 11:00:00.003479' 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.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 "/" for 127.0.0.1 at Wed Nov 07 12:00:00 +0200 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-11-07 10:00:00.017054' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.017236' 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.6ms | 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 Nov 07 12:00:00 +0200 2012 Processing by ExamplesController#index as HTML [AdvertSelector] AdvertSelection initialized [AdvertSelector] AdvertSelection finished Completed 200 OK in 2ms (Views: 1.5ms | 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.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.0ms) SAVEPOINT active_record_1  (0.3ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-11-07 10:00:00.000452' 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 "updated_at" = '2012-11-07 10:00:00.002574', "confirmed" = 'f' 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 Nov 07 12:00:00 +0200 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-11-07 10:00:00.002355' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.002532' 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" = 207249520 AND "advert_selector_helper_items"."content_for" = 't' ORDER BY position DESC LIMIT 1 Started GET "/?advert_selector_force=207249520&advert_selector_force_stamp=1351987200" for 127.0.0.1 at Wed Nov 07 12:00:00 +0200 2012 Processing by ExamplesController#index as HTML Parameters: {"advert_selector_force"=>"207249520", "advert_selector_force_stamp"=>"1351987200"} [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-11-07 10:00:00.016120' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.016302' 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 9ms (Views: 8.0ms | 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-11-07 10:00:00.000423' 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 "updated_at" = '2012-11-07 10:00:00.002491', "confirmed" = 'f' 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 "updated_at" = '2012-11-07 10:00:00.000467', "confirmed" = 't' 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 Started GET "/" for 127.0.0.1 at Wed Nov 07 12:00:00 +0200 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-11-07 10:00:00.004089' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.004271' 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] AdvertSelection finished Completed 200 OK in 7ms (Views: 6.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" = 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 Nov 07 12:00:00 +0200 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.8ms | 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" = 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-11-07 10:00:00.000749' 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 "updated_at" = '2012-11-07 10:00:00.002881', "confirmed" = 'f' 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 "updated_at" = '2012-11-07 10:00:00.000463', "confirmed" = 't' 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.1ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = '', "updated_at" = '2012-11-07 10:00:00.002764' 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 "conflicting_placements_array" = '', "updated_at" = '2012-11-07 10:00:00.004033' 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.0ms) UPDATE "advert_selector_placements" SET "conflicting_placements_array" = '', "updated_at" = '2012-11-07 10:00:00.005758' 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 Nov 07 12:00:00 +0200 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-11-07 10:00:00.009257' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.009439' 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 7ms (Views: 6.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" = 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-11-07 10:00:00.000412' 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 "updated_at" = '2012-11-07 10:00:00.002464', "confirmed" = 'f' 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 Nov 07 12:00:00 +0200 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-11-07 10:00:00.000231' 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 6ms (Views: 5.0ms | 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 Nov 07 12:00:00 +0200 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.6ms | ActiveRecord: 0.0ms) Started GET "/" for 127.0.0.1 at Wed Nov 07 12:15:00 +0200 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.0ms) SAVEPOINT active_record_1  (0.2ms) UPDATE "advert_selector_banners" SET "fast_mode" = 't', "updated_at" = '2012-11-07 10:00:00.000412' 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 "updated_at" = '2012-11-07 10:00:00.002467', "confirmed" = 'f' 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.2ms) UPDATE "advert_selector_placements" SET "updated_at" = '2012-11-07 10:00:00.000950', "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 Nov 07 12:00:00 +0200 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-11-07 10:00:00.004030' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.004211' 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.9ms | 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 Nov 07 12:00:00 +0200 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]] 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-11-07 10:00:00.002345' OR end_time IS NULL) AND (start_time < '2012-11-07 11:00:00.002525' 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.6ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction