spec/dummy/rails-4.0.4/log/test.log in notify_user-0.0.18 vs spec/dummy/rails-4.0.4/log/test.log in notify_user-0.0.19

- old
+ new

@@ -14691,5 +14691,1118 @@  (0.2ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) ROLLBACK +  (1.2ms) BEGIN +  (0.8ms) SAVEPOINT active_record_1 + SQL (20.1ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:44 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 06 Aug 2014 03:50:44 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#index as HTML + Rendered /Users/william/Papercloud/notify_user/app/views/notify_user/base_notifications/index.html.erb within layouts/application (0.7ms) +Completed 200 OK in 15ms (Views: 12.1ms | ActiveRecord: 0.0ms) +  (0.4ms) ROLLBACK +  (0.2ms) BEGIN +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.7ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:44 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 06 Aug 2014 03:50:44 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SAVEPOINT active_record_1 +  (3.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 588 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (3.4ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:44 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 588], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 06 Aug 2014 03:50:44 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#index as JSON +  (0.8ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 588 AND "notify_user_notifications"."target_type" = 'User' + NotifyUser::BaseNotification Load (2.8ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 588 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 +Completed 200 OK in 20ms (Views: 9.9ms | ActiveRecord: 3.6ms) +  (0.4ms) ROLLBACK +  (0.2ms) BEGIN +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:44 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 06 Aug 2014 03:50:44 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 589 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:44 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 589], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 06 Aug 2014 03:50:44 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 589 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:44 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 589], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 06 Aug 2014 03:50:44 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 589 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:44 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 589], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 06 Aug 2014 03:50:44 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#index as HTML + NotifyUser::BaseNotification Load (1.0ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 589 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 +Completed 200 OK in 564ms (Views: 561.6ms | ActiveRecord: 1.0ms) +  (0.5ms) ROLLBACK +  (0.2ms) BEGIN +  (0.3ms) SAVEPOINT active_record_1 + SQL (0.8ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:44 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 06 Aug 2014 03:50:44 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 590 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.7ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:44 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 590], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 06 Aug 2014 03:50:44 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 590 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:44 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 590], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 06 Aug 2014 03:50:44 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 590 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:44 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 590], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 06 Aug 2014 03:50:44 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#read as HTML + Parameters: {"id"=>"593"} + NotifyUser::BaseNotification Load (1.0ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 590 AND "notify_user_notifications"."target_type" = 'User' AND (id = '593') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 +  (0.2ms) SAVEPOINT active_record_1 + User Load (0.9ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 590]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 590 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (2.4ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 593 [["state", "read"], ["updated_at", Wed, 06 Aug 2014 03:50:44 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +Completed 200 OK in 28ms (Views: 2.1ms | ActiveRecord: 5.5ms) + NotifyUser::BaseNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 593 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.7ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:44 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 06 Aug 2014 03:50:44 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 591 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.7ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:44 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 591], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 06 Aug 2014 03:50:44 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 591 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.7ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:44 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 591], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 06 Aug 2014 03:50:44 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SAVEPOINT active_record_1 +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 591 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:44 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 591], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 06 Aug 2014 03:50:44 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#read as HTML + Parameters: {"id"=>"596"} + NotifyUser::BaseNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 591 AND "notify_user_notifications"."target_type" = 'User' AND (id = '596') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 +  (0.2ms) SAVEPOINT active_record_1 + User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 591]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 591 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.8ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 596 [["state", "read"], ["updated_at", Wed, 06 Aug 2014 03:50:44 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Completed 200 OK in 9ms (Views: 0.4ms | ActiveRecord: 2.9ms) +Processing by NotifyUser::NotificationsController#read as HTML + Parameters: {"id"=>"596"} + NotifyUser::BaseNotification Load (1.0ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 591 AND "notify_user_notifications"."target_type" = 'User' AND (id = '596') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 +Completed 200 OK in 3ms (Views: 0.3ms | ActiveRecord: 3.9ms) +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +  (0.3ms) SAVEPOINT active_record_1 + SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:44 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 06 Aug 2014 03:50:44 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 592 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:44 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 592], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 06 Aug 2014 03:50:44 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SAVEPOINT active_record_1 +  (1.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 592 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (1.0ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:44 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 592], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 06 Aug 2014 03:50:44 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SAVEPOINT active_record_1 +  (0.7ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 592 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (1.1ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:44 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 592], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 06 Aug 2014 03:50:44 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#mark_all as HTML + SQL (1.1ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 592 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('pending','sent')) +Redirected to http://test.host/notify_user/notifications +Completed 302 Found in 3ms (ActiveRecord: 1.1ms) + NotifyUser::BaseNotification Load (1.2ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 592 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('["pending","sent"]')) +  (0.7ms) ROLLBACK +  (0.3ms) BEGIN +  (0.4ms) SAVEPOINT active_record_1 + SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:44 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 06 Aug 2014 03:50:44 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 593 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:44 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 593], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 06 Aug 2014 03:50:44 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#mark_read as HTML + Parameters: {"ids"=>["602"]} + SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 593 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('602')) + NotifyUser::BaseNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 593 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('602')) +Completed 200 OK in 5ms (Views: 2.6ms | ActiveRecord: 1.4ms) + NewPostNotification Load (1.0ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 602]] +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +  (0.3ms) SAVEPOINT active_record_1 + SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:44 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 06 Aug 2014 03:50:44 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SAVEPOINT active_record_1 +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 594 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:44 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 594], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 06 Aug 2014 03:50:44 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#mark_read as HTML + Parameters: {"ids"=>["603"]} + SQL (0.7ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 594 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('603')) + NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 594 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('603')) +Completed 200 OK in 5ms (Views: 1.9ms | ActiveRecord: 1.2ms) +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN +  (0.3ms) SAVEPOINT active_record_1 + SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:44 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 06 Aug 2014 03:50:44 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 595 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:44 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 595], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 06 Aug 2014 03:50:44 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 + NotifyUser::Unsubscribe Load (0.6ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 595 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +Processing by NotifyUser::NotificationsController#subscriptions as HTML + Parameters: {"types"=>[{"type"=>"NewPostNotification", "status"=>"0"}]} +  (0.7ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 595 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.3ms) SAVEPOINT active_record_1 + NotifyUser::Unsubscribe Exists (0.6ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 595) LIMIT 1 + SQL (2.6ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:44 UTC +00:00], ["target_id", 595], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 06 Aug 2014 03:50:44 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 595 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 595 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +Completed 200 OK in 38ms (Views: 0.4ms | ActiveRecord: 5.6ms) + NotifyUser::Unsubscribe Load (0.5ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 595 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN +  (0.3ms) SAVEPOINT active_record_1 + SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 596 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 596], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NotifyUser::Unsubscribe Load (0.5ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 596 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +Processing by NotifyUser::NotificationsController#subscriptions as HTML + Parameters: {"types"=>[{"type"=>"NewPostNotification", "status"=>"1"}]} + NotifyUser::Unsubscribe Load (0.5ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 596 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 596 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 596 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +Completed 200 OK in 5ms (Views: 0.3ms | ActiveRecord: 1.5ms) + NotifyUser::Unsubscribe Load (0.5ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 596 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN +  (0.3ms) SAVEPOINT active_record_1 + SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 597 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 597], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#unsubscribe as HTML + Parameters: {"type"=>"NewPostNotification"} +  (0.3ms) SAVEPOINT active_record_1 + NotifyUser::Unsubscribe Exists (0.5ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 597) LIMIT 1 + SQL (0.6ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["target_id", 597], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://test.host/notify_user/notifications/unsubscribe +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 597 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 597 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +Completed 302 Found in 9ms (ActiveRecord: 2.6ms) + NotifyUser::Unsubscribe Load (0.5ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" ORDER BY "notify_user_unsubscribes"."id" DESC LIMIT 1 +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +  (0.3ms) SAVEPOINT active_record_1 + SQL (0.7ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SAVEPOINT active_record_1 +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 598 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.7ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 598], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) SAVEPOINT active_record_1 + NotifyUser::Unsubscribe Exists (0.5ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 598) LIMIT 1 + SQL (0.5ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["target_id", 598], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#subscribe as HTML + Parameters: {"type"=>"NewPostNotification"} + NotifyUser::Unsubscribe Load (0.6ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 598 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.3ms) SAVEPOINT active_record_1 + SQL (0.7ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 141]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://test.host/notify_user/notifications/unsubscribe +Completed 302 Found in 5ms (ActiveRecord: 1.8ms) + NotifyUser::Unsubscribe Load (0.5ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +  (0.3ms) SAVEPOINT active_record_1 + SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 599 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.7ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 599], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 + NotifyUser::UserHash Load (2.8ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 599 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1 +  (0.3ms) SAVEPOINT active_record_1 + NotifyUser::UserHash Exists (0.5ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'URVankCWkaFhcWGIhKDA0gRsBKH2rdhaD-WrM0AFX0cQ' LIMIT 1 + SQL (2.9ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["target_id", 599], ["target_type", "User"], ["token", "URVankCWkaFhcWGIhKDA0gRsBKH2rdhaD-WrM0AFX0cQ"], ["type", "NewPostNotification"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#unauth_unsubscribe as HTML + Parameters: {"type"=>"NewPostNotification", "token"=>"URVankCWkaFhcWGIhKDA0gRsBKH2rdhaD-WrM0AFX0cQ"} + NotifyUser::UserHash Exists (0.6ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'URVankCWkaFhcWGIhKDA0gRsBKH2rdhaD-WrM0AFX0cQ' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1 + NotifyUser::UserHash Load (0.7ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'URVankCWkaFhcWGIhKDA0gRsBKH2rdhaD-WrM0AFX0cQ' AND "notify_user_user_hashes"."type" = 'NewPostNotification' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1 + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 599]] +  (0.3ms) SAVEPOINT active_record_1 + NotifyUser::Unsubscribe Exists (0.6ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 599) LIMIT 1 + SQL (0.7ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["target_id", 599], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.9ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 173 [["active", false], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Completed 200 OK in 14ms (Views: 0.6ms | ActiveRecord: 4.9ms) + NotifyUser::UserHash Load (0.6ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" ORDER BY "notify_user_user_hashes"."id" DESC LIMIT 1 +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN + NotifyUser::UserHash Load (0.8ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1 +  (0.2ms) SAVEPOINT active_record_1 +  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1 + NotifyUser::UserHash Load (0.7ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1 +  (0.3ms) SAVEPOINT active_record_1 +  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1 +  (0.4ms) ROLLBACK +  (0.2ms) BEGIN + NotifyUser::UserHash Load (0.7ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1 +  (0.2ms) SAVEPOINT active_record_1 +  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 + NotifyUser::UserHash Load (0.7ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1 +  (0.2ms) SAVEPOINT active_record_1 +  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN + NotifyUser::UserHash Load (0.7ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1 +  (0.3ms) SAVEPOINT active_record_1 +  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1 + NotifyUser::UserHash Load (0.7ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1 +  (0.2ms) SAVEPOINT active_record_1 +  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 600 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.9ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["state", "pending"], ["target_id", 600], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 600 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('sent','pending')) +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SAVEPOINT active_record_1 +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 601 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["state", "pending"], ["target_id", 601], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) ROLLBACK +  (0.1ms) BEGIN +  (0.3ms) SAVEPOINT active_record_1 + SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 602 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["state", "pending"], ["target_id", 602], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 603 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.7ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["state", "pending"], ["target_id", 603], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 +  (0.7ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 603 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (1.0ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 612 [["params", {"listing_id"=>1}], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 + NewPostNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1 +  (0.4ms) ROLLBACK +  (0.2ms) BEGIN +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 604 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["state", "pending"], ["target_id", 604], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 604 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (1.0ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 613 [["params", {"listing_id"=>1}], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NewPostNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1 +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SAVEPOINT active_record_1 +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 605 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["state", "pending"], ["target_id", 605], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 605 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.9ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 614 [["params", {:listing_id=>1}], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NewPostNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1 +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN +  (0.3ms) SAVEPOINT active_record_1 + SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SAVEPOINT active_record_1 +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 606 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["state", "pending"], ["target_id", 606], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 606 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (1.2ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 615 [["params", {:listing_id=>1}], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NewPostNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1 +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN +  (0.3ms) SAVEPOINT active_record_1 + SQL (0.7ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.4ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SAVEPOINT active_record_1 +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 607 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["state", "pending"], ["target_id", 607], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 +  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 +  (0.2ms) ROLLBACK +  (0.3ms) BEGIN +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 608 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["state", "pending"], ["target_id", 608], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SAVEPOINT active_record_1 +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 608 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.3ms) RELEASE SAVEPOINT active_record_1 +  (0.7ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 608 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 617) + NotifyUser::BaseNotification Load (1.2ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 617]] + User Load (0.6ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 608]] + NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 608 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' +  (0.2ms) SAVEPOINT active_record_1 +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 608]] +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 608 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.9ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 617 [["state", "sent"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NotifyUser::BaseNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 617 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (1.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 608]] +  (1.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 608 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' + NewPostNotification Load (0.9ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 617 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.6ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 608]] +  (1.0ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 608 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns' +  (0.2ms) ROLLBACK +  (0.3ms) BEGIN +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 609 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.8ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["state", "pending"], ["target_id", 609], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SAVEPOINT active_record_1 +  (0.7ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 609 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.3ms) RELEASE SAVEPOINT active_record_1 +  (0.8ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 609 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 618) + NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 618]] + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 609]] + NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 609 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' +  (0.4ms) SAVEPOINT active_record_1 +  (0.4ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 609]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 609 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.7ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 618 [["state", "sent"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 + NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 618 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 609]] +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 609 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' + NewPostNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 618 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 609]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 609 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns' +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN +  (0.3ms) SAVEPOINT active_record_1 + SQL (0.7ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 610 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["state", "pending"], ["target_id", 610], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 610 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.6ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 610 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 619) +  (0.2ms) SAVEPOINT active_record_1 +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 610 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.7ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["state", "pending"], ["target_id", 610], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +  (0.7ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 610 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 620) +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 611 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["state", "pending"], ["target_id", 611], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 611 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (1.0ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["state", "pending"], ["target_id", 611], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 + NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 622]] + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 611]] + NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 611 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' +  (0.2ms) SAVEPOINT active_record_1 +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 611]] +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 611 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (1.0ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 621 [["state", "sent"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 611]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 611 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.9ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 622 [["state", "sent"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 611 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' + NotifyUser::UserHash Load (0.7ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 611 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1 +  (0.2ms) SAVEPOINT active_record_1 + NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'AhQtBKS4dJJPlcDEGVzRFwDfRu3Zs9ueC4NwBt6QminQ' LIMIT 1 + SQL (0.5ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["target_id", 611], ["target_type", "User"], ["token", "AhQtBKS4dJJPlcDEGVzRFwDfRu3Zs9ueC4NwBt6QminQ"], ["type", "NewPostNotification"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 + +Sent mail to user@example.com (12.2ms) +Date: Wed, 06 Aug 2014 13:50:45 +1000 +From: please-change-me-at-config-initializers-notify-user@example.com +To: user@example.com +Message-ID: <53e1a61580c80_db763fc42d465bf09372e@wp.local.mail> +Subject: New Notifications +Mime-Version: 1.0 +Content-Type: text/html; + charset=UTF-8 +Content-Transfer-Encoding: quoted-printable + +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/h= +tml4/strict.dtd"> +<html> +<head> + <meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type= +"/> + <title></title> +</head> + +<body marginheight=3D"0" topmargin=3D"0" marginwidth=3D"0" leftmargin=3D"= +0" style=3D"margin: 0px; -webkit-font-smoothing: antialiased; text-render= +ing: optimizeLegibility;"> +<div style=3D"width: 100%; height: 70px; margin: 0; padding: 0;"> + <div style=3D"width: 600px; margin: 0 auto; padding: 15px 0;"> + Logo + </div> +</div> +<div style=3D"width: 100%; background-color: #fff; margin: 0; padding: 0;= +"> + <div style=3D"width: 500px; margin: 0 auto; padding: 40px 0; "> + = + +<div> + New Post Notification happened. = + +</div> +<div> + New Post Notification happened. = + +</div> + + </div> +</div> +<div style=3D"width: 100%; min-height: 80px; margin: 0; padding: 0;"> + <div style=3D"width: 600px; margin: 0 auto; padding: 0;"> + <p style=3D"text-align: center;"> + <a href=3D"http://localhost:5000/notify_user/notifications/unauth= +_unsubscribe?token=3DAhQtBKS4dJJPlcDEGVzRFwDfRu3Zs9ueC4NwBt6QminQ&amp;typ= +e=3DNewPostNotification">Unsubscribe</a> + </p> + <p style=3D"text-align: center;"> + This is the default generated layout. A privacy declaration could g= +o here. + </p> + <p style=3D"text-align: center; margin-bottom: 0px;"> + =C2=A9 MyCompany Pty Ltd + </p> + <p style=3D"text-align: center; margin-top: 0px; padding-top: 0px;"> + ABN 123 456 789 + </p> + </div> +</div> +</body> +</html>= + +  (0.4ms) ROLLBACK +  (0.2ms) BEGIN +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 612 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["state", "pending"], ["target_id", 612], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NotifyUser::BaseNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 623]] + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 612]] + NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 612 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' +  (0.2ms) SAVEPOINT active_record_1 +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 612]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 612 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.9ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 623 [["state", "sent"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 623 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 612]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 612 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' + NotifyUser::UserHash Load (0.8ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 612 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1 +  (0.3ms) SAVEPOINT active_record_1 + NotifyUser::UserHash Exists (0.6ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'GlJ_QX5dANcbvmAQX6S1SA67-oNLYrXmLemNRw4oufzA' LIMIT 1 + SQL (0.6ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["target_id", 612], ["target_type", "User"], ["token", "GlJ_QX5dANcbvmAQX6S1SA67-oNLYrXmLemNRw4oufzA"], ["type", "NewPostNotification"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + +Sent mail to user@example.com (7.4ms) +Date: Wed, 06 Aug 2014 13:50:45 +1000 +From: please-change-me-at-config-initializers-notify-user@example.com +To: user@example.com +Message-ID: <53e1a6158cfaf_db763fc42d465bf093865@wp.local.mail> +Subject: New Notification +Mime-Version: 1.0 +Content-Type: text/html; + charset=UTF-8 +Content-Transfer-Encoding: quoted-printable + +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/h= +tml4/strict.dtd"> +<html> +<head> + <meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type= +"/> + <title></title> +</head> + +<body marginheight=3D"0" topmargin=3D"0" marginwidth=3D"0" leftmargin=3D"= +0" style=3D"margin: 0px; -webkit-font-smoothing: antialiased; text-render= +ing: optimizeLegibility;"> +<div style=3D"width: 100%; height: 70px; margin: 0; padding: 0;"> + <div style=3D"width: 600px; margin: 0 auto; padding: 15px 0;"> + Logo + </div> +</div> +<div style=3D"width: 100%; background-color: #fff; margin: 0; padding: 0;= +"> + <div style=3D"width: 500px; margin: 0 auto; padding: 40px 0; "> + New Post Notification happened. + + </div> +</div> +<div style=3D"width: 100%; min-height: 80px; margin: 0; padding: 0;"> + <div style=3D"width: 600px; margin: 0 auto; padding: 0;"> + <p style=3D"text-align: center;"> + <a href=3D"http://localhost:5000/notify_user/notifications/unauth= +_unsubscribe?token=3DGlJ_QX5dANcbvmAQX6S1SA67-oNLYrXmLemNRw4oufzA&amp;typ= +e=3DNewPostNotification">Unsubscribe</a> + </p> + <p style=3D"text-align: center;"> + This is the default generated layout. A privacy declaration could g= +o here. + </p> + <p style=3D"text-align: center; margin-bottom: 0px;"> + =C2=A9 MyCompany Pty Ltd + </p> + <p style=3D"text-align: center; margin-top: 0px; padding-top: 0px;"> + ABN 123 456 789 + </p> + </div> +</div> +</body> +</html>= + +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 612 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns' +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN +  (0.3ms) SAVEPOINT active_record_1 + SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SAVEPOINT active_record_1 + NotifyUser::Unsubscribe Exists (0.6ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 613) LIMIT 1 + SQL (0.5ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["target_id", 613], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 613 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 + NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" IS NULL ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 614 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["state", "pending"], ["target_id", 614], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 624 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 614]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 614 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 615 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["state", "pending"], ["target_id", 615], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 615 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["state", "pending"], ["target_id", 615], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NotifyUser::BaseNotification Load (0.9ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 626]] + User Load (0.6ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 615]] + NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 615 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' +  (0.1ms) SAVEPOINT active_record_1 +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 615]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 615 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (1.0ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 625 [["state", "sent"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 615]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 615 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.7ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 626 [["state", "sent"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 615 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' + NotifyUser::UserHash Load (0.7ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 615 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1 +  (0.2ms) SAVEPOINT active_record_1 + NotifyUser::UserHash Exists (0.5ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'KxpdyROCvWOCXtsvkb6dBgP6bhmmiInIFu6nbpxNVAmg' LIMIT 1 + SQL (0.6ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["target_id", 615], ["target_type", "User"], ["token", "KxpdyROCvWOCXtsvkb6dBgP6bhmmiInIFu6nbpxNVAmg"], ["type", "NewPostNotification"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + +Sent mail to user@example.com (5.5ms) +Date: Wed, 06 Aug 2014 13:50:45 +1000 +From: please-change-me-at-config-initializers-notify-user@example.com +To: user@example.com +Message-ID: <53e1a615a0c69_db763fc42d465bf093915@wp.local.mail> +Subject: New Notifications +Mime-Version: 1.0 +Content-Type: text/html; + charset=UTF-8 +Content-Transfer-Encoding: quoted-printable + +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/h= +tml4/strict.dtd"> +<html> +<head> + <meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type= +"/> + <title></title> +</head> + +<body marginheight=3D"0" topmargin=3D"0" marginwidth=3D"0" leftmargin=3D"= +0" style=3D"margin: 0px; -webkit-font-smoothing: antialiased; text-render= +ing: optimizeLegibility;"> +<div style=3D"width: 100%; height: 70px; margin: 0; padding: 0;"> + <div style=3D"width: 600px; margin: 0 auto; padding: 15px 0;"> + Logo + </div> +</div> +<div style=3D"width: 100%; background-color: #fff; margin: 0; padding: 0;= +"> + <div style=3D"width: 500px; margin: 0 auto; padding: 40px 0; "> + = + +<div> + New Post Notification happened. = + +</div> +<div> + New Post Notification happened. = + +</div> + + </div> +</div> +<div style=3D"width: 100%; min-height: 80px; margin: 0; padding: 0;"> + <div style=3D"width: 600px; margin: 0 auto; padding: 0;"> + <p style=3D"text-align: center;"> + <a href=3D"http://localhost:5000/notify_user/notifications/unauth= +_unsubscribe?token=3DKxpdyROCvWOCXtsvkb6dBgP6bhmmiInIFu6nbpxNVAmg&amp;typ= +e=3DNewPostNotification">Unsubscribe</a> + </p> + <p style=3D"text-align: center;"> + This is the default generated layout. A privacy declaration could g= +o here. + </p> + <p style=3D"text-align: center; margin-bottom: 0px;"> + =C2=A9 MyCompany Pty Ltd + </p> + <p style=3D"text-align: center; margin-top: 0px; padding-top: 0px;"> + ABN 123 456 789 + </p> + </div> +</div> +</body> +</html>= + +  (0.4ms) ROLLBACK +  (0.3ms) BEGIN +  (0.3ms) SAVEPOINT active_record_1 + SQL (0.7ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SAVEPOINT active_record_1 +  (0.7ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 616 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["state", "pending"], ["target_id", 616], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 + NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 627]] + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 616]] + NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 616 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' +  (0.2ms) SAVEPOINT active_record_1 +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 616]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 616 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.9ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 627 [["state", "sent"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 + NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 627 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 616]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 616 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' + NotifyUser::UserHash Load (0.7ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 616 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1 +  (0.2ms) SAVEPOINT active_record_1 + NotifyUser::UserHash Exists (0.5ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'rkGpYA_Y3tpUbaJ9zgsH2w6_XTOJqCJdV0eU4DXEje9w' LIMIT 1 + SQL (0.6ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["target_id", 616], ["target_type", "User"], ["token", "rkGpYA_Y3tpUbaJ9zgsH2w6_XTOJqCJdV0eU4DXEje9w"], ["type", "NewPostNotification"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + +Sent mail to user@example.com (6.8ms) +Date: Wed, 06 Aug 2014 13:50:45 +1000 +From: please-change-me-at-config-initializers-notify-user@example.com +To: user@example.com +Message-ID: <53e1a615ab222_db763fc42d465bf094056@wp.local.mail> +Subject: New Notification +Mime-Version: 1.0 +Content-Type: text/html; + charset=UTF-8 +Content-Transfer-Encoding: quoted-printable + +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/h= +tml4/strict.dtd"> +<html> +<head> + <meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type= +"/> + <title></title> +</head> + +<body marginheight=3D"0" topmargin=3D"0" marginwidth=3D"0" leftmargin=3D"= +0" style=3D"margin: 0px; -webkit-font-smoothing: antialiased; text-render= +ing: optimizeLegibility;"> +<div style=3D"width: 100%; height: 70px; margin: 0; padding: 0;"> + <div style=3D"width: 600px; margin: 0 auto; padding: 15px 0;"> + Logo + </div> +</div> +<div style=3D"width: 100%; background-color: #fff; margin: 0; padding: 0;= +"> + <div style=3D"width: 500px; margin: 0 auto; padding: 40px 0; "> + New Post Notification happened. + + </div> +</div> +<div style=3D"width: 100%; min-height: 80px; margin: 0; padding: 0;"> + <div style=3D"width: 600px; margin: 0 auto; padding: 0;"> + <p style=3D"text-align: center;"> + <a href=3D"http://localhost:5000/notify_user/notifications/unauth= +_unsubscribe?token=3DrkGpYA_Y3tpUbaJ9zgsH2w6_XTOJqCJdV0eU4DXEje9w&amp;typ= +e=3DNewPostNotification">Unsubscribe</a> + </p> + <p style=3D"text-align: center;"> + This is the default generated layout. A privacy declaration could g= +o here. + </p> + <p style=3D"text-align: center; margin-bottom: 0px;"> + =C2=A9 MyCompany Pty Ltd + </p> + <p style=3D"text-align: center; margin-top: 0px; padding-top: 0px;"> + ABN 123 456 789 + </p> + </div> +</div> +</body> +</html>= + +  (0.4ms) ROLLBACK +  (0.2ms) BEGIN +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 617 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["state", "pending"], ["target_id", 617], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 617 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.3ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 617 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.2ms) SAVEPOINT active_record_1 +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 617 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.9ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 628 [["state", "sent"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NewPostNotification Load (0.9ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 628 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 617]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 617 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 617 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns' +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN +  (0.3ms) SAVEPOINT active_record_1 + SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + NotifyUser::Unsubscribe Exists (0.5ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 618) LIMIT 1 + SQL (0.5ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["target_id", 618], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 618 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 618 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 618 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.3ms) ROLLBACK +  (0.3ms) BEGIN +  (0.3ms) SAVEPOINT active_record_1 + SQL (1.0ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.4ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SAVEPOINT active_record_1 + NotifyUser::Unsubscribe Exists (0.6ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'action_mailer' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 619) LIMIT 1 + SQL (0.5ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["target_id", 619], ["target_type", "User"], ["type", "action_mailer"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SAVEPOINT active_record_1 +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 619 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.6ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["state", "pending"], ["target_id", 619], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 619 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 619 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.2ms) SAVEPOINT active_record_1 +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 619 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.9ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 629 [["state", "sent"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NewPostNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 629 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 619]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 619 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 619 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns' +  (0.2ms) ROLLBACK +  (0.3ms) BEGIN +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SAVEPOINT active_record_1 +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 620 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["state", "pending"], ["target_id", 620], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NotifyUser::UserHash Load (0.6ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 620 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1 +  (0.2ms) SAVEPOINT active_record_1 + NotifyUser::UserHash Exists (0.6ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'lQdsDl7vYMEfdtYSEljIQQzIIseSuo-gzH-vVlGO1FYw' LIMIT 1 + SQL (1.2ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["target_id", 620], ["target_type", "User"], ["token", "lQdsDl7vYMEfdtYSEljIQQzIIseSuo-gzH-vVlGO1FYw"], ["type", "NewPostNotification"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) ROLLBACK +  (0.2ms) BEGIN +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 621 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["state", "pending"], ["target_id", 621], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NotifyUser::UserHash Load (0.7ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 621 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1 +  (0.2ms) SAVEPOINT active_record_1 + NotifyUser::UserHash Exists (0.5ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'MFLBZg7hS3DgbJHpgnwM1gUAsqRJeem03Qf_fOzmWpMw' LIMIT 1 + SQL (0.5ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["target_id", 621], ["target_type", "User"], ["token", "MFLBZg7hS3DgbJHpgnwM1gUAsqRJeem03Qf_fOzmWpMw"], ["type", "NewPostNotification"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NotifyUser::UserHash Load (0.7ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 621 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1 +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 622 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.5ms) INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["state", "pending"], ["target_id", 622], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NotifyUser::UserHash Load (0.6ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 622 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1 +  (0.3ms) SAVEPOINT active_record_1 + NotifyUser::UserHash Exists (0.5ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'SXnj2o03P3W561Cwgmszmw9EX85AnCV06LuthRpkBRMQ' LIMIT 1 + SQL (0.5ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["target_id", 622], ["target_type", "User"], ["token", "SXnj2o03P3W561Cwgmszmw9EX85AnCV06LuthRpkBRMQ"], ["type", "NewPostNotification"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.8ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 180 [["active", false], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NotifyUser::UserHash Load (0.6ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 622 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1 +  (0.3ms) SAVEPOINT active_record_1 + NotifyUser::UserHash Exists (0.6ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'XXSLEGMALGkbdool8GMdCwnqoNfYZusPHAzZ_it1wJ4g' LIMIT 1 + SQL (0.9ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["target_id", 622], ["target_type", "User"], ["token", "XXSLEGMALGkbdool8GMdCwnqoNfYZusPHAzZ_it1wJ4g"], ["type", "NewPostNotification"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.4ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + NotifyUser::Unsubscribe Exists (0.5ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 623) LIMIT 1 + SQL (0.5ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["target_id", 623], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + NotifyUser::Unsubscribe Exists (0.7ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 146 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 623) LIMIT 1 +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 623 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + NotifyUser::Unsubscribe Exists (0.5ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 624) LIMIT 1 + SQL (0.6ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["target_id", 624], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + NotifyUser::Unsubscribe Exists (0.5ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 147 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 624) LIMIT 1 +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 624 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1 +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SAVEPOINT active_record_1 + NotifyUser::Unsubscribe Exists (0.5ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 625) LIMIT 1 + SQL (0.5ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["target_id", 625], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + NotifyUser::Unsubscribe Exists (0.8ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 148 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 625) LIMIT 1 +  (0.4ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SAVEPOINT active_record_1 + NotifyUser::Unsubscribe Exists (0.6ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'UnsubscribableNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 625) LIMIT 1 +  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1 + NotifyUser::Unsubscribe Load (0.5ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" ORDER BY "notify_user_unsubscribes"."id" DESC LIMIT 1 +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SAVEPOINT active_record_1 + NotifyUser::Unsubscribe Exists (0.5ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 626) LIMIT 1 + SQL (0.6ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["target_id", 626], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + NotifyUser::Unsubscribe Exists (0.6ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 149 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 626) LIMIT 1 +  (0.3ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + NotifyUser::Unsubscribe Exists (0.5ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 626) LIMIT 1 +  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1 +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 626 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + NotifyUser::Unsubscribe Load (0.7ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 626 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.3ms) SAVEPOINT active_record_1 + SQL (0.5ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 149]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NotifyUser::Unsubscribe Load (0.5ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 626 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (3.6ms) ROLLBACK +  (0.3ms) BEGIN +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SAVEPOINT active_record_1 +  (0.7ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 627 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (1.1ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 627], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +  (0.3ms) SAVEPOINT active_record_1 + SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + NotifyUser::UserHash Exists (0.5ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'YqAyogdu6oTZJwrqnt_oUQ3yPgWCrZP1E2Ua8zJrBEUw' LIMIT 1 + SQL (0.5ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["target_id", 628], ["target_type", "User"], ["token", "YqAyogdu6oTZJwrqnt_oUQ3yPgWCrZP1E2Ua8zJrBEUw"], ["type", "NewPostNotification"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NotifyUser::UserHash Exists (0.5ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'YqAyogdu6oTZJwrqnt_oUQ3yPgWCrZP1E2Ua8zJrBEUw' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1 +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + NotifyUser::UserHash Exists (0.5ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'v6wdeEwSjBfBUmFB2HI0TQY0LmlQG_AesMKd6MjsPWQA' LIMIT 1 + SQL (0.5ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["target_id", 629], ["target_type", "User"], ["token", "v6wdeEwSjBfBUmFB2HI0TQY0LmlQG_AesMKd6MjsPWQA"], ["type", "NewPostNotification"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.7ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 183 [["active", false], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'v6wdeEwSjBfBUmFB2HI0TQY0LmlQG_AesMKd6MjsPWQA' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1 +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + NotifyUser::UserHash Exists (0.9ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'k19S57hklVTRQtdcdy7s-AnxTiNzeZPhdNhP3W08BPuA' LIMIT 1 + SQL (0.8ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["target_id", 630], ["target_type", "User"], ["token", "k19S57hklVTRQtdcdy7s-AnxTiNzeZPhdNhP3W08BPuA"], ["type", "NewPostNotification"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.4ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SAVEPOINT active_record_1 +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.9ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 184 [["active", false], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SAVEPOINT active_record_1 + NotifyUser::UserHash Exists (0.5ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'fMmq-4nI5ut5i7d7PyaSDQJ83l3rk0BPQyp8TIwEFdBQ' LIMIT 1 + SQL (0.6ms) INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00], ["target_id", 631], ["target_type", "User"], ["token", "fMmq-4nI5ut5i7d7PyaSDQJ83l3rk0BPQyp8TIwEFdBQ"], ["type", "NewPostNotification"], ["updated_at", Wed, 06 Aug 2014 03:50:45 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SAVEPOINT active_record_1 +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +  (0.2ms) ROLLBACK