spec/dummy/rails-4.0.4/log/test.log in notify_user-0.0.27 vs spec/dummy/rails-4.0.4/log/test.log in notify_user-0.0.28

- old
+ new

@@ -33553,5 +33553,8552 @@  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) ROLLBACK +  (1.4ms) BEGIN +  (1.0ms) SAVEPOINT active_record_1 + SQL (18.8ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 16 Dec 2014 02:55:12 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:55:12 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.4ms) +Completed 200 OK in 19ms (Views: 15.9ms | ActiveRecord: 0.0ms) +  (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", Tue, 16 Dec 2014 02:55:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:55:13 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SAVEPOINT active_record_1 +  (5.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1380 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (3.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", Tue, 16 Dec 2014 02:55:13 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1380], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:55:13 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#index as JSON +  (1.0ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1380 AND "notify_user_notifications"."target_type" = 'User' + NotifyUser::BaseNotification Load (3.8ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1380 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 +Completed 200 OK in 27ms (Views: 15.4ms | ActiveRecord: 4.8ms) +  (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", Tue, 16 Dec 2014 02:55:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:55:13 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" = 1381 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.9ms) 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", Tue, 16 Dec 2014 02:55:13 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1381], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:55:13 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" = 1381 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.8ms) 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", Tue, 16 Dec 2014 02:55:13 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1381], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:55:13 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" = 1381 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.8ms) 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", Tue, 16 Dec 2014 02:55:13 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1381], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:55:13 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#index as HTML + NotifyUser::BaseNotification Load (1.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1381 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 +Completed 200 OK in 63ms (Views: 60.4ms | ActiveRecord: 1.5ms) +  (0.4ms) 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", Tue, 16 Dec 2014 02:55:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:55:13 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" = 1382 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", Tue, 16 Dec 2014 02:55:13 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1382], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:55:13 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" = 1382 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", Tue, 16 Dec 2014 02:55:13 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1382], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:55:13 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" = 1382 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", Tue, 16 Dec 2014 02:55:13 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1382], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:55:13 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#read as HTML + Parameters: {"id"=>"1396"} + NotifyUser::BaseNotification Load (1.0ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1382 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1396') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 +  (0.2ms) SAVEPOINT active_record_1 + User Load (1.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1382]] +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1382 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (2.8ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1396 [["state", "read"], ["updated_at", Tue, 16 Dec 2014 02:55:13 UTC +00:00]] +  (0.4ms) RELEASE SAVEPOINT active_record_1 +Completed 200 OK in 28ms (Views: 2.0ms | ActiveRecord: 6.1ms) + NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 1396 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 +  (0.3ms) ROLLBACK +  (0.3ms) 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", Tue, 16 Dec 2014 02:55:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:55:13 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" = 1383 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", Tue, 16 Dec 2014 02:55:13 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1383], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:55:13 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" = 1383 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", Tue, 16 Dec 2014 02:55:13 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1383], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:55:13 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" = 1383 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", Tue, 16 Dec 2014 02:55:13 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1383], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:55:13 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#read as HTML + Parameters: {"id"=>"1399"} + NotifyUser::BaseNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1383 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1399') 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", 1383]] +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1383 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" = 1399 [["state", "read"], ["updated_at", Tue, 16 Dec 2014 02:55:13 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +Completed 200 OK in 11ms (Views: 0.4ms | ActiveRecord: 3.4ms) +Processing by NotifyUser::NotificationsController#read as HTML + Parameters: {"id"=>"1399"} + NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1383 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1399') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 +Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 4.0ms) +  (0.3ms) ROLLBACK +  (0.2ms) 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", Tue, 16 Dec 2014 02:55:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:55:13 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" = 1384 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (1.2ms) 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", Tue, 16 Dec 2014 02:55:13 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1384], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:55:13 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" = 1384 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", Tue, 16 Dec 2014 02:55:13 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1384], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:55:13 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" = 1384 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", Tue, 16 Dec 2014 02:55:13 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1384], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:55:13 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#mark_all as HTML + SQL (1.3ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1384 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('pending','sent')) +Redirected to http://test.host/notify_user/notifications +Completed 302 Found in 4ms (ActiveRecord: 1.3ms) + NotifyUser::BaseNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1384 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('["pending","sent"]')) +  (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", Tue, 16 Dec 2014 02:55:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:55:13 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" = 1385 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", Tue, 16 Dec 2014 02:55:13 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1385], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:55:13 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#mark_read as HTML + Parameters: {"ids"=>["1405"]} + SQL (0.8ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1385 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1405')) + NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1385 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1405')) +Completed 200 OK in 6ms (Views: 2.5ms | ActiveRecord: 1.4ms) + NewPostNotification Load (1.1ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1405]] +  (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", Tue, 16 Dec 2014 02:55:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:55:13 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" = 1386 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", Tue, 16 Dec 2014 02:55:13 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1386], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:55:13 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#mark_read as HTML + Parameters: {"ids"=>["1406"]} + SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1386 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1406')) + NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1386 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1406')) +Completed 200 OK in 5ms (Views: 2.4ms | ActiveRecord: 1.1ms) +  (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", Tue, 16 Dec 2014 02:55:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:55:13 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" = 1387 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", Tue, 16 Dec 2014 02:55:13 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1387], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:55:13 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" = 1387 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.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1387 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.4ms) 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"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1387) LIMIT 1 + SQL (2.8ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Tue, 16 Dec 2014 02:55:13 UTC +00:00], ["target_id", 1387], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:55:13 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1387 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +Completed 200 OK in 25ms (Views: 0.4ms | ActiveRecord: 5.4ms) + NotifyUser::Unsubscribe Load (0.5ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1387 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (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", Tue, 16 Dec 2014 02:55:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:55:13 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" = 1388 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.8ms) 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", Tue, 16 Dec 2014 02:55:13 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1388], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:55:13 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" = 1388 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.6ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1388 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" = 1388 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 1.2ms) + NotifyUser::Unsubscribe Load (0.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1388 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (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", Tue, 16 Dec 2014 02:55:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:55:13 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" = 1389 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", Tue, 16 Dec 2014 02:55:13 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1389], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:55:13 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" = 1389) 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", Tue, 16 Dec 2014 02:55:13 UTC +00:00], ["target_id", 1389], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:55:13 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://test.host/notify_user/notifications/unsubscribe +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1389 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +Completed 302 Found in 7ms (ActiveRecord: 2.0ms) + 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.2ms) BEGIN +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 16 Dec 2014 02:55:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:55:13 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" = 1390 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", Tue, 16 Dec 2014 02:55:13 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1390], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:55:13 UTC +00:00]] +  (0.3ms) 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"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1390) 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", Tue, 16 Dec 2014 02:55:13 UTC +00:00], ["target_id", 1390], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:55:13 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#subscribe as HTML + Parameters: {"type"=>"NewPostNotification"} + NotifyUser::Unsubscribe Load (0.5ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1390 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.6ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 317]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://test.host/notify_user/notifications/unsubscribe +Completed 302 Found in 5ms (ActiveRecord: 1.6ms) + NotifyUser::Unsubscribe Load (0.6ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" +  (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", Tue, 16 Dec 2014 02:55:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:55:13 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" = 1391 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", Tue, 16 Dec 2014 02:55:13 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1391], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:55:13 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 + NotifyUser::UserHash Load (1.8ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1391 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" = 'hkguiVtlRNOhom3k-24F2gDGYuBepHus7h2RZAiH3ZBw' LIMIT 1 + SQL (3.1ms) 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", Tue, 16 Dec 2014 02:55:13 UTC +00:00], ["target_id", 1391], ["target_type", "User"], ["token", "hkguiVtlRNOhom3k-24F2gDGYuBepHus7h2RZAiH3ZBw"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:55:13 UTC +00:00]] +  (0.4ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#unauth_unsubscribe as HTML + Parameters: {"type"=>"NewPostNotification", "token"=>"hkguiVtlRNOhom3k-24F2gDGYuBepHus7h2RZAiH3ZBw"} + NotifyUser::UserHash Exists (0.7ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'hkguiVtlRNOhom3k-24F2gDGYuBepHus7h2RZAiH3ZBw' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1 + NotifyUser::UserHash Load (0.9ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'hkguiVtlRNOhom3k-24F2gDGYuBepHus7h2RZAiH3ZBw' 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", 1391]] +  (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" = 1391) 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", Tue, 16 Dec 2014 02:55:13 UTC +00:00], ["target_id", 1391], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:55:13 UTC +00:00]] +  (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" = 389 [["active", false], ["updated_at", Tue, 16 Dec 2014 02:55:13 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +Completed 200 OK in 13ms (Views: 0.5ms | ActiveRecord: 4.8ms) + NotifyUser::UserHash Load (0.5ms) 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.9ms) 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.6ms) 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.1ms) SAVEPOINT active_record_1 +  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 +  (0.4ms) ROLLBACK +  (0.3ms) 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.3ms) SAVEPOINT active_record_1 +  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 +  (0.2ms) 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.4ms) SAVEPOINT active_record_1 +  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1 + NotifyUser::UserHash Load (1.0ms) 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.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", Tue, 16 Dec 2014 02:55:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:55:13 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" = 1392 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", Tue, 16 Dec 2014 02:55:13 UTC +00:00], ["state", "pending"], ["target_id", 1392], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:55:13 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1392 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", Tue, 16 Dec 2014 02:55:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:55:13 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" = 1393 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", Tue, 16 Dec 2014 02:55:13 UTC +00:00], ["state", "pending"], ["target_id", 1393], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:55:13 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 16 Dec 2014 02:55:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:55:13 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" = 1394 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", Tue, 16 Dec 2014 02:55:13 UTC +00:00], ["state", "pending"], ["target_id", 1394], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:55:13 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) ROLLBACK +  (0.1ms) 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", Tue, 16 Dec 2014 02:55:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:55:13 UTC +00:00]] +  (0.2ms) 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" = 1395 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", Tue, 16 Dec 2014 02:55:13 UTC +00:00], ["state", "pending"], ["target_id", 1395], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:55:13 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" = 1395 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" = 1415 [["params", {"listing_id"=>1}], ["updated_at", Tue, 16 Dec 2014 02:55:13 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NewPostNotification Load (0.6ms) 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.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", Tue, 16 Dec 2014 02:55:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:55:13 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1396 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", Tue, 16 Dec 2014 02:55:13 UTC +00:00], ["state", "pending"], ["target_id", 1396], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:55:13 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" = 1396 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.8ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1416 [["params", {"listing_id"=>1}], ["updated_at", Tue, 16 Dec 2014 02:55:13 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.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", Tue, 16 Dec 2014 02:55:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:55:13 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" = 1397 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", Tue, 16 Dec 2014 02:55:13 UTC +00:00], ["state", "pending"], ["target_id", 1397], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:55:13 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" = 1397 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" = 1417 [["params", {:listing_id=>1}], ["updated_at", Tue, 16 Dec 2014 02:55:13 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", Tue, 16 Dec 2014 02:55:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:55:13 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" = 1398 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.4ms) 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", Tue, 16 Dec 2014 02:55:13 UTC +00:00], ["state", "pending"], ["target_id", 1398], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:55:13 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" = 1398 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.8ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1418 [["params", {:listing_id=>1}], ["updated_at", Tue, 16 Dec 2014 02:55:13 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 + NewPostNotification Load (0.6ms) 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.8ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 16 Dec 2014 02:55:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:55:13 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" = 1399 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", Tue, 16 Dec 2014 02:55:13 UTC +00:00], ["state", "pending"], ["target_id", 1399], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:55:13 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SAVEPOINT active_record_1 +  (0.2ms) ROLLBACK TO SAVEPOINT active_record_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", Tue, 16 Dec 2014 02:55:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:55:13 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" = 1400 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.4ms) 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", Tue, 16 Dec 2014 02:55:13 UTC +00:00], ["state", "pending"], ["target_id", 1400], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:55:13 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" = 1400 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" = 1400 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1420) + NotifyUser::BaseNotification Load (1.1ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1420]] + User Load (0.6ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1400]] + 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" = 1400 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' +  (0.2ms) SAVEPOINT active_record_1 + User Load (1.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1400]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1400 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" = 1420 [["state", "sent"], ["updated_at", Tue, 16 Dec 2014 02:55:13 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" = 1420 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1400]] +  (0.9ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1400 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" = 1420 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.6ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1400]] +  (0.9ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1400 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns' +  (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", Tue, 16 Dec 2014 02:55:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:55:13 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" = 1401 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", Tue, 16 Dec 2014 02:55:13 UTC +00:00], ["state", "pending"], ["target_id", 1401], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:55:13 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" = 1401 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" = 1401 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1421) + NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1421]] + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1401]] + 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" = 1401 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' +  (0.2ms) SAVEPOINT active_record_1 + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1401]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1401 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" = 1421 [["state", "sent"], ["updated_at", Tue, 16 Dec 2014 02:55:13 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 1421 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1401]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1401 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" = 1421 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1401]] +  (0.7ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1401 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns' +  (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", Tue, 16 Dec 2014 02:55:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:55:13 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 +  (0.8ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1402 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", Tue, 16 Dec 2014 02:55:13 UTC +00:00], ["state", "pending"], ["target_id", 1402], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:55:13 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" = 1402 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) 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" = 1402 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1422) +  (0.2ms) SAVEPOINT active_record_1 +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1402 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", Tue, 16 Dec 2014 02:55:13 UTC +00:00], ["state", "pending"], ["target_id", 1402], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:55:13 UTC +00:00]] +  (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" = 1402 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1423) +  (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", Tue, 16 Dec 2014 02:55:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:55:13 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" = 1403 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", Tue, 16 Dec 2014 02:55:13 UTC +00:00], ["state", "pending"], ["target_id", 1403], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:55:13 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" = 1403 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", Tue, 16 Dec 2014 02:55:13 UTC +00:00], ["state", "pending"], ["target_id", 1403], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:55:13 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + 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", 1425]] + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1403]] + NewPostNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1403 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' +  (0.1ms) SAVEPOINT active_record_1 + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1403]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1403 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" = 1424 [["state", "sent"], ["updated_at", Tue, 16 Dec 2014 02:55:13 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", 1403]] +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1403 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" = 1425 [["state", "sent"], ["updated_at", Tue, 16 Dec 2014 02:55:13 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1403 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" = 1403 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" = '65OfrtFHwNGDqkY15_ZhMgorp74s6-6EnfnYlAStWYOw' 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", Tue, 16 Dec 2014 02:55:13 UTC +00:00], ["target_id", 1403], ["target_type", "User"], ["token", "65OfrtFHwNGDqkY15_ZhMgorp74s6-6EnfnYlAStWYOw"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:55:13 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + +Sent mail to user@example.com (13.7ms) +Date: Tue, 16 Dec 2014 13:55:13 +1100 +From: please-change-me-at-config-initializers-notify-user@example.com +To: user@example.com +Message-ID: <548f9f11e737e_89e13fc905c65be815735@wp.local.mail> +Subject: Rails404: You have new Newpostnotification 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=3D65OfrtFHwNGDqkY15_ZhMgorp74s6-6EnfnYlAStWYOw&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.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", Tue, 16 Dec 2014 02:55:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:55:13 UTC +00:00]] +  (0.2ms) 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" = 1404 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", Tue, 16 Dec 2014 02:55:13 UTC +00:00], ["state", "pending"], ["target_id", 1404], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:55:13 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NewPostNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1426]] + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1404]] + NewPostNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1404 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' +  (0.2ms) SAVEPOINT active_record_1 + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1404]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1404 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" = 1426 [["state", "sent"], ["updated_at", Tue, 16 Dec 2014 02:55:13 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 + NewPostNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1426 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1404]] +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1404 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' + NotifyUser::UserHash Load (0.6ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1404 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" = 'Mb3HDcsW1qnFBu3SEE5gyAywFInq7nlEhou6esuctKVg' 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", Tue, 16 Dec 2014 02:55:13 UTC +00:00], ["target_id", 1404], ["target_type", "User"], ["token", "Mb3HDcsW1qnFBu3SEE5gyAywFInq7nlEhou6esuctKVg"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:55:13 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + +Sent mail to user@example.com (8.0ms) +Date: Tue, 16 Dec 2014 13:55:13 +1100 +From: please-change-me-at-config-initializers-notify-user@example.com +To: user@example.com +Message-ID: <548f9f11f36ef_89e13fc905c65be815831@wp.local.mail> +Subject: Rails404: You have a new Newpostnotification 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=3DMb3HDcsW1qnFBu3SEE5gyAywFInq7nlEhou6esuctKVg&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" = 1404 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", Tue, 16 Dec 2014 02:55:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:55:14 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" = 1405) 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", Tue, 16 Dec 2014 02:55:14 UTC +00:00], ["target_id", 1405], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:55:14 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" = 1405 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.4ms) 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.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 16 Dec 2014 02:55:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:55:14 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SAVEPOINT active_record_1 +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1406 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.4ms) 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", Tue, 16 Dec 2014 02:55:14 UTC +00:00], ["state", "pending"], ["target_id", 1406], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:55:14 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 1427 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1406]] +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1406 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", Tue, 16 Dec 2014 02:55:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:55:14 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" = 1407 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", Tue, 16 Dec 2014 02:55:14 UTC +00:00], ["state", "pending"], ["target_id", 1407], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:55:14 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" = 1407 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", Tue, 16 Dec 2014 02:55:14 UTC +00:00], ["state", "pending"], ["target_id", 1407], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:55:14 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') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1429]] + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1407]] + NewPostNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1407 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' +  (0.3ms) SAVEPOINT active_record_1 + User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1407]] +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1407 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (1.1ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1428 [["state", "sent"], ["updated_at", Tue, 16 Dec 2014 02:55:14 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", 1407]] +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1407 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" = 1429 [["state", "sent"], ["updated_at", Tue, 16 Dec 2014 02:55:14 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1407 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" = 1407 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" = 'ZYUk03BJyi4L4Yp4RWF7TAqCqNszUvbQ91EPoC8RIeyw' 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", Tue, 16 Dec 2014 02:55:14 UTC +00:00], ["target_id", 1407], ["target_type", "User"], ["token", "ZYUk03BJyi4L4Yp4RWF7TAqCqNszUvbQ91EPoC8RIeyw"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:55:14 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + +Sent mail to user@example.com (7.9ms) +Date: Tue, 16 Dec 2014 13:55:14 +1100 +From: please-change-me-at-config-initializers-notify-user@example.com +To: user@example.com +Message-ID: <548f9f121385c_89e13fc905c65be815978@wp.local.mail> +Subject: Rails404: You have new Newpostnotification 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=3DZYUk03BJyi4L4Yp4RWF7TAqCqNszUvbQ91EPoC8RIeyw&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.3ms) ROLLBACK +  (0.3ms) BEGIN +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.8ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 16 Dec 2014 02:55:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:55:14 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" = 1408 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", Tue, 16 Dec 2014 02:55:14 UTC +00:00], ["state", "pending"], ["target_id", 1408], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:55:14 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') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1430]] + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1408]] + NewPostNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1408 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' +  (0.2ms) SAVEPOINT active_record_1 + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1408]] +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1408 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" = 1430 [["state", "sent"], ["updated_at", Tue, 16 Dec 2014 02:55:14 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" = 1430 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1408]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1408 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" = 1408 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" = 'ObJpcEqAktWGkkVT3mIbLQpb3ehXxhfb8rnBVcF9kNvA' 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", Tue, 16 Dec 2014 02:55:14 UTC +00:00], ["target_id", 1408], ["target_type", "User"], ["token", "ObJpcEqAktWGkkVT3mIbLQpb3ehXxhfb8rnBVcF9kNvA"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:55:14 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 + +Sent mail to user@example.com (10.6ms) +Date: Tue, 16 Dec 2014 13:55:14 +1100 +From: please-change-me-at-config-initializers-notify-user@example.com +To: user@example.com +Message-ID: <548f9f121f176_89e13fc905c65be8160fc@wp.local.mail> +Subject: Rails404: You have a new Newpostnotification 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=3DObJpcEqAktWGkkVT3mIbLQpb3ehXxhfb8rnBVcF9kNvA&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.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", Tue, 16 Dec 2014 02:55:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:55:14 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" = 1409 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", Tue, 16 Dec 2014 02:55:14 UTC +00:00], ["state", "pending"], ["target_id", 1409], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:55:14 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" = 1409 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1409 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.2ms) SAVEPOINT active_record_1 +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1409 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" = 1431 [["state", "sent"], ["updated_at", Tue, 16 Dec 2014 02:55:14 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NewPostNotification Load (0.8ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1431 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1409]] +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1409 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" = 1409 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns' +  (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", Tue, 16 Dec 2014 02:55:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:55:14 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" = 1410) LIMIT 1 + SQL (0.4ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Tue, 16 Dec 2014 02:55:14 UTC +00:00], ["target_id", 1410], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:55:14 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" = 1410 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.2ms) 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" = 1410 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1410 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (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", Tue, 16 Dec 2014 02:55:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:55:14 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" = 'action_mailer' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1411) 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", Tue, 16 Dec 2014 02:55:14 UTC +00:00], ["target_id", 1411], ["target_type", "User"], ["type", "action_mailer"], ["updated_at", Tue, 16 Dec 2014 02:55:14 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" = 'action_mailer' AND "notify_user_unsubscribes"."id" != 321 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1411) 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" = 1411 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", Tue, 16 Dec 2014 02:55:14 UTC +00:00], ["state", "pending"], ["target_id", 1411], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:55:14 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" = 1411 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" = 1411 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.2ms) SAVEPOINT active_record_1 +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1411 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" = 1432 [["state", "sent"], ["updated_at", Tue, 16 Dec 2014 02:55:14 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NewPostNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1432 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1411]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1411 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" = 1411 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns' +  (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", Tue, 16 Dec 2014 02:55:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:55:14 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" = 1412 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", Tue, 16 Dec 2014 02:55:14 UTC +00:00], ["state", "pending"], ["target_id", 1412], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:55:14 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" = 1412 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" = 'SUgQy6wg2OsAhrjkrjIQwQY5aHP1CLYCBdRUGrnBKyvA' 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", Tue, 16 Dec 2014 02:55:14 UTC +00:00], ["target_id", 1412], ["target_type", "User"], ["token", "SUgQy6wg2OsAhrjkrjIQwQY5aHP1CLYCBdRUGrnBKyvA"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:55:14 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) 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", Tue, 16 Dec 2014 02:55:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:55:14 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" = 1413 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", Tue, 16 Dec 2014 02:55:14 UTC +00:00], ["state", "pending"], ["target_id", 1413], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:55:14 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 + NotifyUser::UserHash Load (0.8ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1413 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.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '9Wuy0HFVDjjpT-tErb_MFwlyw2CUTFHBW6TuoEIqC4QQ' 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", Tue, 16 Dec 2014 02:55:14 UTC +00:00], ["target_id", 1413], ["target_type", "User"], ["token", "9Wuy0HFVDjjpT-tErb_MFwlyw2CUTFHBW6TuoEIqC4QQ"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:55:14 UTC +00:00]] +  (0.3ms) 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" = 1413 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) 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", Tue, 16 Dec 2014 02:55:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:55:14 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" = 1414 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", Tue, 16 Dec 2014 02:55:14 UTC +00:00], ["state", "pending"], ["target_id", 1414], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:55:14 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" = 1414 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" = 'VbI1W85F9Sr47sWfe95HpgSg7NLGGMd2C4GVSQoc4zaQ' 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", Tue, 16 Dec 2014 02:55:14 UTC +00:00], ["target_id", 1414], ["target_type", "User"], ["token", "VbI1W85F9Sr47sWfe95HpgSg7NLGGMd2C4GVSQoc4zaQ"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:55:14 UTC +00:00]] +  (0.3ms) 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" = 396 [["active", false], ["updated_at", Tue, 16 Dec 2014 02:55:14 UTC +00:00]] +  (0.3ms) 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" = 1414 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" = 'VsNIU4er3cBoJXB6qK5h9gKYGAsAvh9JSaslIeYYBwpw' 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", Tue, 16 Dec 2014 02:55:14 UTC +00:00], ["target_id", 1414], ["target_type", "User"], ["token", "VsNIU4er3cBoJXB6qK5h9gKYGAsAvh9JSaslIeYYBwpw"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:55:14 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", Tue, 16 Dec 2014 02:55:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:55:14 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" = 1415) 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", Tue, 16 Dec 2014 02:55:14 UTC +00:00], ["target_id", 1415], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:55:14 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" != 322 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1415) LIMIT 1 +  (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" = 1415 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.3ms) 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", Tue, 16 Dec 2014 02:55:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:55:14 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"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1416) 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", Tue, 16 Dec 2014 02:55:14 UTC +00:00], ["target_id", 1416], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:55:14 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"."id" != 323 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1416) 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" = 1416 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.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", Tue, 16 Dec 2014 02:55:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:55:14 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" = 1417) 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", Tue, 16 Dec 2014 02:55:14 UTC +00:00], ["target_id", 1417], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:55:14 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" != 324 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1417) 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" = 1417) LIMIT 1 +  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1417 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + NotifyUser::Unsubscribe Load (0.5ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1417 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.6ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 324]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NotifyUser::Unsubscribe Load (0.6ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1417 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.8ms) ROLLBACK +  (0.1ms) BEGIN +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 16 Dec 2014 02:55:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:55:14 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" = 1418 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", Tue, 16 Dec 2014 02:55:14 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1418], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:55:14 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) 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", Tue, 16 Dec 2014 02:55:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:55:14 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_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" = 'CbpUh71bVa52AF3zqMEXwwYRmiUqNDXQj-K57hRHzbjg' 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", Tue, 16 Dec 2014 02:55:14 UTC +00:00], ["target_id", 1419], ["target_type", "User"], ["token", "CbpUh71bVa52AF3zqMEXwwYRmiUqNDXQj-K57hRHzbjg"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:55:14 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.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'CbpUh71bVa52AF3zqMEXwwYRmiUqNDXQj-K57hRHzbjg' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1 +  (0.2ms) 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", Tue, 16 Dec 2014 02:55:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:55:14 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_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" = 'pKPZso2hAuzhy_Fbws2vlQAlwU2WrGiloX0Di4ixByog' 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", Tue, 16 Dec 2014 02:55:14 UTC +00:00], ["target_id", 1420], ["target_type", "User"], ["token", "pKPZso2hAuzhy_Fbws2vlQAlwU2WrGiloX0Di4ixByog"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:55:14 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 +  (0.3ms) 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" = 399 [["active", false], ["updated_at", Tue, 16 Dec 2014 02:55:14 UTC +00:00]] +  (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" = 'pKPZso2hAuzhy_Fbws2vlQAlwU2WrGiloX0Di4ixByog' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' 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", Tue, 16 Dec 2014 02:55:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:55:14 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_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" = 'KWO7Z_H0ShA9pjioThCNrQOqqX0WCUwvAwfMDK2ptBFA' 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", Tue, 16 Dec 2014 02:55:14 UTC +00:00], ["target_id", 1421], ["target_type", "User"], ["token", "KWO7Z_H0ShA9pjioThCNrQOqqX0WCUwvAwfMDK2ptBFA"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:55:14 UTC +00:00]] +  (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 + SQL (0.8ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 400 [["active", false], ["updated_at", Tue, 16 Dec 2014 02:55:14 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_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", Tue, 16 Dec 2014 02:55:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:55:14 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_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" = 'keppxlinRRmocgKtKwXaywqfmHE-eIFfosWE6J8I871w' 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", Tue, 16 Dec 2014 02:55:14 UTC +00:00], ["target_id", 1422], ["target_type", "User"], ["token", "keppxlinRRmocgKtKwXaywqfmHE-eIFfosWE6J8I871w"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:55:14 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) 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.2ms) BEGIN +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +  (0.2ms) SAVEPOINT active_record_1 + SQL (5.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 16 Dec 2014 02:56:03 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:03 UTC +00:00]] +  (0.2ms) 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.3ms) +Completed 200 OK in 10ms (Views: 8.1ms | ActiveRecord: 0.0ms) +  (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", Tue, 16 Dec 2014 02:56:03 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:03 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SAVEPOINT active_record_1 +  (1.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1424 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (1.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", Tue, 16 Dec 2014 02:56:03 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1424], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:03 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#index as JSON +  (1.1ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1424 AND "notify_user_notifications"."target_type" = 'User' + NotifyUser::BaseNotification Load (1.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1424 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 +Completed 200 OK in 16ms (Views: 7.0ms | ActiveRecord: 2.4ms) +  (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", Tue, 16 Dec 2014 02:56:03 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:03 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" = 1425 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", Tue, 16 Dec 2014 02:56:03 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1425], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:03 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" = 1425 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", Tue, 16 Dec 2014 02:56:03 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1425], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:03 UTC +00:00]] +  (0.2ms) 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" = 1425 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", Tue, 16 Dec 2014 02:56:03 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1425], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:03 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#index as HTML + NotifyUser::BaseNotification Load (0.9ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1425 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 +Completed 200 OK in 32ms (Views: 30.6ms | ActiveRecord: 0.9ms) +  (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", Tue, 16 Dec 2014 02:56:03 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:03 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" = 1426 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", Tue, 16 Dec 2014 02:56:03 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1426], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:03 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" = 1426 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", Tue, 16 Dec 2014 02:56:03 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1426], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:03 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" = 1426 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", Tue, 16 Dec 2014 02:56:03 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1426], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:03 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#read as HTML + Parameters: {"id"=>"1441"} + NotifyUser::BaseNotification Load (0.8ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1426 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1441') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 +  (0.2ms) SAVEPOINT active_record_1 + User Load (1.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1426]] +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1426 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (1.3ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1441 [["state", "read"], ["updated_at", Tue, 16 Dec 2014 02:56:03 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Completed 200 OK in 19ms (Views: 1.4ms | ActiveRecord: 4.2ms) + NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 1441 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN +  (0.2ms) SAVEPOINT active_record_1 + SQL (1.0ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 16 Dec 2014 02:56:03 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:03 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 +  (2.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1427 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", Tue, 16 Dec 2014 02:56:03 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1427], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:03 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 +  (1.0ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1427 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.9ms) 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", Tue, 16 Dec 2014 02:56:03 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1427], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:03 UTC +00:00]] +  (0.3ms) 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" = 1427 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", Tue, 16 Dec 2014 02:56:03 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1427], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:03 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#read as HTML + Parameters: {"id"=>"1444"} + NotifyUser::BaseNotification Load (1.0ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1427 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1444') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 +  (0.2ms) SAVEPOINT active_record_1 + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1427]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1427 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" = 1444 [["state", "read"], ["updated_at", Tue, 16 Dec 2014 02:56:03 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Completed 200 OK in 12ms (Views: 0.8ms | ActiveRecord: 3.2ms) +Processing by NotifyUser::NotificationsController#read as HTML + Parameters: {"id"=>"1444"} + NotifyUser::BaseNotification Load (0.8ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1427 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1444') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 +Completed 200 OK in 3ms (Views: 0.4ms | ActiveRecord: 4.0ms) +  (0.4ms) 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", Tue, 16 Dec 2014 02:56:03 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:03 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" = 1428 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (1.2ms) 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", Tue, 16 Dec 2014 02:56:03 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1428], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:03 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" = 1428 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", Tue, 16 Dec 2014 02:56:03 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1428], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:03 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" = 1428 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", Tue, 16 Dec 2014 02:56:03 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1428], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:03 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#mark_all as HTML + SQL (1.2ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1428 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('pending','sent')) +Redirected to http://test.host/notify_user/notifications +Completed 302 Found in 4ms (ActiveRecord: 1.2ms) + NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1428 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('["pending","sent"]')) +  (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", Tue, 16 Dec 2014 02:56:03 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:03 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" = 1429 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", Tue, 16 Dec 2014 02:56:03 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1429], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:03 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#mark_read as HTML + Parameters: {"ids"=>["1450"]} + SQL (1.0ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1429 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1450')) + NotifyUser::BaseNotification Load (0.8ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1429 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1450')) +Completed 200 OK in 7ms (Views: 3.1ms | ActiveRecord: 1.8ms) + NewPostNotification Load (1.1ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1450]] +  (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", Tue, 16 Dec 2014 02:56:03 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:03 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" = 1430 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", Tue, 16 Dec 2014 02:56:03 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1430], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:03 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#mark_read as HTML + Parameters: {"ids"=>["1451"]} + SQL (0.9ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1430 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1451')) + NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1430 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1451')) +Completed 200 OK in 5ms (Views: 2.2ms | ActiveRecord: 1.4ms) +  (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", Tue, 16 Dec 2014 02:56:03 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:03 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" = 1431 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", Tue, 16 Dec 2014 02:56:03 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1431], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:03 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NotifyUser::Unsubscribe Load (0.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1431 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.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1431 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (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" = 1431) LIMIT 1 + SQL (1.0ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Tue, 16 Dec 2014 02:56:03 UTC +00:00], ["target_id", 1431], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:03 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1431 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +Completed 200 OK in 20ms (Views: 0.3ms | ActiveRecord: 2.9ms) + NotifyUser::Unsubscribe Load (0.5ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1431 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (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", Tue, 16 Dec 2014 02:56:03 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:03 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1432 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", Tue, 16 Dec 2014 02:56:03 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1432], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:03 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" = 1432 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.6ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1432 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" = 1432 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 1.1ms) + NotifyUser::Unsubscribe Load (1.2ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1432 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.4ms) 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", Tue, 16 Dec 2014 02:56:03 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:03 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" = 1433 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", Tue, 16 Dec 2014 02:56:03 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1433], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:03 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#unsubscribe as HTML + Parameters: {"type"=>"NewPostNotification"} +  (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" = 1433) 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", Tue, 16 Dec 2014 02:56:03 UTC +00:00], ["target_id", 1433], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:03 UTC +00:00]] +  (0.5ms) 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" = 1433 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +Completed 302 Found in 9ms (ActiveRecord: 2.4ms) + 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.1ms) BEGIN +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.8ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 16 Dec 2014 02:56:03 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:03 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 +  (1.0ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1434 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", Tue, 16 Dec 2014 02:56:03 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1434], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:03 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + NotifyUser::Unsubscribe Exists (0.4ms) 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" = 1434) 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", Tue, 16 Dec 2014 02:56:03 UTC +00:00], ["target_id", 1434], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:03 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" = 1434 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.5ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 327]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://test.host/notify_user/notifications/unsubscribe +Completed 302 Found in 5ms (ActiveRecord: 1.5ms) + NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +  (0.6ms) SAVEPOINT active_record_1 + SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 16 Dec 2014 02:56:03 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:03 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" = 1435 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", Tue, 16 Dec 2014 02:56:03 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1435], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:03 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NotifyUser::UserHash Load (1.1ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1435 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" = 'ipQ9bBAMfJJpq4g4yrSabw39YsRu7Qd_929_kZGf05Dg' 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", Tue, 16 Dec 2014 02:56:03 UTC +00:00], ["target_id", 1435], ["target_type", "User"], ["token", "ipQ9bBAMfJJpq4g4yrSabw39YsRu7Qd_929_kZGf05Dg"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:03 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#unauth_unsubscribe as HTML + Parameters: {"type"=>"NewPostNotification", "token"=>"ipQ9bBAMfJJpq4g4yrSabw39YsRu7Qd_929_kZGf05Dg"} + NotifyUser::UserHash Exists (0.5ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'ipQ9bBAMfJJpq4g4yrSabw39YsRu7Qd_929_kZGf05Dg' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1 + NotifyUser::UserHash Load (0.4ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'ipQ9bBAMfJJpq4g4yrSabw39YsRu7Qd_929_kZGf05Dg' AND "notify_user_user_hashes"."type" = 'NewPostNotification' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1 + User Load (1.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1435]] +  (0.4ms) SAVEPOINT active_record_1 + NotifyUser::Unsubscribe Exists (0.4ms) 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" = 1435) 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", Tue, 16 Dec 2014 02:56:03 UTC +00:00], ["target_id", 1435], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:03 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.7ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 402 [["active", false], ["updated_at", Tue, 16 Dec 2014 02:56:03 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Completed 200 OK in 12ms (Views: 0.4ms | ActiveRecord: 4.6ms) + NotifyUser::UserHash Load (0.5ms) 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.4ms) ROLLBACK TO 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" 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 +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN + NotifyUser::UserHash Load (0.6ms) 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.6ms) 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.2ms) ROLLBACK TO SAVEPOINT active_record_1 +  (0.3ms) 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.3ms) SAVEPOINT active_record_1 +  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 + 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.3ms) 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.8ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 16 Dec 2014 02:56:03 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:03 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 +  (1.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1436 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (1.2ms) 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", Tue, 16 Dec 2014 02:56:03 UTC +00:00], ["state", "pending"], ["target_id", 1436], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:03 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.7ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1436 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('sent','pending')) +  (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", Tue, 16 Dec 2014 02:56:03 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:03 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" = 1437 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", Tue, 16 Dec 2014 02:56:03 UTC +00:00], ["state", "pending"], ["target_id", 1437], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:03 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_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", Tue, 16 Dec 2014 02:56:03 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:03 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SAVEPOINT active_record_1 +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1438 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", Tue, 16 Dec 2014 02:56:03 UTC +00:00], ["state", "pending"], ["target_id", 1438], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:03 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) 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", Tue, 16 Dec 2014 02:56:03 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:03 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" = 1439 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", Tue, 16 Dec 2014 02:56:03 UTC +00:00], ["state", "pending"], ["target_id", 1439], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:03 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" = 1439 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" = 1460 [["params", {"listing_id"=>1}], ["updated_at", Tue, 16 Dec 2014 02:56:03 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NewPostNotification Load (0.6ms) 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.2ms) ROLLBACK +  (0.4ms) 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", Tue, 16 Dec 2014 02:56:03 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:03 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" = 1440 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", Tue, 16 Dec 2014 02:56:03 UTC +00:00], ["state", "pending"], ["target_id", 1440], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:03 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" = 1440 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" = 1461 [["params", {"listing_id"=>1}], ["updated_at", Tue, 16 Dec 2014 02:56:03 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 + NewPostNotification Load (0.6ms) 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.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", Tue, 16 Dec 2014 02:56:03 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:03 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" = 1441 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", Tue, 16 Dec 2014 02:56:03 UTC +00:00], ["state", "pending"], ["target_id", 1441], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:03 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" = 1441 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" = 1462 [["params", {:listing_id=>1}], ["updated_at", Tue, 16 Dec 2014 02:56:03 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') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1 +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.9ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 16 Dec 2014 02:56:03 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:03 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" = 1442 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", Tue, 16 Dec 2014 02:56:03 UTC +00:00], ["state", "pending"], ["target_id", 1442], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:03 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" = 1442 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.8ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1463 [["params", {:listing_id=>1}], ["updated_at", Tue, 16 Dec 2014 02:56:03 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.2ms) ROLLBACK +  (0.2ms) BEGIN +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 16 Dec 2014 02:56:03 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:03 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" = 1443 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", Tue, 16 Dec 2014 02:56:03 UTC +00:00], ["state", "pending"], ["target_id", 1443], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:03 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SAVEPOINT active_record_1 +  (0.2ms) ROLLBACK TO SAVEPOINT active_record_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", Tue, 16 Dec 2014 02:56:03 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:03 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" = 1444 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.4ms) 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", Tue, 16 Dec 2014 02:56:03 UTC +00:00], ["state", "pending"], ["target_id", 1444], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:03 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" = 1444 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" = 1444 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1465) + NotifyUser::BaseNotification Load (0.8ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1465]] + User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1444]] + 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" = 1444 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' +  (0.2ms) SAVEPOINT active_record_1 + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1444]] +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1444 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" = 1465 [["state", "sent"], ["updated_at", Tue, 16 Dec 2014 02:56:03 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 1465 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1444]] +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1444 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' + NewPostNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1465 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1444]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1444 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns' +  (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", Tue, 16 Dec 2014 02:56:03 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:03 UTC +00:00]] +  (0.3ms) 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" = 1445 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", Tue, 16 Dec 2014 02:56:03 UTC +00:00], ["state", "pending"], ["target_id", 1445], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:03 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" = 1445 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_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1445 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1466) + NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1466]] + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1445]] + 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" = 1445 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' +  (0.3ms) SAVEPOINT active_record_1 + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1445]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1445 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" = 1466 [["state", "sent"], ["updated_at", Tue, 16 Dec 2014 02:56:03 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" = 1466 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1445]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1445 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' + NewPostNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1466 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1445]] +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1445 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns' +  (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", Tue, 16 Dec 2014 02:56:03 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:03 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" = 1446 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.4ms) 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", Tue, 16 Dec 2014 02:56:03 UTC +00:00], ["state", "pending"], ["target_id", 1446], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:03 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" = 1446 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_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1446 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1467) +  (0.2ms) SAVEPOINT active_record_1 +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1446 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.4ms) 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", Tue, 16 Dec 2014 02:56:03 UTC +00:00], ["state", "pending"], ["target_id", 1446], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:03 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) 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" = 1446 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1468) +  (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", Tue, 16 Dec 2014 02:56:03 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:03 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" = 1447 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", Tue, 16 Dec 2014 02:56:03 UTC +00:00], ["state", "pending"], ["target_id", 1447], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:03 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" = 1447 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.4ms) 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", Tue, 16 Dec 2014 02:56:03 UTC +00:00], ["state", "pending"], ["target_id", 1447], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:03 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NewPostNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1470]] + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1447]] + NewPostNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1447 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' +  (0.3ms) SAVEPOINT active_record_1 + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1447]] +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1447 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" = 1469 [["state", "sent"], ["updated_at", Tue, 16 Dec 2014 02:56:03 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", 1447]] +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1447 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" = 1470 [["state", "sent"], ["updated_at", Tue, 16 Dec 2014 02:56:03 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1447 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" = 1447 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" = 'CkTJdKOdmhKE48UT4JXwjQi6FLCArlIgvvNtdNmpWu0A' 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", Tue, 16 Dec 2014 02:56:04 UTC +00:00], ["target_id", 1447], ["target_type", "User"], ["token", "CkTJdKOdmhKE48UT4JXwjQi6FLCArlIgvvNtdNmpWu0A"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:04 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + +Sent mail to user@example.com (12.9ms) +Date: Tue, 16 Dec 2014 13:56:04 +1100 +From: please-change-me-at-config-initializers-notify-user@example.com +To: user@example.com +Message-ID: <548f9f44ac66_8a1b3fd73e057be81321d@wp.local.mail> +Subject: Rails404: You have new Newpostnotification 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=3DCkTJdKOdmhKE48UT4JXwjQi6FLCArlIgvvNtdNmpWu0A&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.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 16 Dec 2014 02:56:04 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:04 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" = 1448 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", Tue, 16 Dec 2014 02:56:04 UTC +00:00], ["state", "pending"], ["target_id", 1448], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:04 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') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1471]] + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1448]] + NewPostNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1448 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' +  (0.3ms) SAVEPOINT active_record_1 + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1448]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1448 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" = 1471 [["state", "sent"], ["updated_at", Tue, 16 Dec 2014 02:56:04 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') AND "notify_user_notifications"."id" = 1471 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1448]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1448 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" = 1448 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" = 'tNJPiiN4FlfKlHeO9LPraASPeVtvYQtlNnydfFJG55HQ' 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", Tue, 16 Dec 2014 02:56:04 UTC +00:00], ["target_id", 1448], ["target_type", "User"], ["token", "tNJPiiN4FlfKlHeO9LPraASPeVtvYQtlNnydfFJG55HQ"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:04 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + +Sent mail to user@example.com (5.7ms) +Date: Tue, 16 Dec 2014 13:56:04 +1100 +From: please-change-me-at-config-initializers-notify-user@example.com +To: user@example.com +Message-ID: <548f9f44170f8_8a1b3fd73e057be81337c@wp.local.mail> +Subject: Rails404: You have a new Newpostnotification 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=3DtNJPiiN4FlfKlHeO9LPraASPeVtvYQtlNnydfFJG55HQ&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.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1448 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns' +  (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", Tue, 16 Dec 2014 02:56:04 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:04 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" = 1449) 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", Tue, 16 Dec 2014 02:56:04 UTC +00:00], ["target_id", 1449], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:04 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" = 1449 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.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", Tue, 16 Dec 2014 02:56:04 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:04 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SAVEPOINT active_record_1 +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1450 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.4ms) 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", Tue, 16 Dec 2014 02:56:04 UTC +00:00], ["state", "pending"], ["target_id", 1450], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:04 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 1472 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1450]] +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1450 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", Tue, 16 Dec 2014 02:56:04 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:04 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" = 1451 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", Tue, 16 Dec 2014 02:56:04 UTC +00:00], ["state", "pending"], ["target_id", 1451], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:04 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" = 1451 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", Tue, 16 Dec 2014 02:56:04 UTC +00:00], ["state", "pending"], ["target_id", 1451], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:04 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 + NewPostNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1474]] + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1451]] + NewPostNotification Load (0.8ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1451 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' +  (0.2ms) SAVEPOINT active_record_1 + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1451]] +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1451 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" = 1473 [["state", "sent"], ["updated_at", Tue, 16 Dec 2014 02:56:04 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", 1451]] +  (0.7ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1451 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" = 1474 [["state", "sent"], ["updated_at", Tue, 16 Dec 2014 02:56:04 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1451 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' + NotifyUser::UserHash Load (0.6ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1451 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" = 'bpaCsyAGskFt10Av8wYqnwxx68eEvDFpA_zgIFocN3Vw' 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", Tue, 16 Dec 2014 02:56:04 UTC +00:00], ["target_id", 1451], ["target_type", "User"], ["token", "bpaCsyAGskFt10Av8wYqnwxx68eEvDFpA_zgIFocN3Vw"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:04 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + +Sent mail to user@example.com (5.7ms) +Date: Tue, 16 Dec 2014 13:56:04 +1100 +From: please-change-me-at-config-initializers-notify-user@example.com +To: user@example.com +Message-ID: <548f9f442a4ca_8a1b3fd73e057be813415@wp.local.mail> +Subject: Rails404: You have new Newpostnotification 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=3DbpaCsyAGskFt10Av8wYqnwxx68eEvDFpA_zgIFocN3Vw&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.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", Tue, 16 Dec 2014 02:56:04 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:04 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" = 1452 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.4ms) 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", Tue, 16 Dec 2014 02:56:04 UTC +00:00], ["state", "pending"], ["target_id", 1452], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:04 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NewPostNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1475]] + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1452]] + NewPostNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1452 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' +  (0.2ms) SAVEPOINT active_record_1 + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1452]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1452 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" = 1475 [["state", "sent"], ["updated_at", Tue, 16 Dec 2014 02:56:04 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') AND "notify_user_notifications"."id" = 1475 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1452]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1452 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' + NotifyUser::UserHash Load (0.6ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1452 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" = 'a3CDHYqSFkeBGyJbdZeP3wj7Y2qNjU-wxdRhzSeiCOcA' 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", Tue, 16 Dec 2014 02:56:04 UTC +00:00], ["target_id", 1452], ["target_type", "User"], ["token", "a3CDHYqSFkeBGyJbdZeP3wj7Y2qNjU-wxdRhzSeiCOcA"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:04 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + +Sent mail to user@example.com (6.0ms) +Date: Tue, 16 Dec 2014 13:56:04 +1100 +From: please-change-me-at-config-initializers-notify-user@example.com +To: user@example.com +Message-ID: <548f9f4434059_8a1b3fd73e057be81359c@wp.local.mail> +Subject: Rails404: You have a new Newpostnotification 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=3Da3CDHYqSFkeBGyJbdZeP3wj7Y2qNjU-wxdRhzSeiCOcA&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.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", Tue, 16 Dec 2014 02:56:04 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:04 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" = 1453 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", Tue, 16 Dec 2014 02:56:04 UTC +00:00], ["state", "pending"], ["target_id", 1453], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:04 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" = 1453 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1453 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.2ms) SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1453 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" = 1476 [["state", "sent"], ["updated_at", Tue, 16 Dec 2014 02:56:04 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') AND "notify_user_notifications"."id" = 1476 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1453]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1453 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" = 1453 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns' +  (0.2ms) ROLLBACK +  (0.1ms) 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", Tue, 16 Dec 2014 02:56:04 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:04 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + NotifyUser::Unsubscribe Exists (0.4ms) 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" = 1454) 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", Tue, 16 Dec 2014 02:56:04 UTC +00:00], ["target_id", 1454], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:04 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" = 1454 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.2ms) 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" = 1454 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1454 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.2ms) ROLLBACK +  (0.4ms) 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", Tue, 16 Dec 2014 02:56:04 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:04 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" = 'action_mailer' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1455) 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", Tue, 16 Dec 2014 02:56:04 UTC +00:00], ["target_id", 1455], ["target_type", "User"], ["type", "action_mailer"], ["updated_at", Tue, 16 Dec 2014 02:56:04 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" = 'action_mailer' AND "notify_user_unsubscribes"."id" != 331 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1455) LIMIT 1 +  (0.3ms) 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" = 1455 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.4ms) 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", Tue, 16 Dec 2014 02:56:04 UTC +00:00], ["state", "pending"], ["target_id", 1455], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:04 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" = 1455 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1455 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.2ms) SAVEPOINT active_record_1 +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1455 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" = 1477 [["state", "sent"], ["updated_at", Tue, 16 Dec 2014 02:56:04 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') AND "notify_user_notifications"."id" = 1477 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1455]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1455 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" = 1455 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns' +  (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", Tue, 16 Dec 2014 02:56:04 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:04 UTC +00:00]] +  (0.6ms) 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" = 1456 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", Tue, 16 Dec 2014 02:56:04 UTC +00:00], ["state", "pending"], ["target_id", 1456], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:04 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NotifyUser::UserHash Load (0.8ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1456 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" = 'r1KWiYJPmQU3P1OV2OS3OAr7BFa9GwH9ODI6jZ_JKmRg' 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", Tue, 16 Dec 2014 02:56:04 UTC +00:00], ["target_id", 1456], ["target_type", "User"], ["token", "r1KWiYJPmQU3P1OV2OS3OAr7BFa9GwH9ODI6jZ_JKmRg"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:04 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) 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", Tue, 16 Dec 2014 02:56:04 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:04 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" = 1457 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", Tue, 16 Dec 2014 02:56:04 UTC +00:00], ["state", "pending"], ["target_id", 1457], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:04 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" = 1457 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" = 'uUFdrHYEKys1ygE5-LsFJQVS41KGpNXIU4rI3vhHF0sg' 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", Tue, 16 Dec 2014 02:56:04 UTC +00:00], ["target_id", 1457], ["target_type", "User"], ["token", "uUFdrHYEKys1ygE5-LsFJQVS41KGpNXIU4rI3vhHF0sg"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:04 UTC +00:00]] +  (0.3ms) 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" = 1457 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) 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", Tue, 16 Dec 2014 02:56:04 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:04 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 +  (1.1ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1458 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", Tue, 16 Dec 2014 02:56:04 UTC +00:00], ["state", "pending"], ["target_id", 1458], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:04 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" = 1458 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" = 'd-wkkUg-7ZT_b4gUONuPYwORAR405mC9GtWeRz8MQqSw' 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", Tue, 16 Dec 2014 02:56:04 UTC +00:00], ["target_id", 1458], ["target_type", "User"], ["token", "d-wkkUg-7ZT_b4gUONuPYwORAR405mC9GtWeRz8MQqSw"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:04 UTC +00:00]] +  (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" = 409 [["active", false], ["updated_at", Tue, 16 Dec 2014 02:56:04 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" = 1458 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" = 'UdPtIdpoOppOPUC5iNZOaQ1OnjcHjN34I08_za85lM2A' 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", Tue, 16 Dec 2014 02:56:04 UTC +00:00], ["target_id", 1458], ["target_type", "User"], ["token", "UdPtIdpoOppOPUC5iNZOaQ1OnjcHjN34I08_za85lM2A"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:04 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_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", Tue, 16 Dec 2014 02:56:04 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:04 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" = 1459) 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", Tue, 16 Dec 2014 02:56:04 UTC +00:00], ["target_id", 1459], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:04 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + NotifyUser::Unsubscribe Exists (0.4ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 332 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1459) LIMIT 1 +  (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" = 1459 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.2ms) ROLLBACK TO SAVEPOINT active_record_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", Tue, 16 Dec 2014 02:56:04 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:04 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" = 1460) 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", Tue, 16 Dec 2014 02:56:04 UTC +00:00], ["target_id", 1460], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:04 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" != 333 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1460) LIMIT 1 +  (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" = 1460 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.2ms) ROLLBACK TO SAVEPOINT active_record_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", Tue, 16 Dec 2014 02:56:04 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:04 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" = 1461) 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", Tue, 16 Dec 2014 02:56:04 UTC +00:00], ["target_id", 1461], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:04 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"."id" != 334 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1461) LIMIT 1 +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + NotifyUser::Unsubscribe Exists (0.4ms) 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" = 1461) LIMIT 1 +  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1461 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + NotifyUser::Unsubscribe Load (0.5ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1461 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.4ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 334]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NotifyUser::Unsubscribe Load (0.6ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1461 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (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", Tue, 16 Dec 2014 02:56:04 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:04 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" = 1462 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", Tue, 16 Dec 2014 02:56:04 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1462], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:04 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_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", Tue, 16 Dec 2014 02:56:04 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:04 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_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" = 'xqzjiEKeUTQJ7qDrnbR3rQjeVHXeIzEzgZ7uEl1rTd6w' LIMIT 1 + SQL (0.4ms) 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", Tue, 16 Dec 2014 02:56:04 UTC +00:00], ["target_id", 1463], ["target_type", "User"], ["token", "xqzjiEKeUTQJ7qDrnbR3rQjeVHXeIzEzgZ7uEl1rTd6w"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:04 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.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'xqzjiEKeUTQJ7qDrnbR3rQjeVHXeIzEzgZ7uEl1rTd6w' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' 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", Tue, 16 Dec 2014 02:56:04 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:04 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_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" = 'pNJRD2mZvsHLKwALcA_-ZAcuPL6Z-eX8DvTOOKLj3IEg' LIMIT 1 + SQL (0.4ms) 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", Tue, 16 Dec 2014 02:56:04 UTC +00:00], ["target_id", 1464], ["target_type", "User"], ["token", "pNJRD2mZvsHLKwALcA_-ZAcuPL6Z-eX8DvTOOKLj3IEg"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:04 UTC +00:00]] +  (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 + SQL (0.8ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 412 [["active", false], ["updated_at", Tue, 16 Dec 2014 02:56:04 UTC +00:00]] +  (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" = 'pNJRD2mZvsHLKwALcA_-ZAcuPL6Z-eX8DvTOOKLj3IEg' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' 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", Tue, 16 Dec 2014 02:56:04 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:04 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" = '_q9fvkHTdET4lpuFt5R1jwQ7q_iPYQFZh8u3vp-9s05w' 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", Tue, 16 Dec 2014 02:56:04 UTC +00:00], ["target_id", 1465], ["target_type", "User"], ["token", "_q9fvkHTdET4lpuFt5R1jwQ7q_iPYQFZh8u3vp-9s05w"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:04 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) SAVEPOINT active_record_1 + SQL (0.7ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 413 [["active", false], ["updated_at", Tue, 16 Dec 2014 02:56:04 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_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", Tue, 16 Dec 2014 02:56:04 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:04 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_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" = 'qRmFcW-kY3K8MQfF33bKQQ9ds9GpfHeW2uG49T0_jt8w' LIMIT 1 + SQL (0.4ms) 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", Tue, 16 Dec 2014 02:56:04 UTC +00:00], ["target_id", 1466], ["target_type", "User"], ["token", "qRmFcW-kY3K8MQfF33bKQQ9ds9GpfHeW2uG49T0_jt8w"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:04 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +  (0.2ms) ROLLBACK +  (0.1ms) 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.2ms) BEGIN +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +  (0.3ms) SAVEPOINT active_record_1 + SQL (4.1ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 16 Dec 2014 02:56:23 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:23 UTC +00:00]] +  (0.2ms) 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.3ms) +Completed 200 OK in 11ms (Views: 8.4ms | ActiveRecord: 0.0ms) +  (0.4ms) 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", Tue, 16 Dec 2014 02:56:23 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:23 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SAVEPOINT active_record_1 +  (1.7ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1468 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (1.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", Tue, 16 Dec 2014 02:56:23 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1468], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:23 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#index as JSON +  (0.9ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1468 AND "notify_user_notifications"."target_type" = 'User' + NotifyUser::BaseNotification Load (2.2ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1468 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 +Completed 200 OK in 17ms (Views: 8.6ms | ActiveRecord: 3.1ms) +  (0.4ms) 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", Tue, 16 Dec 2014 02:56:23 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:23 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" = 1469 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", Tue, 16 Dec 2014 02:56:23 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1469], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:23 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" = 1469 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", Tue, 16 Dec 2014 02:56:23 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1469], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:23 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" = 1469 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", Tue, 16 Dec 2014 02:56:23 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1469], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:23 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#index as HTML + NotifyUser::BaseNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1469 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 +Completed 200 OK in 30ms (Views: 27.8ms | ActiveRecord: 0.7ms) +  (0.4ms) 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", Tue, 16 Dec 2014 02:56:23 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:23 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" = 1470 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.8ms) 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", Tue, 16 Dec 2014 02:56:23 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1470], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:23 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" = 1470 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", Tue, 16 Dec 2014 02:56:23 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1470], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:23 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" = 1470 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", Tue, 16 Dec 2014 02:56:23 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1470], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:23 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#read as HTML + Parameters: {"id"=>"1486"} + NotifyUser::BaseNotification Load (0.9ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1470 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1486') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 +  (0.2ms) SAVEPOINT active_record_1 + User Load (1.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1470]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1470 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (1.3ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1486 [["state", "read"], ["updated_at", Tue, 16 Dec 2014 02:56:23 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +Completed 200 OK in 18ms (Views: 1.8ms | ActiveRecord: 4.1ms) + NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 1486 ORDER BY "notify_user_notifications"."id" ASC 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", Tue, 16 Dec 2014 02:56:23 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:23 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" = 1471 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", Tue, 16 Dec 2014 02:56:23 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1471], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:23 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" = 1471 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", Tue, 16 Dec 2014 02:56:23 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1471], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:23 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" = 1471 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", Tue, 16 Dec 2014 02:56:23 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1471], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:23 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#read as HTML + Parameters: {"id"=>"1489"} + NotifyUser::BaseNotification Load (0.9ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1471 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1489') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 +  (0.3ms) SAVEPOINT active_record_1 + User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1471]] +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1471 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (1.2ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1489 [["state", "read"], ["updated_at", Tue, 16 Dec 2014 02:56:23 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Completed 200 OK in 11ms (Views: 0.4ms | ActiveRecord: 3.7ms) +Processing by NotifyUser::NotificationsController#read as HTML + Parameters: {"id"=>"1489"} + NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1471 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1489') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 +Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 4.3ms) +  (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", Tue, 16 Dec 2014 02:56:23 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:23 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" = 1472 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", Tue, 16 Dec 2014 02:56:23 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1472], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:23 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" = 1472 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", Tue, 16 Dec 2014 02:56:23 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1472], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:23 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" = 1472 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", Tue, 16 Dec 2014 02:56:23 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1472], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:23 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#mark_all as HTML + SQL (1.0ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1472 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.0ms) + NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1472 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('["pending","sent"]')) +  (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", Tue, 16 Dec 2014 02:56:23 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:23 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" = 1473 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", Tue, 16 Dec 2014 02:56:23 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1473], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:23 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#mark_read as HTML + Parameters: {"ids"=>["1495"]} + SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1473 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1495')) + NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1473 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1495')) +Completed 200 OK in 5ms (Views: 2.1ms | ActiveRecord: 1.2ms) + 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", 1495]] +  (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", Tue, 16 Dec 2014 02:56:23 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:23 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" = 1474 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", Tue, 16 Dec 2014 02:56:23 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1474], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:23 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#mark_read as HTML + Parameters: {"ids"=>["1496"]} + SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1474 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1496')) + NotifyUser::BaseNotification Load (1.1ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1474 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1496')) +Completed 200 OK in 5ms (Views: 2.4ms | ActiveRecord: 1.6ms) +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN +  (0.3ms) SAVEPOINT active_record_1 + SQL (0.9ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 16 Dec 2014 02:56:23 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:23 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" = 1475 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", Tue, 16 Dec 2014 02:56:23 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1475], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:23 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NotifyUser::Unsubscribe Load (0.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1475 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.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1475 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (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"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1475) LIMIT 1 + SQL (1.0ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Tue, 16 Dec 2014 02:56:23 UTC +00:00], ["target_id", 1475], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:23 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.8ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1475 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +Completed 200 OK in 17ms (Views: 0.3ms | ActiveRecord: 3.4ms) + NotifyUser::Unsubscribe Load (0.5ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1475 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (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", Tue, 16 Dec 2014 02:56:23 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:23 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" = 1476 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (12.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", Tue, 16 Dec 2014 02:56:23 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1476], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:23 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" = 1476 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" = 1476 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1476 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 1.2ms) + NotifyUser::Unsubscribe Load (0.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1476 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (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", Tue, 16 Dec 2014 02:56:23 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:23 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" = 1477 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", Tue, 16 Dec 2014 02:56:23 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1477], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:23 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#unsubscribe as HTML + Parameters: {"type"=>"NewPostNotification"} +  (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" = 1477) 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", Tue, 16 Dec 2014 02:56:23 UTC +00:00], ["target_id", 1477], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:23 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://test.host/notify_user/notifications/unsubscribe +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1477 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +Completed 302 Found in 6ms (ActiveRecord: 1.9ms) + NotifyUser::Unsubscribe Load (0.4ms) 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.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 16 Dec 2014 02:56:23 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:23 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" = 1478 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", Tue, 16 Dec 2014 02:56:23 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1478], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:23 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" = 1478) 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", Tue, 16 Dec 2014 02:56:23 UTC +00:00], ["target_id", 1478], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:23 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#subscribe as HTML + Parameters: {"type"=>"NewPostNotification"} + NotifyUser::Unsubscribe Load (0.7ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1478 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.6ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 337]] +  (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.2ms) SAVEPOINT active_record_1 + SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 16 Dec 2014 02:56:23 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:23 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" = 1479 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", Tue, 16 Dec 2014 02:56:23 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1479], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:23 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NotifyUser::UserHash Load (0.8ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1479 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" = 'JEFGx5o9aljfCNgOVJxYgA694tPkC3RS2hiYMPTzxKBw' LIMIT 1 + SQL (1.1ms) 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", Tue, 16 Dec 2014 02:56:23 UTC +00:00], ["target_id", 1479], ["target_type", "User"], ["token", "JEFGx5o9aljfCNgOVJxYgA694tPkC3RS2hiYMPTzxKBw"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:23 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#unauth_unsubscribe as HTML + Parameters: {"type"=>"NewPostNotification", "token"=>"JEFGx5o9aljfCNgOVJxYgA694tPkC3RS2hiYMPTzxKBw"} + NotifyUser::UserHash Exists (0.5ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'JEFGx5o9aljfCNgOVJxYgA694tPkC3RS2hiYMPTzxKBw' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1 + NotifyUser::UserHash Load (0.5ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'JEFGx5o9aljfCNgOVJxYgA694tPkC3RS2hiYMPTzxKBw' 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", 1479]] +  (0.2ms) SAVEPOINT active_record_1 + NotifyUser::Unsubscribe Exists (0.4ms) 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" = 1479) 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", Tue, 16 Dec 2014 02:56:23 UTC +00:00], ["target_id", 1479], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:23 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SAVEPOINT active_record_1 + SQL (0.8ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 415 [["active", false], ["updated_at", Tue, 16 Dec 2014 02:56:23 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Completed 200 OK in 12ms (Views: 0.5ms | ActiveRecord: 4.0ms) + 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 (1.0ms) 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.3ms) 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.2ms) SAVEPOINT active_record_1 +  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 + 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.2ms) ROLLBACK TO SAVEPOINT active_record_1 +  (0.3ms) 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.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.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", Tue, 16 Dec 2014 02:56:24 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:24 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" = 1480 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", Tue, 16 Dec 2014 02:56:24 UTC +00:00], ["state", "pending"], ["target_id", 1480], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:24 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1480 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('sent','pending')) +  (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", Tue, 16 Dec 2014 02:56:24 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:24 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" = 1481 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (1.1ms) 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", Tue, 16 Dec 2014 02:56:24 UTC +00:00], ["state", "pending"], ["target_id", 1481], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:24 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 16 Dec 2014 02:56:24 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:24 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" = 1482 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", Tue, 16 Dec 2014 02:56:24 UTC +00:00], ["state", "pending"], ["target_id", 1482], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:24 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (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", Tue, 16 Dec 2014 02:56:24 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:24 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" = 1483 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", Tue, 16 Dec 2014 02:56:24 UTC +00:00], ["state", "pending"], ["target_id", 1483], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:24 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" = 1483 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" = 1505 [["params", {"listing_id"=>1}], ["updated_at", Tue, 16 Dec 2014 02:56:24 UTC +00:00]] +  (0.3ms) 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", Tue, 16 Dec 2014 02:56:24 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:24 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" = 1484 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", Tue, 16 Dec 2014 02:56:24 UTC +00:00], ["state", "pending"], ["target_id", 1484], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:24 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) SAVEPOINT active_record_1 +  (0.9ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1484 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (1.1ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1506 [["params", {"listing_id"=>1}], ["updated_at", Tue, 16 Dec 2014 02:56:24 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') 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", Tue, 16 Dec 2014 02:56:24 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:24 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" = 1485 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", Tue, 16 Dec 2014 02:56:24 UTC +00:00], ["state", "pending"], ["target_id", 1485], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:24 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" = 1485 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (1.1ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1507 [["params", {:listing_id=>1}], ["updated_at", Tue, 16 Dec 2014 02:56:24 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NewPostNotification Load (0.6ms) 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.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", Tue, 16 Dec 2014 02:56:24 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:24 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" = 1486 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", Tue, 16 Dec 2014 02:56:24 UTC +00:00], ["state", "pending"], ["target_id", 1486], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:24 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" = 1486 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.8ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1508 [["params", {:listing_id=>1}], ["updated_at", Tue, 16 Dec 2014 02:56:24 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NewPostNotification Load (0.6ms) 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.2ms) 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", Tue, 16 Dec 2014 02:56:24 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:24 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" = 1487 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.4ms) 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", Tue, 16 Dec 2014 02:56:24 UTC +00:00], ["state", "pending"], ["target_id", 1487], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:24 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 +  (0.3ms) ROLLBACK TO SAVEPOINT active_record_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", Tue, 16 Dec 2014 02:56:24 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:24 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" = 1488 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", Tue, 16 Dec 2014 02:56:24 UTC +00:00], ["state", "pending"], ["target_id", 1488], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:24 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" = 1488 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.2ms) 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" = 1488 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1510) + NotifyUser::BaseNotification Load (0.9ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1510]] + User Load (0.6ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1488]] + NotifyUser::BaseNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1488 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' +  (0.2ms) SAVEPOINT active_record_1 + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1488]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1488 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" = 1510 [["state", "sent"], ["updated_at", Tue, 16 Dec 2014 02:56:24 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" = 1510 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1488]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1488 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' + NewPostNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1510 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1488]] +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1488 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns' +  (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", Tue, 16 Dec 2014 02:56:24 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:24 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" = 1489 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", Tue, 16 Dec 2014 02:56:24 UTC +00:00], ["state", "pending"], ["target_id", 1489], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:24 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 +  (0.9ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1489 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.5ms) 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" = 1489 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1511) + NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1511]] + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1489]] + 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" = 1489 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' +  (0.2ms) SAVEPOINT active_record_1 + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1489]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1489 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" = 1511 [["state", "sent"], ["updated_at", Tue, 16 Dec 2014 02:56:24 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 1511 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1489]] +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1489 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' + NewPostNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1511 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1489]] +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1489 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns' +  (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", Tue, 16 Dec 2014 02:56:24 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:24 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" = 1490 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", Tue, 16 Dec 2014 02:56:24 UTC +00:00], ["state", "pending"], ["target_id", 1490], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:24 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" = 1490 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" = 1490 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1512) +  (0.2ms) SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1490 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", Tue, 16 Dec 2014 02:56:24 UTC +00:00], ["state", "pending"], ["target_id", 1490], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:24 UTC +00:00]] +  (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" = 1490 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1513) +  (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", Tue, 16 Dec 2014 02:56:24 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:24 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" = 1491 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", Tue, 16 Dec 2014 02:56:24 UTC +00:00], ["state", "pending"], ["target_id", 1491], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:24 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" = 1491 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", Tue, 16 Dec 2014 02:56:24 UTC +00:00], ["state", "pending"], ["target_id", 1491], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:24 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NewPostNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1515]] + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1491]] + NewPostNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1491 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' +  (0.2ms) SAVEPOINT active_record_1 + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1491]] +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1491 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" = 1514 [["state", "sent"], ["updated_at", Tue, 16 Dec 2014 02:56:24 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", 1491]] +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1491 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (1.2ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1515 [["state", "sent"], ["updated_at", Tue, 16 Dec 2014 02:56:24 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1491 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" = 1491 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.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'w54jKskszVSq3qU1gwRswQGbOk3ENbD6VwXt_5vxGBLw' 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", Tue, 16 Dec 2014 02:56:24 UTC +00:00], ["target_id", 1491], ["target_type", "User"], ["token", "w54jKskszVSq3qU1gwRswQGbOk3ENbD6VwXt_5vxGBLw"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:24 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + +Sent mail to user@example.com (8.8ms) +Date: Tue, 16 Dec 2014 13:56:24 +1100 +From: please-change-me-at-config-initializers-notify-user@example.com +To: user@example.com +Message-ID: <548f9f584797f_8a833fdecd065be458233@wp.local.mail> +Subject: Rails404: You have new Newpostnotification 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=3Dw54jKskszVSq3qU1gwRswQGbOk3ENbD6VwXt_5vxGBLw&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.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", Tue, 16 Dec 2014 02:56:24 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:24 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" = 1492 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", Tue, 16 Dec 2014 02:56:24 UTC +00:00], ["state", "pending"], ["target_id", 1492], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:24 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') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1516]] + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1492]] + NewPostNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1492 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' +  (0.2ms) SAVEPOINT active_record_1 + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1492]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1492 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" = 1516 [["state", "sent"], ["updated_at", Tue, 16 Dec 2014 02:56:24 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" = 1516 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1492]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1492 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" = 1492 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.4ms) SAVEPOINT active_record_1 + NotifyUser::UserHash Exists (0.5ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '1xxrST3Gst25DPTP8zMBlQ-hUwBeIEr5nPKu18gs1N6w' 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", Tue, 16 Dec 2014 02:56:24 UTC +00:00], ["target_id", 1492], ["target_type", "User"], ["token", "1xxrST3Gst25DPTP8zMBlQ-hUwBeIEr5nPKu18gs1N6w"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:24 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + +Sent mail to user@example.com (7.2ms) +Date: Tue, 16 Dec 2014 13:56:24 +1100 +From: please-change-me-at-config-initializers-notify-user@example.com +To: user@example.com +Message-ID: <548f9f5853205_8a833fdecd065be4583c6@wp.local.mail> +Subject: Rails404: You have a new Newpostnotification 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=3D1xxrST3Gst25DPTP8zMBlQ-hUwBeIEr5nPKu18gs1N6w&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" = 1492 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns' +  (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", Tue, 16 Dec 2014 02:56:24 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:24 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" = 1493) 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", Tue, 16 Dec 2014 02:56:24 UTC +00:00], ["target_id", 1493], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:24 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" = 1493 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.4ms) 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.3ms) 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", Tue, 16 Dec 2014 02:56:24 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:24 UTC +00:00]] +  (0.2ms) 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" = 1494 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", Tue, 16 Dec 2014 02:56:24 UTC +00:00], ["state", "pending"], ["target_id", 1494], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:24 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" = 1517 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1494]] +  (0.9ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1494 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' +  (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", Tue, 16 Dec 2014 02:56:24 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:24 UTC +00:00]] +  (0.7ms) 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" = 1495 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", Tue, 16 Dec 2014 02:56:24 UTC +00:00], ["state", "pending"], ["target_id", 1495], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:24 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SAVEPOINT active_record_1 +  (0.9ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1495 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", Tue, 16 Dec 2014 02:56:24 UTC +00:00], ["state", "pending"], ["target_id", 1495], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:24 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NewPostNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1519]] + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1495]] + NewPostNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1495 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' +  (0.3ms) SAVEPOINT active_record_1 + User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1495]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1495 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" = 1518 [["state", "sent"], ["updated_at", Tue, 16 Dec 2014 02:56:24 UTC +00:00]] +  (0.3ms) 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", 1495]] +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1495 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" = 1519 [["state", "sent"], ["updated_at", Tue, 16 Dec 2014 02:56:24 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1495 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' + NotifyUser::UserHash Load (0.6ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1495 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.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'Qi1_9isep80YISoPAR-_dwCC_ctG_OwFdLvPFcnnuclA' 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", Tue, 16 Dec 2014 02:56:24 UTC +00:00], ["target_id", 1495], ["target_type", "User"], ["token", "Qi1_9isep80YISoPAR-_dwCC_ctG_OwFdLvPFcnnuclA"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:24 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + +Sent mail to user@example.com (6.7ms) +Date: Tue, 16 Dec 2014 13:56:24 +1100 +From: please-change-me-at-config-initializers-notify-user@example.com +To: user@example.com +Message-ID: <548f9f5868a61_8a833fdecd065be4584e8@wp.local.mail> +Subject: Rails404: You have new Newpostnotification 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=3DQi1_9isep80YISoPAR-_dwCC_ctG_OwFdLvPFcnnuclA&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.3ms) 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", Tue, 16 Dec 2014 02:56:24 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:24 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" = 1496 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", Tue, 16 Dec 2014 02:56:24 UTC +00:00], ["state", "pending"], ["target_id", 1496], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:24 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NewPostNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1520]] + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1496]] + NewPostNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1496 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' +  (0.2ms) SAVEPOINT active_record_1 + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1496]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1496 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" = 1520 [["state", "sent"], ["updated_at", Tue, 16 Dec 2014 02:56:24 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" = 1520 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1496]] +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1496 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" = 1496 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" = '9RwhvvvaUabal0_n-8jKIQt1Nj_-i2v5q80_2juG47Iw' 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", Tue, 16 Dec 2014 02:56:24 UTC +00:00], ["target_id", 1496], ["target_type", "User"], ["token", "9RwhvvvaUabal0_n-8jKIQt1Nj_-i2v5q80_2juG47Iw"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:24 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + +Sent mail to user@example.com (7.8ms) +Date: Tue, 16 Dec 2014 13:56:24 +1100 +From: please-change-me-at-config-initializers-notify-user@example.com +To: user@example.com +Message-ID: <548f9f5873838_8a833fdecd065be458550@wp.local.mail> +Subject: Rails404: You have a new Newpostnotification 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=3D9RwhvvvaUabal0_n-8jKIQt1Nj_-i2v5q80_2juG47Iw&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.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", Tue, 16 Dec 2014 02:56:24 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:24 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" = 1497 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", Tue, 16 Dec 2014 02:56:24 UTC +00:00], ["state", "pending"], ["target_id", 1497], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:24 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" = 1497 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_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1497 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.2ms) SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1497 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" = 1521 [["state", "sent"], ["updated_at", Tue, 16 Dec 2014 02:56:24 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 + NewPostNotification Load (0.8ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1521 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1497]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1497 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" = 1497 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns' +  (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", Tue, 16 Dec 2014 02:56:24 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:24 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" = 1498) 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", Tue, 16 Dec 2014 02:56:24 UTC +00:00], ["target_id", 1498], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:24 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" = 1498 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1 +  (0.3ms) SAVEPOINT active_record_1 +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1498 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1498 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.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 16 Dec 2014 02:56:24 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:24 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" = 'action_mailer' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1499) 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", Tue, 16 Dec 2014 02:56:24 UTC +00:00], ["target_id", 1499], ["target_type", "User"], ["type", "action_mailer"], ["updated_at", Tue, 16 Dec 2014 02:56:24 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" = 'action_mailer' AND "notify_user_unsubscribes"."id" != 341 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1499) LIMIT 1 +  (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" = 1499 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", Tue, 16 Dec 2014 02:56:24 UTC +00:00], ["state", "pending"], ["target_id", 1499], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:24 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" = 1499 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1499 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.2ms) SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1499 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" = 1522 [["state", "sent"], ["updated_at", Tue, 16 Dec 2014 02:56:24 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') AND "notify_user_notifications"."id" = 1522 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1499]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1499 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" = 1499 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns' +  (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", Tue, 16 Dec 2014 02:56:24 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:24 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" = 1500 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", Tue, 16 Dec 2014 02:56:24 UTC +00:00], ["state", "pending"], ["target_id", 1500], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:24 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NotifyUser::UserHash Load (0.5ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1500 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" = 'YFi8ULF5n-meX7GfQyuGhwCeDm8Rt3jQVlIFEZJOIwXQ' 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", Tue, 16 Dec 2014 02:56:24 UTC +00:00], ["target_id", 1500], ["target_type", "User"], ["token", "YFi8ULF5n-meX7GfQyuGhwCeDm8Rt3jQVlIFEZJOIwXQ"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:24 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_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", Tue, 16 Dec 2014 02:56:24 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:24 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" = 1501 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", Tue, 16 Dec 2014 02:56:24 UTC +00:00], ["state", "pending"], ["target_id", 1501], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:24 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NotifyUser::UserHash Load (0.5ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1501 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" = 'UbiXbZbiRSg41L00Q1SZPAoBqeCXC0L9LO9i02l90CVQ' 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", Tue, 16 Dec 2014 02:56:24 UTC +00:00], ["target_id", 1501], ["target_type", "User"], ["token", "UbiXbZbiRSg41L00Q1SZPAoBqeCXC0L9LO9i02l90CVQ"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:24 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" = 1501 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) 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", Tue, 16 Dec 2014 02:56:24 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:24 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" = 1502 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", Tue, 16 Dec 2014 02:56:24 UTC +00:00], ["state", "pending"], ["target_id", 1502], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:24 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NotifyUser::UserHash Load (0.5ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1502 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" = 'KAnp1RM1b1qqgD4P-cXsTQJLDWMbzL3kx_yiwFPdR2xA' 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", Tue, 16 Dec 2014 02:56:24 UTC +00:00], ["target_id", 1502], ["target_type", "User"], ["token", "KAnp1RM1b1qqgD4P-cXsTQJLDWMbzL3kx_yiwFPdR2xA"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:24 UTC +00:00]] +  (0.2ms) 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" = 422 [["active", false], ["updated_at", Tue, 16 Dec 2014 02:56:24 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" = 1502 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.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'V_R1ZIy3PuTNO2gXVpQ6rgdr6MC6bQ5JLRQ8K5Th2q9w' 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", Tue, 16 Dec 2014 02:56:24 UTC +00:00], ["target_id", 1502], ["target_type", "User"], ["token", "V_R1ZIy3PuTNO2gXVpQ6rgdr6MC6bQ5JLRQ8K5Th2q9w"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:24 UTC +00:00]] +  (0.3ms) 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", Tue, 16 Dec 2014 02:56:24 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:24 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" = 1503) LIMIT 1 + SQL (0.4ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Tue, 16 Dec 2014 02:56:24 UTC +00:00], ["target_id", 1503], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:24 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + NotifyUser::Unsubscribe Exists (0.4ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 342 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1503) LIMIT 1 +  (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" = 1503 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.2ms) ROLLBACK TO SAVEPOINT active_record_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", Tue, 16 Dec 2014 02:56:24 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:24 UTC +00:00]] +  (0.1ms) 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"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1504) LIMIT 1 + SQL (0.4ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Tue, 16 Dec 2014 02:56:24 UTC +00:00], ["target_id", 1504], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:24 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" != 343 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1504) LIMIT 1 +  (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" = 1504 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.2ms) ROLLBACK TO SAVEPOINT active_record_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", Tue, 16 Dec 2014 02:56:24 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:24 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SAVEPOINT active_record_1 + NotifyUser::Unsubscribe Exists (0.4ms) 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" = 1505) 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", Tue, 16 Dec 2014 02:56:24 UTC +00:00], ["target_id", 1505], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:24 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + NotifyUser::Unsubscribe Exists (0.4ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 344 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1505) LIMIT 1 +  (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" = 1505) LIMIT 1 +  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1505 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + NotifyUser::Unsubscribe Load (0.5ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1505 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.4ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 344]] +  (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" = 1505 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +  (0.7ms) SAVEPOINT active_record_1 + SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 16 Dec 2014 02:56:24 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:24 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" = 1506 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", Tue, 16 Dec 2014 02:56:24 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1506], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:24 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_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", Tue, 16 Dec 2014 02:56:24 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:24 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_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" = 'WkF9L5Ytj1XHCrWZ0-DsOwGJafnzRK66k7SiySjb5T_w' 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", Tue, 16 Dec 2014 02:56:24 UTC +00:00], ["target_id", 1507], ["target_type", "User"], ["token", "WkF9L5Ytj1XHCrWZ0-DsOwGJafnzRK66k7SiySjb5T_w"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:24 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.6ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'WkF9L5Ytj1XHCrWZ0-DsOwGJafnzRK66k7SiySjb5T_w' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 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", Tue, 16 Dec 2014 02:56:24 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:24 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_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" = 'GHee0Lo1zazbAXzIetMjBwaiHYQD8r7XeGRM2W57iN5w' 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", Tue, 16 Dec 2014 02:56:24 UTC +00:00], ["target_id", 1508], ["target_type", "User"], ["token", "GHee0Lo1zazbAXzIetMjBwaiHYQD8r7XeGRM2W57iN5w"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:24 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SAVEPOINT active_record_1 +  (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" = 425 [["active", false], ["updated_at", Tue, 16 Dec 2014 02:56:24 UTC +00:00]] +  (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" = 'GHee0Lo1zazbAXzIetMjBwaiHYQD8r7XeGRM2W57iN5w' 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", Tue, 16 Dec 2014 02:56:24 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:24 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_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" = 'KdPfzPHNwohFNxSZ54aBugdEpGR4pjFWc7wZ2amZFPRw' 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", Tue, 16 Dec 2014 02:56:24 UTC +00:00], ["target_id", 1509], ["target_type", "User"], ["token", "KdPfzPHNwohFNxSZ54aBugdEpGR4pjFWc7wZ2amZFPRw"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:24 UTC +00:00]] +  (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 + SQL (0.7ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 426 [["active", false], ["updated_at", Tue, 16 Dec 2014 02:56:24 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_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", Tue, 16 Dec 2014 02:56:24 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:24 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_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" = 'p2LJbka3Lmkj09Depx9HZgUraw204QhZO-sgyIDURrPA' LIMIT 1 + SQL (0.4ms) 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", Tue, 16 Dec 2014 02:56:24 UTC +00:00], ["target_id", 1510], ["target_type", "User"], ["token", "p2LJbka3Lmkj09Depx9HZgUraw204QhZO-sgyIDURrPA"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:24 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +  (0.3ms) SAVEPOINT active_record_1 + SQL (5.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 16 Dec 2014 02:56:38 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:38 UTC +00:00]] +  (0.2ms) 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.3ms) +Completed 200 OK in 11ms (Views: 8.6ms | ActiveRecord: 0.0ms) +  (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", Tue, 16 Dec 2014 02:56:38 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:38 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SAVEPOINT active_record_1 +  (1.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1512 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", Tue, 16 Dec 2014 02:56:38 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1512], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:38 UTC +00:00]] +  (0.2ms) 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" = 1512 AND "notify_user_notifications"."target_type" = 'User' + NotifyUser::BaseNotification Load (1.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1512 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 +Completed 200 OK in 16ms (Views: 8.0ms | ActiveRecord: 2.0ms) +  (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", Tue, 16 Dec 2014 02:56:38 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:38 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" = 1513 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", Tue, 16 Dec 2014 02:56:38 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1513], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:38 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" = 1513 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", Tue, 16 Dec 2014 02:56:38 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1513], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:38 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" = 1513 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", Tue, 16 Dec 2014 02:56:38 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1513], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:38 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#index as HTML + NotifyUser::BaseNotification Load (0.8ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1513 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 +Completed 200 OK in 33ms (Views: 31.1ms | ActiveRecord: 0.8ms) +  (0.5ms) 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", Tue, 16 Dec 2014 02:56:38 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:38 UTC +00:00]] +  (0.2ms) 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" = 1514 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", Tue, 16 Dec 2014 02:56:38 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1514], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:38 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" = 1514 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", Tue, 16 Dec 2014 02:56:38 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1514], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:38 UTC +00:00]] +  (0.3ms) 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" = 1514 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", Tue, 16 Dec 2014 02:56:38 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1514], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:38 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#read as HTML + Parameters: {"id"=>"1531"} + NotifyUser::BaseNotification Load (1.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1514 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1531') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 +  (0.3ms) SAVEPOINT active_record_1 + User Load (1.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1514]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1514 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (1.7ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1531 [["state", "read"], ["updated_at", Tue, 16 Dec 2014 02:56:38 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Completed 200 OK in 22ms (Views: 1.3ms | ActiveRecord: 5.1ms) + NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 1531 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 +  (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", Tue, 16 Dec 2014 02:56:38 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:38 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" = 1515 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", Tue, 16 Dec 2014 02:56:38 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1515], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:38 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" = 1515 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", Tue, 16 Dec 2014 02:56:38 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1515], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:38 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" = 1515 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", Tue, 16 Dec 2014 02:56:38 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1515], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:38 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#read as HTML + Parameters: {"id"=>"1534"} + NotifyUser::BaseNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1515 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1534') 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", 1515]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1515 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" = 1534 [["state", "read"], ["updated_at", Tue, 16 Dec 2014 02:56:38 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Completed 200 OK in 9ms (Views: 0.4ms | ActiveRecord: 3.0ms) +Processing by NotifyUser::NotificationsController#read as HTML + Parameters: {"id"=>"1534"} + NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1515 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1534') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 +Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 3.5ms) +  (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", Tue, 16 Dec 2014 02:56:38 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:38 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" = 1516 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", Tue, 16 Dec 2014 02:56:38 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1516], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:38 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" = 1516 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", Tue, 16 Dec 2014 02:56:38 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1516], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:38 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" = 1516 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", Tue, 16 Dec 2014 02:56:38 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1516], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:38 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#mark_all as HTML + SQL (1.0ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1516 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.0ms) + NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1516 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('["pending","sent"]')) +  (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", Tue, 16 Dec 2014 02:56:38 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:38 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" = 1517 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", Tue, 16 Dec 2014 02:56:38 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1517], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:38 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#mark_read as HTML + Parameters: {"ids"=>["1540"]} + SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1517 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1540')) + NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1517 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1540')) +Completed 200 OK in 5ms (Views: 2.3ms | ActiveRecord: 1.1ms) + NewPostNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1540]] +  (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", Tue, 16 Dec 2014 02:56:38 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:38 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" = 1518 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", Tue, 16 Dec 2014 02:56:38 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1518], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:38 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#mark_read as HTML + Parameters: {"ids"=>["1541"]} + SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1518 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1541')) + NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1518 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1541')) +Completed 200 OK in 5ms (Views: 2.4ms | ActiveRecord: 1.1ms) +  (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", Tue, 16 Dec 2014 02:56:38 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:38 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" = 1519 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", Tue, 16 Dec 2014 02:56:38 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1519], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:38 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NotifyUser::Unsubscribe Load (0.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1519 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.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1519 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."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" = 1519) LIMIT 1 + SQL (1.0ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["target_id", 1519], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:39 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1519 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +Completed 200 OK in 18ms (Views: 0.4ms | ActiveRecord: 2.9ms) + NotifyUser::Unsubscribe Load (0.5ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1519 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (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", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:39 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" = 1520 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", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1520], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:39 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" = 1520 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.8ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1520 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1520 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +Completed 200 OK in 4ms (Views: 0.4ms | ActiveRecord: 1.5ms) + NotifyUser::Unsubscribe Load (0.5ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1520 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 (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:39 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" = 1521 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.8ms) 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", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1521], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:39 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#unsubscribe as HTML + Parameters: {"type"=>"NewPostNotification"} +  (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" = 1521) 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", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["target_id", 1521], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:39 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://test.host/notify_user/notifications/unsubscribe +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1521 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +Completed 302 Found in 6ms (ActiveRecord: 2.1ms) + 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.3ms) SAVEPOINT active_record_1 + SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:39 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" = 1522 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", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1522], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:39 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + NotifyUser::Unsubscribe Exists (0.4ms) 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" = 1522) LIMIT 1 + SQL (0.4ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["target_id", 1522], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:39 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#subscribe as HTML + Parameters: {"type"=>"NewPostNotification"} + NotifyUser::Unsubscribe Load (0.7ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1522 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.3ms) SAVEPOINT active_record_1 + SQL (0.9ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 347]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://test.host/notify_user/notifications/unsubscribe +Completed 302 Found in 6ms (ActiveRecord: 2.2ms) + NotifyUser::Unsubscribe Load (0.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" +  (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", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:39 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" = 1523 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", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1523], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:39 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NotifyUser::UserHash Load (1.2ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1523 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" = 'Wx6pMgUpMNJTgwpeE15WRQZIjAGmhS1lQvTchtM86_xw' LIMIT 1 + SQL (1.0ms) 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", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["target_id", 1523], ["target_type", "User"], ["token", "Wx6pMgUpMNJTgwpeE15WRQZIjAGmhS1lQvTchtM86_xw"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:39 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#unauth_unsubscribe as HTML + Parameters: {"type"=>"NewPostNotification", "token"=>"Wx6pMgUpMNJTgwpeE15WRQZIjAGmhS1lQvTchtM86_xw"} + NotifyUser::UserHash Exists (0.6ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'Wx6pMgUpMNJTgwpeE15WRQZIjAGmhS1lQvTchtM86_xw' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1 + NotifyUser::UserHash Load (0.5ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'Wx6pMgUpMNJTgwpeE15WRQZIjAGmhS1lQvTchtM86_xw' 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", 1523]] +  (0.2ms) SAVEPOINT active_record_1 + NotifyUser::Unsubscribe Exists (0.4ms) 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" = 1523) 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", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["target_id", 1523], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:39 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SAVEPOINT active_record_1 + SQL (0.7ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 428 [["active", false], ["updated_at", Tue, 16 Dec 2014 02:56:39 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Completed 200 OK in 12ms (Views: 0.4ms | ActiveRecord: 4.2ms) + NotifyUser::UserHash Load (0.5ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" ORDER BY "notify_user_user_hashes"."id" DESC LIMIT 1 +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN + NotifyUser::UserHash Load (0.6ms) 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.6ms) 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.4ms) 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.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.4ms) ROLLBACK +  (0.2ms) BEGIN + NotifyUser::UserHash Load (0.6ms) 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.6ms) 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", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:39 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" = 1524 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", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["state", "pending"], ["target_id", 1524], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:39 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1524 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.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:39 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" = 1525 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", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["state", "pending"], ["target_id", 1525], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:39 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_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", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:39 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" = 1526 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", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["state", "pending"], ["target_id", 1526], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:39 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_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", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:39 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" = 1527 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", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["state", "pending"], ["target_id", 1527], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:39 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" = 1527 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" = 1550 [["params", {"listing_id"=>1}], ["updated_at", Tue, 16 Dec 2014 02:56:39 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.4ms) 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", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:39 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" = 1528 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", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["state", "pending"], ["target_id", 1528], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:39 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" = 1528 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" = 1551 [["params", {"listing_id"=>1}], ["updated_at", Tue, 16 Dec 2014 02:56:39 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", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:39 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" = 1529 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", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["state", "pending"], ["target_id", 1529], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:39 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" = 1529 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" = 1552 [["params", {:listing_id=>1}], ["updated_at", Tue, 16 Dec 2014 02:56:39 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NewPostNotification Load (0.8ms) 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.1ms) SAVEPOINT active_record_1 + SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:39 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" = 1530 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", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["state", "pending"], ["target_id", 1530], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:39 UTC +00:00]] +  (0.4ms) 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" = 1530 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" = 1553 [["params", {:listing_id=>1}], ["updated_at", Tue, 16 Dec 2014 02:56:39 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.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", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:39 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" = 1531 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", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["state", "pending"], ["target_id", 1531], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:39 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.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", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:39 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" = 1532 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.4ms) 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", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["state", "pending"], ["target_id", 1532], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:39 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" = 1532 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" = 1532 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1555) + NotifyUser::BaseNotification Load (0.8ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1555]] + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1532]] + 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" = 1532 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' +  (0.2ms) SAVEPOINT active_record_1 + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1532]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1532 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" = 1555 [["state", "sent"], ["updated_at", Tue, 16 Dec 2014 02:56:39 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" = 1555 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1532]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1532 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' + NewPostNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1555 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1532]] +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1532 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns' +  (0.4ms) ROLLBACK +  (0.3ms) 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", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:39 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SAVEPOINT active_record_1 +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1533 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", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["state", "pending"], ["target_id", 1533], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:39 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" = 1533 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_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1533 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1556) + NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1556]] + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1533]] + 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" = 1533 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' +  (0.2ms) SAVEPOINT active_record_1 + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1533]] +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1533 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" = 1556 [["state", "sent"], ["updated_at", Tue, 16 Dec 2014 02:56:39 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" = 1556 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1533]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1533 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' + NewPostNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1556 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1533]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1533 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns' +  (0.2ms) 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", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:39 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" = 1534 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", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["state", "pending"], ["target_id", 1534], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:39 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" = 1534 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.2ms) 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" = 1534 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1557) +  (0.2ms) SAVEPOINT active_record_1 +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1534 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.4ms) 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", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["state", "pending"], ["target_id", 1534], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:39 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) 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" = 1534 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1558) +  (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", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:39 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" = 1535 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.4ms) 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", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["state", "pending"], ["target_id", 1535], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:39 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" = 1535 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.4ms) 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", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["state", "pending"], ["target_id", 1535], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:39 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') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1560]] + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1535]] + NewPostNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1535 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' +  (0.3ms) SAVEPOINT active_record_1 + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1535]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1535 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" = 1559 [["state", "sent"], ["updated_at", Tue, 16 Dec 2014 02:56:39 UTC +00:00]] +  (0.3ms) 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", 1535]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1535 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" = 1560 [["state", "sent"], ["updated_at", Tue, 16 Dec 2014 02:56:39 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +  (0.7ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1535 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' + NotifyUser::UserHash Load (0.6ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1535 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" = 'DadKy91GQ8LVey_aoe5p7w5y6EVw7R_2haolxXGdba_A' 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", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["target_id", 1535], ["target_type", "User"], ["token", "DadKy91GQ8LVey_aoe5p7w5y6EVw7R_2haolxXGdba_A"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:39 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + +Sent mail to user@example.com (8.7ms) +Date: Tue, 16 Dec 2014 13:56:39 +1100 +From: please-change-me-at-config-initializers-notify-user@example.com +To: user@example.com +Message-ID: <548f9f677bd7e_8a8f3fe5b8c63be83241b@wp.local.mail> +Subject: Rails404: You have new Newpostnotification 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=3DDadKy91GQ8LVey_aoe5p7w5y6EVw7R_2haolxXGdba_A&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.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", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:39 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" = 1536 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", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["state", "pending"], ["target_id", 1536], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:39 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') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1561]] + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1536]] + NewPostNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1536 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' +  (0.2ms) SAVEPOINT active_record_1 + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1536]] +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1536 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" = 1561 [["state", "sent"], ["updated_at", Tue, 16 Dec 2014 02:56:39 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" = 1561 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1536]] +  (0.7ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1536 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" = 1536 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" = 'um3eBdneE7CsN3-F33RG3ASNkjqRtVEyUWQJ8gn-c2VA' LIMIT 1 + SQL (0.7ms) 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", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["target_id", 1536], ["target_type", "User"], ["token", "um3eBdneE7CsN3-F33RG3ASNkjqRtVEyUWQJ8gn-c2VA"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:39 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + +Sent mail to user@example.com (5.5ms) +Date: Tue, 16 Dec 2014 13:56:39 +1100 +From: please-change-me-at-config-initializers-notify-user@example.com +To: user@example.com +Message-ID: <548f9f6786c63_8a8f3fe5b8c63be83256d@wp.local.mail> +Subject: Rails404: You have a new Newpostnotification 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=3Dum3eBdneE7CsN3-F33RG3ASNkjqRtVEyUWQJ8gn-c2VA&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" = 1536 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", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:39 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + NotifyUser::Unsubscribe Exists (0.4ms) 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" = 1537) 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", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["target_id", 1537], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:39 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" = 1537 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.4ms) 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", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:39 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" = 1538 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.4ms) 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", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["state", "pending"], ["target_id", 1538], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:39 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" = 1562 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1538]] +  (0.7ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1538 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' +  (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", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:39 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" = 1539 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", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["state", "pending"], ["target_id", 1539], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:39 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" = 1539 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.4ms) 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", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["state", "pending"], ["target_id", 1539], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:39 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NewPostNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1564]] + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1539]] + NewPostNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1539 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' +  (0.2ms) SAVEPOINT active_record_1 + User Load (0.6ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1539]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1539 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" = 1563 [["state", "sent"], ["updated_at", Tue, 16 Dec 2014 02:56:39 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", 1539]] +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1539 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" = 1564 [["state", "sent"], ["updated_at", Tue, 16 Dec 2014 02:56:39 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1539 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' + NotifyUser::UserHash Load (0.6ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1539 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" = '7kJsE4zT4Hfih5fvqeZs7gVUqydrD_Iy3k-42cxRYpKA' 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", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["target_id", 1539], ["target_type", "User"], ["token", "7kJsE4zT4Hfih5fvqeZs7gVUqydrD_Iy3k-42cxRYpKA"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:39 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 + +Sent mail to user@example.com (5.9ms) +Date: Tue, 16 Dec 2014 13:56:39 +1100 +From: please-change-me-at-config-initializers-notify-user@example.com +To: user@example.com +Message-ID: <548f9f679986e_8a8f3fe5b8c63be832661@wp.local.mail> +Subject: Rails404: You have new Newpostnotification 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=3D7kJsE4zT4Hfih5fvqeZs7gVUqydrD_Iy3k-42cxRYpKA&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.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", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:39 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" = 1540 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", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["state", "pending"], ["target_id", 1540], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:39 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') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1565]] + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1540]] + NewPostNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1540 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' +  (0.2ms) SAVEPOINT active_record_1 + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1540]] +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1540 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" = 1565 [["state", "sent"], ["updated_at", Tue, 16 Dec 2014 02:56:39 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 + NewPostNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1565 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1540]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1540 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" = 1540 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" = '21Lt6WHBegqbEfk9T7l-CQLpx5jOSlaX6-Jau1sELbhw' 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", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["target_id", 1540], ["target_type", "User"], ["token", "21Lt6WHBegqbEfk9T7l-CQLpx5jOSlaX6-Jau1sELbhw"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:39 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + +Sent mail to user@example.com (6.5ms) +Date: Tue, 16 Dec 2014 13:56:39 +1100 +From: please-change-me-at-config-initializers-notify-user@example.com +To: user@example.com +Message-ID: <548f9f67a34f1_8a8f3fe5b8c63be8327fb@wp.local.mail> +Subject: Rails404: You have a new Newpostnotification 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=3D21Lt6WHBegqbEfk9T7l-CQLpx5jOSlaX6-Jau1sELbhw&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.3ms) ROLLBACK +  (0.2ms) BEGIN +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:39 UTC +00:00]] +  (0.1ms) 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" = 1541 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.4ms) 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", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["state", "pending"], ["target_id", 1541], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:39 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" = 1541 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1541 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.2ms) SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1541 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" = 1566 [["state", "sent"], ["updated_at", Tue, 16 Dec 2014 02:56:39 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" = 1566 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1541]] +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1541 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" = 1541 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns' +  (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", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:39 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" = 1542) 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", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["target_id", 1542], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:39 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" = 1542 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.2ms) 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" = 1542 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1542 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (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", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:39 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + NotifyUser::Unsubscribe Exists (0.4ms) 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" = 1543) LIMIT 1 + SQL (0.4ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["target_id", 1543], ["target_type", "User"], ["type", "action_mailer"], ["updated_at", Tue, 16 Dec 2014 02:56:39 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" = 'action_mailer' AND "notify_user_unsubscribes"."id" != 351 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1543) LIMIT 1 +  (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" = 1543 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.4ms) 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", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["state", "pending"], ["target_id", 1543], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:39 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" = 1543 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1543 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.2ms) SAVEPOINT active_record_1 +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1543 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (1.1ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1567 [["state", "sent"], ["updated_at", Tue, 16 Dec 2014 02:56:39 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') AND "notify_user_notifications"."id" = 1567 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1543]] +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1543 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" = 1543 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns' +  (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", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:39 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" = 1544 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.4ms) 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", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["state", "pending"], ["target_id", 1544], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:39 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" = 1544 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" = 'ltRyLHLP--C2Dcbi7IfEkwGcbe-by1kdMgxv9-HzzNZA' 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", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["target_id", 1544], ["target_type", "User"], ["token", "ltRyLHLP--C2Dcbi7IfEkwGcbe-by1kdMgxv9-HzzNZA"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:39 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) ROLLBACK +  (0.1ms) 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", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:39 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) SAVEPOINT active_record_1 +  (0.7ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1545 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", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["state", "pending"], ["target_id", 1545], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:39 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 + NotifyUser::UserHash Load (0.5ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1545 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.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'db8rnu0lZFVN-l-XCrUR9woo2S_uhgp7Zz5rBMEgJrew' 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", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["target_id", 1545], ["target_type", "User"], ["token", "db8rnu0lZFVN-l-XCrUR9woo2S_uhgp7Zz5rBMEgJrew"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:39 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" = 1545 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) 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", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:39 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" = 1546 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", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["state", "pending"], ["target_id", 1546], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:39 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" = 1546 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" = 'CQfkNn6BoEnk3bEOt9255gyHX-03N8HGgta-LztrwhtQ' 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", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["target_id", 1546], ["target_type", "User"], ["token", "CQfkNn6BoEnk3bEOt9255gyHX-03N8HGgta-LztrwhtQ"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:39 UTC +00:00]] +  (0.2ms) 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" = 435 [["active", false], ["updated_at", Tue, 16 Dec 2014 02:56:39 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" = 1546 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" = 'tcMmpsZz6QXeT9Pzh5J7gAG3VbXXRw7cbnzfDPMgFElA' 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", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["target_id", 1546], ["target_type", "User"], ["token", "tcMmpsZz6QXeT9Pzh5J7gAG3VbXXRw7cbnzfDPMgFElA"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:39 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_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", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:39 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" = 1547) 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", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["target_id", 1547], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:39 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"."id" != 352 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1547) LIMIT 1 +  (0.1ms) 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" = 1547 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.2ms) ROLLBACK TO SAVEPOINT active_record_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", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:39 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + NotifyUser::Unsubscribe Exists (0.4ms) 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" = 1548) 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", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["target_id", 1548], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:39 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + NotifyUser::Unsubscribe Exists (0.4ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 353 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1548) LIMIT 1 +  (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" = 1548 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", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:39 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" = 1549) LIMIT 1 + SQL (0.4ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["target_id", 1549], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:39 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + NotifyUser::Unsubscribe Exists (0.4ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 354 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1549) LIMIT 1 +  (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" = 1549) LIMIT 1 +  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1549 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + NotifyUser::Unsubscribe Load (0.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1549 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.4ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 354]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NotifyUser::Unsubscribe Load (0.6ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1549 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.3ms) 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", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:39 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" = 1550 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", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1550], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:39 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_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", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:39 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + NotifyUser::UserHash Exists (0.8ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'bnfkRCwypPu59z1WoM75xgv1MhMxCXg7ampdPfWuhkOQ' 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", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["target_id", 1551], ["target_type", "User"], ["token", "bnfkRCwypPu59z1WoM75xgv1MhMxCXg7ampdPfWuhkOQ"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:39 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" = 'bnfkRCwypPu59z1WoM75xgv1MhMxCXg7ampdPfWuhkOQ' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1 +  (0.2ms) 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", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:39 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_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" = 'K-D_EPVGDMdHb1uTVaJ4cgshyAX-EdfOue4nzgxLJhUw' 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", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["target_id", 1552], ["target_type", "User"], ["token", "K-D_EPVGDMdHb1uTVaJ4cgshyAX-EdfOue4nzgxLJhUw"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:39 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 +  (0.3ms) 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" = 438 [["active", false], ["updated_at", Tue, 16 Dec 2014 02:56:39 UTC +00:00]] +  (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" = 'K-D_EPVGDMdHb1uTVaJ4cgshyAX-EdfOue4nzgxLJhUw' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' 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", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:39 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_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" = 'QcH_f2xJ1oSUSWLoyRVHpwczQcz33oesiJKeBgWnE0kA' LIMIT 1 + SQL (0.4ms) 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", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["target_id", 1553], ["target_type", "User"], ["token", "QcH_f2xJ1oSUSWLoyRVHpwczQcz33oesiJKeBgWnE0kA"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:39 UTC +00:00]] +  (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 + SQL (0.7ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 439 [["active", false], ["updated_at", Tue, 16 Dec 2014 02:56:39 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_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", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 16 Dec 2014 02:56:39 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" = 'BtBYbRfaYHSlCDlrCmTrxg2f5RZSmJPb4IDfOaTEdlNA' LIMIT 1 + SQL (0.7ms) 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", Tue, 16 Dec 2014 02:56:39 UTC +00:00], ["target_id", 1554], ["target_type", "User"], ["token", "BtBYbRfaYHSlCDlrCmTrxg2f5RZSmJPb4IDfOaTEdlNA"], ["type", "NewPostNotification"], ["updated_at", Tue, 16 Dec 2014 02:56:39 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) ROLLBACK +  (0.2ms) BEGIN +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +  (0.2ms) ROLLBACK +  (0.3ms) BEGIN +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +  (0.2ms) ROLLBACK +  (1.4ms) BEGIN +  (1.0ms) SAVEPOINT active_record_1 + SQL (16.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 17 Dec 2014 05:59:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 05:59:18 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.4ms) +Completed 200 OK in 21ms (Views: 17.0ms | ActiveRecord: 0.0ms) +  (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, 17 Dec 2014 05:59:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 05:59:18 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SAVEPOINT active_record_1 +  (2.0ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1556 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (1.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, 17 Dec 2014 05:59:18 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1556], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 05:59:18 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#index as JSON +  (0.9ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1556 AND "notify_user_notifications"."target_type" = 'User' + NotifyUser::BaseNotification Load (2.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1556 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 +Completed 200 OK in 24ms (Views: 14.0ms | ActiveRecord: 3.7ms) +  (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, 17 Dec 2014 05:59:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 05:59:18 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" = 1557 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, 17 Dec 2014 05:59:18 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1557], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 05:59:18 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" = 1557 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, 17 Dec 2014 05:59:18 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1557], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 05:59:18 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" = 1557 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, 17 Dec 2014 05:59:18 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1557], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 05:59:18 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#index as HTML + NotifyUser::BaseNotification Load (1.2ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1557 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 +Completed 200 OK in 67ms (Views: 65.2ms | ActiveRecord: 1.2ms) +  (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, 17 Dec 2014 05:59:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 05:59:18 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" = 1558 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, 17 Dec 2014 05:59:18 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1558], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 05:59:18 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" = 1558 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, 17 Dec 2014 05:59:18 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1558], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 05:59:18 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" = 1558 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, 17 Dec 2014 05:59:18 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1558], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 05:59:18 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#read as HTML + Parameters: {"id"=>"1576"} + NotifyUser::BaseNotification Load (0.9ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1558 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1576') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 +  (0.2ms) SAVEPOINT active_record_1 + User Load (1.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1558]] +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1558 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (2.0ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1576 [["state", "read"], ["updated_at", Wed, 17 Dec 2014 05:59:18 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +Completed 200 OK in 22ms (Views: 2.3ms | ActiveRecord: 5.2ms) + NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 1576 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 +  (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, 17 Dec 2014 05:59:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 05:59:18 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" = 1559 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, 17 Dec 2014 05:59:18 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1559], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 05:59:18 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" = 1559 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, 17 Dec 2014 05:59:18 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1559], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 05:59:18 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" = 1559 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, 17 Dec 2014 05:59:18 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1559], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 05:59:18 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#read as HTML + Parameters: {"id"=>"1579"} + NotifyUser::BaseNotification Load (0.8ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1559 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1579') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 +  (0.2ms) SAVEPOINT active_record_1 + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1559]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1559 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" = 1579 [["state", "read"], ["updated_at", Wed, 17 Dec 2014 05:59:18 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Completed 200 OK in 9ms (Views: 0.3ms | ActiveRecord: 3.0ms) +Processing by NotifyUser::NotificationsController#read as HTML + Parameters: {"id"=>"1579"} + NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1559 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1579') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 +Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 3.6ms) +  (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, 17 Dec 2014 05:59:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 05:59:18 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" = 1560 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, 17 Dec 2014 05:59:18 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1560], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 05:59:18 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" = 1560 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, 17 Dec 2014 05:59:18 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1560], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 05:59:18 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" = 1560 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, 17 Dec 2014 05:59:18 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1560], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 05:59:18 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#mark_all as HTML + SQL (1.2ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1560 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.2ms) + NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1560 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('["pending","sent"]')) +  (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, 17 Dec 2014 05:59:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 05:59:18 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 +  (0.8ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1561 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, 17 Dec 2014 05:59:18 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1561], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 05:59:18 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#mark_read as HTML + Parameters: {"ids"=>["1585"]} + SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1561 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1585')) + NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1561 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1585')) +Completed 200 OK in 5ms (Views: 2.1ms | ActiveRecord: 1.0ms) + NewPostNotification Load (0.8ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1585]] +  (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, 17 Dec 2014 05:59:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 05:59:18 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" = 1562 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, 17 Dec 2014 05:59:18 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1562], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 05:59:18 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#mark_read as HTML + Parameters: {"ids"=>["1586"]} + SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1562 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1586')) + NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1562 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1586')) +Completed 200 OK in 4ms (Views: 2.0ms | ActiveRecord: 1.1ms) +  (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, 17 Dec 2014 05:59:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 05:59:18 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" = 1563 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, 17 Dec 2014 05:59:18 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1563], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 05:59:18 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NotifyUser::Unsubscribe Load (0.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1563 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.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1563 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (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"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1563) LIMIT 1 + SQL (1.2ms) 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, 17 Dec 2014 05:59:18 UTC +00:00], ["target_id", 1563], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 05:59:18 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +  (0.7ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1563 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +Completed 200 OK in 23ms (Views: 0.6ms | ActiveRecord: 3.6ms) + NotifyUser::Unsubscribe Load (0.7ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1563 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (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, 17 Dec 2014 05:59:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 05:59:18 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" = 1564 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (12.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, 17 Dec 2014 05:59:18 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1564], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 05:59:18 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" = 1564 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.6ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1564 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1564 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 1.0ms) + NotifyUser::Unsubscribe Load (0.5ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1564 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (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, 17 Dec 2014 05:59:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 05:59:18 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" = 1565 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, 17 Dec 2014 05:59:18 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1565], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 05:59:18 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" = 1565) 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, 17 Dec 2014 05:59:18 UTC +00:00], ["target_id", 1565], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 05:59:18 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://test.host/notify_user/notifications/unsubscribe +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1565 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +Completed 302 Found in 7ms (ActiveRecord: 2.0ms) + NotifyUser::Unsubscribe Load (0.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" ORDER BY "notify_user_unsubscribes"."id" DESC LIMIT 1 +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +  (0.4ms) SAVEPOINT active_record_1 + SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 17 Dec 2014 05:59:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 05:59:19 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" = 1566 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, 17 Dec 2014 05:59:19 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1566], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 05:59:19 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"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1566) 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, 17 Dec 2014 05:59:19 UTC +00:00], ["target_id", 1566], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 05:59:19 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#subscribe as HTML + Parameters: {"type"=>"NewPostNotification"} + NotifyUser::Unsubscribe Load (0.5ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1566 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.6ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 357]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://test.host/notify_user/notifications/unsubscribe +Completed 302 Found in 4ms (ActiveRecord: 1.4ms) + NotifyUser::Unsubscribe Load (0.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" +  (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, 17 Dec 2014 05:59:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 05:59:19 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" = 1567 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, 17 Dec 2014 05:59:19 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1567], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 05:59:19 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NotifyUser::UserHash Load (1.6ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1567 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.7ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'HBxqywhnqpVVw0JEz5SfoQiKuhxy-robeer1ovWq_7FA' LIMIT 1 + SQL (1.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, 17 Dec 2014 05:59:19 UTC +00:00], ["target_id", 1567], ["target_type", "User"], ["token", "HBxqywhnqpVVw0JEz5SfoQiKuhxy-robeer1ovWq_7FA"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 05:59:19 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#unauth_unsubscribe as HTML + Parameters: {"type"=>"NewPostNotification", "token"=>"HBxqywhnqpVVw0JEz5SfoQiKuhxy-robeer1ovWq_7FA"} + NotifyUser::UserHash Exists (0.5ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'HBxqywhnqpVVw0JEz5SfoQiKuhxy-robeer1ovWq_7FA' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1 + NotifyUser::UserHash Load (0.5ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'HBxqywhnqpVVw0JEz5SfoQiKuhxy-robeer1ovWq_7FA' AND "notify_user_user_hashes"."type" = 'NewPostNotification' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1 + User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1567]] +  (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" = 1567) 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, 17 Dec 2014 05:59:19 UTC +00:00], ["target_id", 1567], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 05:59:19 UTC +00:00]] +  (0.2ms) 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" = 441 [["active", false], ["updated_at", Wed, 17 Dec 2014 05:59:19 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Completed 200 OK in 13ms (Views: 0.5ms | ActiveRecord: 4.2ms) + NotifyUser::UserHash Load (1.0ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" ORDER BY "notify_user_user_hashes"."id" DESC LIMIT 1 +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN + NotifyUser::UserHash Load (0.9ms) 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.6ms) 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.6ms) ROLLBACK +  (0.3ms) 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.2ms) ROLLBACK +  (0.1ms) BEGIN + NotifyUser::UserHash Load (0.6ms) 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.6ms) 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, 17 Dec 2014 05:59:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 05:59:19 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" = 1568 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, 17 Dec 2014 05:59:19 UTC +00:00], ["state", "pending"], ["target_id", 1568], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 05:59:19 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1568 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('sent','pending')) +  (0.2ms) 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, 17 Dec 2014 05:59:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 05:59:19 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" = 1569 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, 17 Dec 2014 05:59:19 UTC +00:00], ["state", "pending"], ["target_id", 1569], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 05:59:19 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_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, 17 Dec 2014 05:59:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 05:59:19 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" = 1570 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, 17 Dec 2014 05:59:19 UTC +00:00], ["state", "pending"], ["target_id", 1570], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 05:59:19 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 17 Dec 2014 05:59:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 05:59:19 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" = 1571 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, 17 Dec 2014 05:59:19 UTC +00:00], ["state", "pending"], ["target_id", 1571], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 05:59:19 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" = 1571 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" = 1595 [["params", {"listing_id"=>1}], ["updated_at", Wed, 17 Dec 2014 05:59:19 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.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, 17 Dec 2014 05:59:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 05:59:19 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" = 1572 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, 17 Dec 2014 05:59:19 UTC +00:00], ["state", "pending"], ["target_id", 1572], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 05:59:19 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" = 1572 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.8ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1596 [["params", {"listing_id"=>1}], ["updated_at", Wed, 17 Dec 2014 05:59:19 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.2ms) 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, 17 Dec 2014 05:59:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 05:59:19 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" = 1573 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, 17 Dec 2014 05:59:19 UTC +00:00], ["state", "pending"], ["target_id", 1573], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 05:59:19 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" = 1573 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" = 1597 [["params", {:listing_id=>1}], ["updated_at", Wed, 17 Dec 2014 05:59:19 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NewPostNotification Load (0.6ms) 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.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 17 Dec 2014 05:59:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 05:59:19 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" = 1574 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, 17 Dec 2014 05:59:19 UTC +00:00], ["state", "pending"], ["target_id", 1574], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 05:59:19 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" = 1574 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" = 1598 [["params", {:listing_id=>1}], ["updated_at", Wed, 17 Dec 2014 05:59:19 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.2ms) ROLLBACK +  (0.1ms) 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, 17 Dec 2014 05:59:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 05:59:19 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" = 1575 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, 17 Dec 2014 05:59:19 UTC +00:00], ["state", "pending"], ["target_id", 1575], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 05:59:19 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) SAVEPOINT active_record_1 +  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1 +  (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, 17 Dec 2014 05:59:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 05:59:19 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" = 1576 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, 17 Dec 2014 05:59:19 UTC +00:00], ["state", "pending"], ["target_id", 1576], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 05:59:19 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) SAVEPOINT active_record_1 +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1576 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" = 1576 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1600) + NotifyUser::BaseNotification Load (0.9ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1600]] + User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1576]] + 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" = 1576 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' +  (0.2ms) SAVEPOINT active_record_1 + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1576]] +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1576 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" = 1600 [["state", "sent"], ["updated_at", Wed, 17 Dec 2014 05:59:19 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 1600 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1576]] +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1576 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, 17 Dec 2014 05:59:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 05:59:19 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" = 1577 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, 17 Dec 2014 05:59:19 UTC +00:00], ["state", "pending"], ["target_id", 1577], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 05:59:19 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) SAVEPOINT active_record_1 +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1577 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_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1577 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1601) + NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1601]] + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1577]] + NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1577 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' +  (0.4ms) SAVEPOINT active_record_1 + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1577]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1577 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" = 1601 [["state", "sent"], ["updated_at", Wed, 17 Dec 2014 05:59:19 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" = 1601 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1577]] +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1577 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, 17 Dec 2014 05:59:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 05:59:19 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" = 1578 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, 17 Dec 2014 05:59:19 UTC +00:00], ["state", "pending"], ["target_id", 1578], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 05:59:19 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" = 1578 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) 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" = 1578 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1602) +  (0.2ms) SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1578 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, 17 Dec 2014 05:59:19 UTC +00:00], ["state", "pending"], ["target_id", 1578], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 05:59:19 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) 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" = 1578 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1603) +  (0.2ms) 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, 17 Dec 2014 05:59:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 05:59:19 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" = 1579 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.4ms) 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, 17 Dec 2014 05:59:19 UTC +00:00], ["state", "pending"], ["target_id", 1579], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 05:59:19 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" = 1579 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, 17 Dec 2014 05:59:19 UTC +00:00], ["state", "pending"], ["target_id", 1579], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 05:59:19 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" = $1 LIMIT 1 [["id", 1605]] + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1579]] + NewPostNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1579 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' +  (0.2ms) SAVEPOINT active_record_1 + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1579]] +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1579 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" = 1604 [["state", "sent"], ["updated_at", Wed, 17 Dec 2014 05:59:19 UTC +00:00]] +  (0.2ms) 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", 1579]] +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1579 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" = 1605 [["state", "sent"], ["updated_at", Wed, 17 Dec 2014 05:59:19 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1579 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" = 1579 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" = '9WveJhl7o8R3cKxSu8sEoQC7F5FeajH52ztPR28eiNdw' 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, 17 Dec 2014 05:59:19 UTC +00:00], ["target_id", 1579], ["target_type", "User"], ["token", "9WveJhl7o8R3cKxSu8sEoQC7F5FeajH52ztPR28eiNdw"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 05:59:19 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + +Sent mail to user@example.com (9.3ms) +Date: Wed, 17 Dec 2014 16:59:19 +1100 +From: please-change-me-at-config-initializers-notify-user@example.com +To: user@example.com +Message-ID: <54911bb76979f_d4863fdba8465be058668@wp.local.mail> +Subject: Rails404: You have new Newpostnotification 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=3D9WveJhl7o8R3cKxSu8sEoQC7F5FeajH52ztPR28eiNdw&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.3ms) ROLLBACK +  (0.1ms) 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, 17 Dec 2014 05:59:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 05:59:19 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" = 1580 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, 17 Dec 2014 05:59:19 UTC +00:00], ["state", "pending"], ["target_id", 1580], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 05:59:19 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NewPostNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1606]] + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1580]] + NewPostNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1580 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' +  (0.2ms) SAVEPOINT active_record_1 + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1580]] +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1580 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" = 1606 [["state", "sent"], ["updated_at", Wed, 17 Dec 2014 05:59:19 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') AND "notify_user_notifications"."id" = 1606 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1580]] +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1580 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" = 1580 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" = 'shltroqirJn9b8cgAYBItAyWpo6-DCcA32OrSOExxGvw' 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, 17 Dec 2014 05:59:19 UTC +00:00], ["target_id", 1580], ["target_type", "User"], ["token", "shltroqirJn9b8cgAYBItAyWpo6-DCcA32OrSOExxGvw"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 05:59:19 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + +Sent mail to user@example.com (6.8ms) +Date: Wed, 17 Dec 2014 16:59:19 +1100 +From: please-change-me-at-config-initializers-notify-user@example.com +To: user@example.com +Message-ID: <54911bb774b82_d4863fdba8465be05877@wp.local.mail> +Subject: Rails404: You have a new Newpostnotification 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=3DshltroqirJn9b8cgAYBItAyWpo6-DCcA32OrSOExxGvw&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.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1580 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns' +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 17 Dec 2014 05:59:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 05:59:19 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" = 1581) 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, 17 Dec 2014 05:59:19 UTC +00:00], ["target_id", 1581], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 05:59:19 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" = 1581 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.6ms) 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.1ms) BEGIN +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 17 Dec 2014 05:59:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 05:59:19 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" = 1582 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.4ms) 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, 17 Dec 2014 05:59:19 UTC +00:00], ["state", "pending"], ["target_id", 1582], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 05:59:19 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" = 1607 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1582]] +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1582 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 17 Dec 2014 05:59:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 05:59:19 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" = 1583 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, 17 Dec 2014 05:59:19 UTC +00:00], ["state", "pending"], ["target_id", 1583], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 05:59:19 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" = 1583 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, 17 Dec 2014 05:59:19 UTC +00:00], ["state", "pending"], ["target_id", 1583], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 05:59:19 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NewPostNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1609]] + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1583]] + NewPostNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1583 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' +  (0.2ms) SAVEPOINT active_record_1 + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1583]] +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1583 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" = 1608 [["state", "sent"], ["updated_at", Wed, 17 Dec 2014 05:59:19 UTC +00:00]] +  (0.2ms) 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", 1583]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1583 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" = 1609 [["state", "sent"], ["updated_at", Wed, 17 Dec 2014 05:59:19 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1583 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' + NotifyUser::UserHash Load (0.6ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1583 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" = 'Jc7jW89qn2WH7HjiOsOJ0gtzFVmCOsx73t0-SbQurbZw' 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, 17 Dec 2014 05:59:19 UTC +00:00], ["target_id", 1583], ["target_type", "User"], ["token", "Jc7jW89qn2WH7HjiOsOJ0gtzFVmCOsx73t0-SbQurbZw"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 05:59:19 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + +Sent mail to user@example.com (7.4ms) +Date: Wed, 17 Dec 2014 16:59:19 +1100 +From: please-change-me-at-config-initializers-notify-user@example.com +To: user@example.com +Message-ID: <54911bb78722f_d4863fdba8465be058853@wp.local.mail> +Subject: Rails404: You have new Newpostnotification 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=3DJc7jW89qn2WH7HjiOsOJ0gtzFVmCOsx73t0-SbQurbZw&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.3ms) ROLLBACK +  (0.1ms) 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, 17 Dec 2014 05:59:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 05:59:19 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" = 1584 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, 17 Dec 2014 05:59:19 UTC +00:00], ["state", "pending"], ["target_id", 1584], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 05:59:19 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') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1610]] + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1584]] + NewPostNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1584 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' +  (0.2ms) SAVEPOINT active_record_1 + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1584]] +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1584 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" = 1610 [["state", "sent"], ["updated_at", Wed, 17 Dec 2014 05:59:19 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') AND "notify_user_notifications"."id" = 1610 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1584]] +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1584 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' +  (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, 17 Dec 2014 05:59:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 05:59:19 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" = 1585 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, 17 Dec 2014 05:59:19 UTC +00:00], ["state", "pending"], ["target_id", 1585], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 05:59:19 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" = 1585 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" = 1585 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.2ms) SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1585 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" = 1611 [["state", "sent"], ["updated_at", Wed, 17 Dec 2014 05:59:19 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') AND "notify_user_notifications"."id" = 1611 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1585]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1585 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" = 1585 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns' +  (0.2ms) ROLLBACK +  (0.1ms) 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, 17 Dec 2014 05:59:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 05:59:19 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" = 1586) 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, 17 Dec 2014 05:59:19 UTC +00:00], ["target_id", 1586], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 05:59:19 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" = 1586 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.8ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1586 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1586 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (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, 17 Dec 2014 05:59:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 05:59:19 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" = 'action_mailer' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1587) 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, 17 Dec 2014 05:59:19 UTC +00:00], ["target_id", 1587], ["target_type", "User"], ["type", "action_mailer"], ["updated_at", Wed, 17 Dec 2014 05:59:19 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" = 'action_mailer' AND "notify_user_unsubscribes"."id" != 361 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1587) LIMIT 1 +  (0.2ms) 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" = 1587 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, 17 Dec 2014 05:59:19 UTC +00:00], ["state", "pending"], ["target_id", 1587], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 05:59:19 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" = 1587 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.7ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1587 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.3ms) SAVEPOINT active_record_1 +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1587 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" = 1612 [["state", "sent"], ["updated_at", Wed, 17 Dec 2014 05:59:19 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') AND "notify_user_notifications"."id" = 1612 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1587]] +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1587 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" = 1587 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns' +  (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, 17 Dec 2014 05:59:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 05:59:19 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" = 1588 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, 17 Dec 2014 05:59:19 UTC +00:00], ["state", "pending"], ["target_id", 1588], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 05:59:19 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" = 1588 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" = 'Z8et5J2luO-is9BXhCDTvgVONSAIDYkfpMpBy6paUfGQ' 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, 17 Dec 2014 05:59:19 UTC +00:00], ["target_id", 1588], ["target_type", "User"], ["token", "Z8et5J2luO-is9BXhCDTvgVONSAIDYkfpMpBy6paUfGQ"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 05:59:19 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_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, 17 Dec 2014 05:59:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 05:59:19 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1589 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, 17 Dec 2014 05:59:19 UTC +00:00], ["state", "pending"], ["target_id", 1589], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 05:59:19 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" = 1589 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" = 'f8fA9-TET5Zssr4b5Zc-iwWb1RD7voiMwP1vj3Rc53VA' LIMIT 1 + SQL (0.7ms) 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, 17 Dec 2014 05:59:19 UTC +00:00], ["target_id", 1589], ["target_type", "User"], ["token", "f8fA9-TET5Zssr4b5Zc-iwWb1RD7voiMwP1vj3Rc53VA"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 05:59:19 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" = 1589 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, 17 Dec 2014 05:59:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 05:59:19 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" = 1590 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, 17 Dec 2014 05:59:19 UTC +00:00], ["state", "pending"], ["target_id", 1590], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 05:59:19 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" = 1590 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" = '2CwqAHfRLIZ3NC7vThtjsAs1sY7cWirQDiRbODPzgFBw' LIMIT 1 + SQL (0.7ms) 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, 17 Dec 2014 05:59:19 UTC +00:00], ["target_id", 1590], ["target_type", "User"], ["token", "2CwqAHfRLIZ3NC7vThtjsAs1sY7cWirQDiRbODPzgFBw"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 05:59:19 UTC +00:00]] +  (0.3ms) 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" = 447 [["active", false], ["updated_at", Wed, 17 Dec 2014 05:59:19 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NotifyUser::UserHash Load (0.5ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1590 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" = 'Ile3jHWVuG-ew85XNmBv7wjb_NKtgd7LNJB_R4kIPVfg' 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, 17 Dec 2014 05:59:19 UTC +00:00], ["target_id", 1590], ["target_type", "User"], ["token", "Ile3jHWVuG-ew85XNmBv7wjb_NKtgd7LNJB_R4kIPVfg"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 05:59:19 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_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, 17 Dec 2014 05:59:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 05:59:19 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" = 1591) LIMIT 1 + SQL (0.4ms) 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, 17 Dec 2014 05:59:19 UTC +00:00], ["target_id", 1591], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 05:59:19 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + NotifyUser::Unsubscribe Exists (0.4ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 362 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1591) LIMIT 1 +  (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" = 1591 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 17 Dec 2014 05:59:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 05:59:19 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + NotifyUser::Unsubscribe Exists (0.4ms) 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" = 1592) LIMIT 1 + SQL (0.4ms) 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, 17 Dec 2014 05:59:19 UTC +00:00], ["target_id", 1592], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 05:59:19 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + NotifyUser::Unsubscribe Exists (0.4ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 363 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1592) 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" = 1592 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 17 Dec 2014 05:59:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 05:59:19 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" = 1593) LIMIT 1 + SQL (0.4ms) 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, 17 Dec 2014 05:59:19 UTC +00:00], ["target_id", 1593], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 05:59:19 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + NotifyUser::Unsubscribe Exists (0.4ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 364 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1593) LIMIT 1 +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + NotifyUser::Unsubscribe Exists (0.4ms) 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" = 1593) LIMIT 1 +  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1593 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + NotifyUser::Unsubscribe Load (0.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1593 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.3ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 364]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1593 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.6ms) 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, 17 Dec 2014 05:59:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 05:59:19 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 +  (0.8ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1594 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, 17 Dec 2014 05:59:19 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1594], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 05:59:19 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_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, 17 Dec 2014 05:59:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 05:59:19 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_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" = 'CLpPhrH1hsNAIt8CKAYjMQ_aKh7NrMT9JbpTf4Mh7SkA' LIMIT 1 + SQL (0.4ms) 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, 17 Dec 2014 05:59:19 UTC +00:00], ["target_id", 1595], ["target_type", "User"], ["token", "CLpPhrH1hsNAIt8CKAYjMQ_aKh7NrMT9JbpTf4Mh7SkA"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 05:59:19 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 +  (0.1ms) 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" = 'CLpPhrH1hsNAIt8CKAYjMQ_aKh7NrMT9JbpTf4Mh7SkA' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1 +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 17 Dec 2014 05:59:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 05:59:19 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'lWme2p7slj1RNhFBedRM-wCFz7M0k7s6mlxKIsrE5VVw' LIMIT 1 + SQL (0.4ms) 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, 17 Dec 2014 05:59:19 UTC +00:00], ["target_id", 1596], ["target_type", "User"], ["token", "lWme2p7slj1RNhFBedRM-wCFz7M0k7s6mlxKIsrE5VVw"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 05:59:19 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.7ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 450 [["active", false], ["updated_at", Wed, 17 Dec 2014 05:59:19 UTC +00:00]] +  (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" = 'lWme2p7slj1RNhFBedRM-wCFz7M0k7s6mlxKIsrE5VVw' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' 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, 17 Dec 2014 05:59:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 05:59:19 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_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" = '8KhzZnZ8Drbr_th7-UH3ZA-HEUSjfb356ZSYYZAC0jzQ' LIMIT 1 + SQL (0.4ms) 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, 17 Dec 2014 05:59:19 UTC +00:00], ["target_id", 1597], ["target_type", "User"], ["token", "8KhzZnZ8Drbr_th7-UH3ZA-HEUSjfb356ZSYYZAC0jzQ"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 05:59:19 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.6ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 451 [["active", false], ["updated_at", Wed, 17 Dec 2014 05:59:19 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 17 Dec 2014 05:59:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 05:59:19 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'FiQ4Sj_OkhY-psPah1b4MQRxDMTYuskzhF5X2yMAHhBg' LIMIT 1 + SQL (0.4ms) 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, 17 Dec 2014 05:59:19 UTC +00:00], ["target_id", 1598], ["target_type", "User"], ["token", "FiQ4Sj_OkhY-psPah1b4MQRxDMTYuskzhF5X2yMAHhBg"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 05:59:19 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +  (0.1ms) ROLLBACK +  (0.2ms) BEGIN +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +  (0.2ms) ROLLBACK +  (1.0ms) BEGIN +  (0.8ms) SAVEPOINT active_record_1 + SQL (12.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 17 Dec 2014 06:43:32 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:43:32 UTC +00:00]] +  (0.2ms) 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.4ms) +Completed 200 OK in 17ms (Views: 14.3ms | ActiveRecord: 0.0ms) +  (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, 17 Dec 2014 06:43:32 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:43:32 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SAVEPOINT active_record_1 +  (1.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1600 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (1.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, 17 Dec 2014 06:43:32 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1600], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:43:32 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#index as JSON +  (1.1ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1600 AND "notify_user_notifications"."target_type" = 'User' + NotifyUser::BaseNotification Load (3.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1600 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 +Completed 200 OK in 27ms (Views: 15.5ms | ActiveRecord: 4.8ms) +  (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, 17 Dec 2014 06:43:32 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:43:32 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" = 1601 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, 17 Dec 2014 06:43:32 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1601], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:43:32 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" = 1601 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, 17 Dec 2014 06:43:32 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1601], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:43:32 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" = 1601 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, 17 Dec 2014 06:43:32 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1601], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:43:32 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" = 1601 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 +Completed 200 OK in 66ms (Views: 63.9ms | ActiveRecord: 1.0ms) +  (0.3ms) 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, 17 Dec 2014 06:43:32 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:43:32 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" = 1602 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, 17 Dec 2014 06:43:32 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1602], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:43:32 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" = 1602 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, 17 Dec 2014 06:43:32 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1602], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:43:32 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" = 1602 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.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, 17 Dec 2014 06:43:32 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1602], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:43:32 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#read as HTML + Parameters: {"id"=>"1621"} + NotifyUser::BaseNotification Load (0.9ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1602 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1621') 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", 1602]] +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1602 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (1.8ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1621 [["state", "read"], ["updated_at", Wed, 17 Dec 2014 06:43:32 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +Completed 200 OK in 22ms (Views: 2.1ms | ActiveRecord: 4.5ms) + NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 1621 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 +  (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, 17 Dec 2014 06:43:32 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:43:32 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" = 1603 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.8ms) 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, 17 Dec 2014 06:43:32 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1603], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:43:32 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" = 1603 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, 17 Dec 2014 06:43:32 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1603], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:43:32 UTC +00:00]] +  (0.3ms) 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" = 1603 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, 17 Dec 2014 06:43:32 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1603], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:43:32 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#read as HTML + Parameters: {"id"=>"1624"} + NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1603 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1624') 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", 1603]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1603 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" = 1624 [["state", "read"], ["updated_at", Wed, 17 Dec 2014 06:43:32 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +Completed 200 OK in 10ms (Views: 0.8ms | ActiveRecord: 3.1ms) +Processing by NotifyUser::NotificationsController#read as HTML + Parameters: {"id"=>"1624"} + NotifyUser::BaseNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1603 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1624') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 +Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 3.8ms) +  (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, 17 Dec 2014 06:43:32 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:43:32 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" = 1604 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, 17 Dec 2014 06:43:32 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1604], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:43:32 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" = 1604 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.8ms) 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, 17 Dec 2014 06:43:32 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1604], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:43:32 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" = 1604 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, 17 Dec 2014 06:43:32 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1604], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:43:32 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#mark_all as HTML + SQL (1.2ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1604 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('pending','sent')) +Redirected to http://test.host/notify_user/notifications +Completed 302 Found in 4ms (ActiveRecord: 1.2ms) + NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1604 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('["pending","sent"]')) +  (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, 17 Dec 2014 06:43:32 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:43:32 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" = 1605 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, 17 Dec 2014 06:43:32 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1605], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:43:32 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#mark_read as HTML + Parameters: {"ids"=>["1630"]} + SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1605 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1630')) + NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1605 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1630')) +Completed 200 OK in 5ms (Views: 2.4ms | ActiveRecord: 1.2ms) + NewPostNotification Load (0.8ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1630]] +  (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, 17 Dec 2014 06:43:32 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:43:32 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" = 1606 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, 17 Dec 2014 06:43:32 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1606], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:43:32 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#mark_read as HTML + Parameters: {"ids"=>["1631"]} + SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1606 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1631')) + NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1606 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1631')) +Completed 200 OK in 4ms (Views: 1.9ms | ActiveRecord: 1.0ms) +  (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, 17 Dec 2014 06:43:32 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:43:32 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" = 1607 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, 17 Dec 2014 06:43:32 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1607], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:43:32 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NotifyUser::Unsubscribe Load (0.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1607 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.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1607 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" = 1607) LIMIT 1 + SQL (1.1ms) 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, 17 Dec 2014 06:43:32 UTC +00:00], ["target_id", 1607], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:43:32 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1607 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +Completed 200 OK in 21ms (Views: 0.4ms | ActiveRecord: 3.1ms) + NotifyUser::Unsubscribe Load (0.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1607 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.2ms) 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, 17 Dec 2014 06:43:32 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:43:32 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" = 1608 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (10.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, 17 Dec 2014 06:43:32 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1608], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:43:32 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 + NotifyUser::Unsubscribe Load (0.5ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1608 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" = 1608 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1608 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 0.8ms) + NotifyUser::Unsubscribe Load (0.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1608 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (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, 17 Dec 2014 06:43:32 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:43:32 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" = 1609 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, 17 Dec 2014 06:43:32 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1609], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:43:32 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#unsubscribe as HTML + Parameters: {"type"=>"NewPostNotification"} +  (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" = 1609) 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, 17 Dec 2014 06:43:32 UTC +00:00], ["target_id", 1609], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:43:32 UTC +00:00]] +  (0.3ms) 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" = 1609 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +Completed 302 Found in 7ms (ActiveRecord: 2.2ms) + NotifyUser::Unsubscribe Load (0.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" ORDER BY "notify_user_unsubscribes"."id" DESC LIMIT 1 +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 17 Dec 2014 06:43:32 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:43:32 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" = 1610 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, 17 Dec 2014 06:43:32 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1610], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:43:32 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + NotifyUser::Unsubscribe Exists (0.4ms) 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" = 1610) LIMIT 1 + SQL (0.4ms) 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, 17 Dec 2014 06:43:32 UTC +00:00], ["target_id", 1610], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:43:32 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#subscribe as HTML + Parameters: {"type"=>"NewPostNotification"} + NotifyUser::Unsubscribe Load (0.5ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1610 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.6ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 367]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://test.host/notify_user/notifications/unsubscribe +Completed 302 Found in 4ms (ActiveRecord: 1.5ms) + NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" +  (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, 17 Dec 2014 06:43:32 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:43:32 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" = 1611 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, 17 Dec 2014 06:43:32 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1611], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:43:32 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NotifyUser::UserHash Load (1.5ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1611 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" = 'OTcBLFuD6EKWCUhLZFUGOQIz20TLNb_4UuJTPLHUo3cw' 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, 17 Dec 2014 06:43:32 UTC +00:00], ["target_id", 1611], ["target_type", "User"], ["token", "OTcBLFuD6EKWCUhLZFUGOQIz20TLNb_4UuJTPLHUo3cw"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:43:32 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#unauth_unsubscribe as HTML + Parameters: {"type"=>"NewPostNotification", "token"=>"OTcBLFuD6EKWCUhLZFUGOQIz20TLNb_4UuJTPLHUo3cw"} + NotifyUser::UserHash Exists (0.6ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'OTcBLFuD6EKWCUhLZFUGOQIz20TLNb_4UuJTPLHUo3cw' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1 + NotifyUser::UserHash Load (0.6ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'OTcBLFuD6EKWCUhLZFUGOQIz20TLNb_4UuJTPLHUo3cw' 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", 1611]] +  (0.2ms) SAVEPOINT active_record_1 + NotifyUser::Unsubscribe Exists (0.4ms) 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" = 1611) LIMIT 1 + SQL (0.4ms) 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, 17 Dec 2014 06:43:32 UTC +00:00], ["target_id", 1611], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:43:32 UTC +00:00]] +  (0.2ms) 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" = 453 [["active", false], ["updated_at", Wed, 17 Dec 2014 06:43:32 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Completed 200 OK in 11ms (Views: 0.3ms | ActiveRecord: 3.9ms) + NotifyUser::UserHash Load (0.5ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" ORDER BY "notify_user_user_hashes"."id" DESC LIMIT 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.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.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.2ms) ROLLBACK TO 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" 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.2ms) 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.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.4ms) 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, 17 Dec 2014 06:43:32 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:43:32 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" = 1612 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, 17 Dec 2014 06:43:32 UTC +00:00], ["state", "pending"], ["target_id", 1612], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:43:32 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1612 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, 17 Dec 2014 06:43:32 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:43:32 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) SAVEPOINT active_record_1 +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1613 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, 17 Dec 2014 06:43:32 UTC +00:00], ["state", "pending"], ["target_id", 1613], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:43:32 UTC +00:00]] +  (0.2ms) RELEASE 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, 17 Dec 2014 06:43:32 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:43:32 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" = 1614 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, 17 Dec 2014 06:43:32 UTC +00:00], ["state", "pending"], ["target_id", 1614], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:43:32 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +  (0.4ms) SAVEPOINT active_record_1 + SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 17 Dec 2014 06:43:32 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:43:32 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" = 1615 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, 17 Dec 2014 06:43:32 UTC +00:00], ["state", "pending"], ["target_id", 1615], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:43:32 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" = 1615 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (1.1ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1640 [["params", {"listing_id"=>1}], ["updated_at", Wed, 17 Dec 2014 06:43:32 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 + NewPostNotification Load (0.6ms) 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, 17 Dec 2014 06:43:32 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:43:32 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" = 1616 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, 17 Dec 2014 06:43:32 UTC +00:00], ["state", "pending"], ["target_id", 1616], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:43:32 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" = 1616 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.8ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1641 [["params", {"listing_id"=>1}], ["updated_at", Wed, 17 Dec 2014 06:43:32 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NewPostNotification Load (0.6ms) 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.3ms) 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, 17 Dec 2014 06:43:33 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:43:33 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" = 1617 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, 17 Dec 2014 06:43:33 UTC +00:00], ["state", "pending"], ["target_id", 1617], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:43:33 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" = 1617 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" = 1642 [["params", {:listing_id=>1}], ["updated_at", Wed, 17 Dec 2014 06:43:33 UTC +00:00]] +  (0.3ms) 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.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, 17 Dec 2014 06:43:33 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:43:33 UTC +00:00]] +  (0.2ms) 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" = 1618 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, 17 Dec 2014 06:43:33 UTC +00:00], ["state", "pending"], ["target_id", 1618], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:43:33 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" = 1618 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" = 1643 [["params", {:listing_id=>1}], ["updated_at", Wed, 17 Dec 2014 06:43:33 UTC +00:00]] +  (0.3ms) 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, 17 Dec 2014 06:43:33 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:43:33 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" = 1619 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, 17 Dec 2014 06:43:33 UTC +00:00], ["state", "pending"], ["target_id", 1619], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:43:33 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SAVEPOINT active_record_1 +  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1 +  (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, 17 Dec 2014 06:43:33 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:43:33 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" = 1620 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, 17 Dec 2014 06:43:33 UTC +00:00], ["state", "pending"], ["target_id", 1620], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:43:33 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" = 1620 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.2ms) 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" = 1620 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1645) + NotifyUser::BaseNotification Load (0.9ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1645]] + User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1620]] + 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" = 1620 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' +  (0.3ms) SAVEPOINT active_record_1 + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1620]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1620 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" = 1645 [["state", "sent"], ["updated_at", Wed, 17 Dec 2014 06:43:33 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 1645 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1620]] +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1620 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' + NewPostNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1645 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1620]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1620 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns' +  (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, 17 Dec 2014 06:43:33 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:43:33 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" = 1621 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, 17 Dec 2014 06:43:33 UTC +00:00], ["state", "pending"], ["target_id", 1621], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:43:33 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" = 1621 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_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1621 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1646) + NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1646]] + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1621]] + 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" = 1621 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' +  (0.2ms) SAVEPOINT active_record_1 + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1621]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1621 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" = 1646 [["state", "sent"], ["updated_at", Wed, 17 Dec 2014 06:43:33 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 1646 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1621]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1621 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' + NewPostNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1646 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1621]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1621 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns' +  (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, 17 Dec 2014 06:43:33 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:43:33 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" = 1622 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, 17 Dec 2014 06:43:33 UTC +00:00], ["state", "pending"], ["target_id", 1622], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:43:33 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" = 1622 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_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1622 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1647) +  (0.2ms) SAVEPOINT active_record_1 +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1622 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, 17 Dec 2014 06:43:33 UTC +00:00], ["state", "pending"], ["target_id", 1622], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:43:33 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) 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" = 1622 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1648) +  (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, 17 Dec 2014 06:43:33 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:43:33 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" = 1623 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, 17 Dec 2014 06:43:33 UTC +00:00], ["state", "pending"], ["target_id", 1623], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:43:33 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" = 1623 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, 17 Dec 2014 06:43:33 UTC +00:00], ["state", "pending"], ["target_id", 1623], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:43:33 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') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1650]] + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1623]] + NewPostNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1623 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' +  (0.2ms) SAVEPOINT active_record_1 + User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1623]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1623 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" = 1649 [["state", "sent"], ["updated_at", Wed, 17 Dec 2014 06:43:33 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", 1623]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1623 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" = 1650 [["state", "sent"], ["updated_at", Wed, 17 Dec 2014 06:43:33 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1623 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" = 1623 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.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'CGEP15YZ05BuMFyfY858ZAt3TQ3P3wh8KPqyKuVEPGxQ' 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, 17 Dec 2014 06:43:33 UTC +00:00], ["target_id", 1623], ["target_type", "User"], ["token", "CGEP15YZ05BuMFyfY858ZAt3TQ3P3wh8KPqyKuVEPGxQ"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:43:33 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + +Sent mail to user@example.com (13.8ms) +Date: Wed, 17 Dec 2014 17:43:33 +1100 +From: please-change-me-at-config-initializers-notify-user@example.com +To: user@example.com +Message-ID: <54912615345f1_d8593fce10465be033426@wp.local.mail> +Subject: Rails404: You have new Newpostnotification 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=3DCGEP15YZ05BuMFyfY858ZAt3TQ3P3wh8KPqyKuVEPGxQ&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.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, 17 Dec 2014 06:43:33 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:43:33 UTC +00:00]] +  (0.4ms) 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" = 1624 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, 17 Dec 2014 06:43:33 UTC +00:00], ["state", "pending"], ["target_id", 1624], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:43:33 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" = $1 LIMIT 1 [["id", 1651]] + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1624]] + NewPostNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1624 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' +  (0.2ms) SAVEPOINT active_record_1 + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1624]] +  (0.9ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1624 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" = 1651 [["state", "sent"], ["updated_at", Wed, 17 Dec 2014 06:43:33 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') AND "notify_user_notifications"."id" = 1651 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1624]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1624 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' + NotifyUser::UserHash Load (1.1ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1624 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" = 'FP-UCUNK62U25sRHmP8WGQw2NSgXyO_Ffz4QSD-ZnohQ' 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, 17 Dec 2014 06:43:33 UTC +00:00], ["target_id", 1624], ["target_type", "User"], ["token", "FP-UCUNK62U25sRHmP8WGQw2NSgXyO_Ffz4QSD-ZnohQ"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:43:33 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + +Sent mail to user@example.com (7.2ms) +Date: Wed, 17 Dec 2014 17:43:33 +1100 +From: please-change-me-at-config-initializers-notify-user@example.com +To: user@example.com +Message-ID: <5491261541cce_d8593fce10465be03350@wp.local.mail> +Subject: Rails404: You have a new Newpostnotification 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=3DFP-UCUNK62U25sRHmP8WGQw2NSgXyO_Ffz4QSD-ZnohQ&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.7ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1624 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns' +  (0.2ms) 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, 17 Dec 2014 06:43:33 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:43:33 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" = 1625) LIMIT 1 + SQL (0.9ms) 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, 17 Dec 2014 06:43:33 UTC +00:00], ["target_id", 1625], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:43:33 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" = 1625 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.4ms) 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.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, 17 Dec 2014 06:43:33 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:43:33 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" = 1626 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, 17 Dec 2014 06:43:33 UTC +00:00], ["state", "pending"], ["target_id", 1626], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:43:33 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 1652 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.7ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1626]] +  (0.7ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1626 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.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 17 Dec 2014 06:43:33 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:43:33 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" = 1627 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, 17 Dec 2014 06:43:33 UTC +00:00], ["state", "pending"], ["target_id", 1627], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:43:33 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" = 1627 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, 17 Dec 2014 06:43:33 UTC +00:00], ["state", "pending"], ["target_id", 1627], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:43:33 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NewPostNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1654]] + User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1627]] + NewPostNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1627 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' +  (0.3ms) SAVEPOINT active_record_1 + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1627]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1627 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (1.3ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1653 [["state", "sent"], ["updated_at", Wed, 17 Dec 2014 06:43:33 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SAVEPOINT active_record_1 + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1627]] +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1627 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" = 1654 [["state", "sent"], ["updated_at", Wed, 17 Dec 2014 06:43:33 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1627 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' + NotifyUser::UserHash Load (1.1ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1627 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.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '1nzMqV5_GSPA14jfbG1r5QS50BnjU-4ihoM5epna6atA' LIMIT 1 + SQL (0.7ms) 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, 17 Dec 2014 06:43:33 UTC +00:00], ["target_id", 1627], ["target_type", "User"], ["token", "1nzMqV5_GSPA14jfbG1r5QS50BnjU-4ihoM5epna6atA"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:43:33 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + +Sent mail to user@example.com (7.0ms) +Date: Wed, 17 Dec 2014 17:43:33 +1100 +From: please-change-me-at-config-initializers-notify-user@example.com +To: user@example.com +Message-ID: <5491261558b75_d8593fce10465be03362b@wp.local.mail> +Subject: Rails404: You have new Newpostnotification 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=3D1nzMqV5_GSPA14jfbG1r5QS50BnjU-4ihoM5epna6atA&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.3ms) ROLLBACK +  (0.2ms) 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, 17 Dec 2014 06:43:33 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:43:33 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" = 1628 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, 17 Dec 2014 06:43:33 UTC +00:00], ["state", "pending"], ["target_id", 1628], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:43:33 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') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1655]] + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1628]] + NewPostNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1628 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' +  (0.2ms) SAVEPOINT active_record_1 + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1628]] +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1628 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (1.1ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1655 [["state", "sent"], ["updated_at", Wed, 17 Dec 2014 06:43:33 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 + NewPostNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1655 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1628]] +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1628 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" = 1628 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" = 'ew3IQZzt2hoA_lCHrl3Cfw4ShxEKfwQTEbycJB9Zl9KQ' 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, 17 Dec 2014 06:43:33 UTC +00:00], ["target_id", 1628], ["target_type", "User"], ["token", "ew3IQZzt2hoA_lCHrl3Cfw4ShxEKfwQTEbycJB9Zl9KQ"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:43:33 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + +Sent mail to user@example.com (5.9ms) +Date: Wed, 17 Dec 2014 17:43:33 +1100 +From: please-change-me-at-config-initializers-notify-user@example.com +To: user@example.com +Message-ID: <54912615644a4_d8593fce10465be0337d2@wp.local.mail> +Subject: Rails404: You have a new Newpostnotification 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=3Dew3IQZzt2hoA_lCHrl3Cfw4ShxEKfwQTEbycJB9Zl9KQ&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.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, 17 Dec 2014 06:43:33 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:43:33 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" = 1629 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.4ms) 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, 17 Dec 2014 06:43:33 UTC +00:00], ["state", "pending"], ["target_id", 1629], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:43:33 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" = 1629 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1629 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.2ms) SAVEPOINT active_record_1 +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1629 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" = 1656 [["state", "sent"], ["updated_at", Wed, 17 Dec 2014 06:43:33 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 + NewPostNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1656 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1629]] +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1629 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" = 1629 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns' +  (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, 17 Dec 2014 06:43:33 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:43:33 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" = 1630) 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, 17 Dec 2014 06:43:33 UTC +00:00], ["target_id", 1630], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:43:33 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" = 1630 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 +  (0.7ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1630 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1 +  (0.7ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1630 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (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, 17 Dec 2014 06:43:33 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:43:33 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" = 'action_mailer' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1631) LIMIT 1 + SQL (0.4ms) 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, 17 Dec 2014 06:43:33 UTC +00:00], ["target_id", 1631], ["target_type", "User"], ["type", "action_mailer"], ["updated_at", Wed, 17 Dec 2014 06:43:33 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" = 'action_mailer' AND "notify_user_unsubscribes"."id" != 371 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1631) LIMIT 1 +  (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" = 1631 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.4ms) 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, 17 Dec 2014 06:43:33 UTC +00:00], ["state", "pending"], ["target_id", 1631], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:43:33 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" = 1631 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.7ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1631 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.3ms) SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1631 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" = 1657 [["state", "sent"], ["updated_at", Wed, 17 Dec 2014 06:43:33 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 + NewPostNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1657 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1631]] +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1631 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" = 1631 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns' +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 17 Dec 2014 06:43:33 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:43:33 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" = 1632 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, 17 Dec 2014 06:43:33 UTC +00:00], ["state", "pending"], ["target_id", 1632], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:43:33 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" = 1632 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.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'CAJdgv7pqL7h-p7NtTc8ow1tDckfgklQtKC19SEteoLw' LIMIT 1 + SQL (0.7ms) 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, 17 Dec 2014 06:43:33 UTC +00:00], ["target_id", 1632], ["target_type", "User"], ["token", "CAJdgv7pqL7h-p7NtTc8ow1tDckfgklQtKC19SEteoLw"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:43:33 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) 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, 17 Dec 2014 06:43:33 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:43:33 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" = 1633 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, 17 Dec 2014 06:43:33 UTC +00:00], ["state", "pending"], ["target_id", 1633], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:43:33 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NotifyUser::UserHash Load (0.5ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1633 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.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'PkDktsYtDTFXyly45JwUUgAmgTFOTvb986ciIGIXaKrA' LIMIT 1 + SQL (0.4ms) 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, 17 Dec 2014 06:43:33 UTC +00:00], ["target_id", 1633], ["target_type", "User"], ["token", "PkDktsYtDTFXyly45JwUUgAmgTFOTvb986ciIGIXaKrA"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:43:33 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" = 1633 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, 17 Dec 2014 06:43:33 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:43:33 UTC +00:00]] +  (0.2ms) 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" = 1634 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, 17 Dec 2014 06:43:33 UTC +00:00], ["state", "pending"], ["target_id", 1634], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:43:33 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" = 1634 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" = '-wgBhVBo-spfqVhzFK5m3ATTqCnX50Q_OyzpX_au2Ewg' 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, 17 Dec 2014 06:43:33 UTC +00:00], ["target_id", 1634], ["target_type", "User"], ["token", "-wgBhVBo-spfqVhzFK5m3ATTqCnX50Q_OyzpX_au2Ewg"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:43:33 UTC +00:00]] +  (0.2ms) 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" = 460 [["active", false], ["updated_at", Wed, 17 Dec 2014 06:43:33 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NotifyUser::UserHash Load (0.5ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1634 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" = 'VXILidhGmBFm93-zASTpygXGbiXMqbiIPFDYZjsbuLGA' 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, 17 Dec 2014 06:43:33 UTC +00:00], ["target_id", 1634], ["target_type", "User"], ["token", "VXILidhGmBFm93-zASTpygXGbiXMqbiIPFDYZjsbuLGA"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:43:33 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, 17 Dec 2014 06:43:33 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:43:33 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" = 1635) 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, 17 Dec 2014 06:43:33 UTC +00:00], ["target_id", 1635], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:43:33 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + NotifyUser::Unsubscribe Exists (0.4ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 372 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1635) LIMIT 1 +  (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" = 1635 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 +  (0.2ms) ROLLBACK +  (0.3ms) 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, 17 Dec 2014 06:43:33 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:43:33 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + NotifyUser::Unsubscribe Exists (0.4ms) 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" = 1636) 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, 17 Dec 2014 06:43:33 UTC +00:00], ["target_id", 1636], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:43:33 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" != 373 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1636) 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" = 1636 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.2ms) ROLLBACK TO SAVEPOINT active_record_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, 17 Dec 2014 06:43:33 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:43:33 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" = 1637) 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, 17 Dec 2014 06:43:33 UTC +00:00], ["target_id", 1637], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:43:33 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"."id" != 374 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1637) LIMIT 1 +  (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"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1637) LIMIT 1 +  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1637 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + NotifyUser::Unsubscribe Load (0.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1637 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.4ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 374]] +  (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" = 1637 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.9ms) 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, 17 Dec 2014 06:43:33 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:43:33 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" = 1638 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, 17 Dec 2014 06:43:33 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1638], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:43:33 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_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, 17 Dec 2014 06:43:33 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:43:33 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_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" = '8rOA1qergcbuMXSqAJ5rHAsuagC-3hXfSGDSzwwD2QEQ' 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, 17 Dec 2014 06:43:33 UTC +00:00], ["target_id", 1639], ["target_type", "User"], ["token", "8rOA1qergcbuMXSqAJ5rHAsuagC-3hXfSGDSzwwD2QEQ"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:43:33 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 +  (0.3ms) 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" = '8rOA1qergcbuMXSqAJ5rHAsuagC-3hXfSGDSzwwD2QEQ' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 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, 17 Dec 2014 06:43:33 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:43:33 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_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" = 'MkGanTbhkuZnDNLWzf9L-QGUWClQrRV904Ead3shu2bg' 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, 17 Dec 2014 06:43:33 UTC +00:00], ["target_id", 1640], ["target_type", "User"], ["token", "MkGanTbhkuZnDNLWzf9L-QGUWClQrRV904Ead3shu2bg"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:43:33 UTC +00:00]] +  (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 + SQL (0.7ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 463 [["active", false], ["updated_at", Wed, 17 Dec 2014 06:43:33 UTC +00:00]] +  (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" = 'MkGanTbhkuZnDNLWzf9L-QGUWClQrRV904Ead3shu2bg' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' 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, 17 Dec 2014 06:43:33 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:43:33 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" = 'lLGCsbXzZ2uLytITWx3lUAp0DueiCr0mDXwq8xBEsCDQ' 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, 17 Dec 2014 06:43:33 UTC +00:00], ["target_id", 1641], ["target_type", "User"], ["token", "lLGCsbXzZ2uLytITWx3lUAp0DueiCr0mDXwq8xBEsCDQ"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:43:33 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 +  (0.2ms) 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" = 464 [["active", false], ["updated_at", Wed, 17 Dec 2014 06:43:33 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (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, 17 Dec 2014 06:43:33 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:43:33 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_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" = 'g_hdL5jG7BUoPk0uBJ7OCghy9e-rcJT7f6J3R9RjBK9Q' LIMIT 1 + SQL (0.4ms) 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, 17 Dec 2014 06:43:33 UTC +00:00], ["target_id", 1642], ["target_type", "User"], ["token", "g_hdL5jG7BUoPk0uBJ7OCghy9e-rcJT7f6J3R9RjBK9Q"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:43:33 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) 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.2ms) BEGIN +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +  (0.2ms) SAVEPOINT active_record_1 + SQL (7.1ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 17 Dec 2014 06:45:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:45:13 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.4ms) +Completed 200 OK in 19ms (Views: 16.1ms | ActiveRecord: 0.0ms) +  (0.4ms) 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, 17 Dec 2014 06:45:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:45:13 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) SAVEPOINT active_record_1 +  (1.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1644 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (2.3ms) 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, 17 Dec 2014 06:45:13 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1644], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:45:13 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#index as JSON +  (0.7ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1644 AND "notify_user_notifications"."target_type" = 'User' + NotifyUser::BaseNotification Load (1.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1644 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 +Completed 200 OK in 20ms (Views: 12.1ms | ActiveRecord: 2.1ms) +  (0.4ms) ROLLBACK +  (0.2ms) BEGIN +  (0.2ms) SAVEPOINT active_record_1 + SQL (1.0ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 17 Dec 2014 06:45:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:45:13 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" = 1645 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, 17 Dec 2014 06:45:13 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1645], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:45:13 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" = 1645 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, 17 Dec 2014 06:45:13 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1645], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:45:13 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 +  (0.8ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1645 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, 17 Dec 2014 06:45:13 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1645], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:45:13 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#index as HTML + NotifyUser::BaseNotification Load (0.9ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1645 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 +Completed 200 OK in 60ms (Views: 58.5ms | ActiveRecord: 0.9ms) +  (0.6ms) ROLLBACK +  (0.2ms) BEGIN +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.9ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 17 Dec 2014 06:45:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:45:13 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" = 1646 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, 17 Dec 2014 06:45:13 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1646], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:45:13 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" = 1646 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, 17 Dec 2014 06:45:13 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1646], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:45:13 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 +  (0.9ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1646 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, 17 Dec 2014 06:45:13 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1646], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:45:13 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#read as HTML + Parameters: {"id"=>"1666"} + NotifyUser::BaseNotification Load (1.0ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1646 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1666') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 +  (0.2ms) SAVEPOINT active_record_1 + User Load (1.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1646]] +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1646 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (1.2ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1666 [["state", "read"], ["updated_at", Wed, 17 Dec 2014 06:45:13 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +Completed 200 OK in 24ms (Views: 2.3ms | ActiveRecord: 4.4ms) + NotifyUser::BaseNotification Load (0.8ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 1666 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.8ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 17 Dec 2014 06:45:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:45:13 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" = 1647 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, 17 Dec 2014 06:45:13 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1647], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:45:13 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" = 1647 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, 17 Dec 2014 06:45:13 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1647], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:45:13 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" = 1647 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, 17 Dec 2014 06:45:13 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1647], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:45:13 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#read as HTML + Parameters: {"id"=>"1669"} + NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1647 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1669') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 +  (0.3ms) SAVEPOINT active_record_1 + User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1647]] +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1647 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (1.2ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1669 [["state", "read"], ["updated_at", Wed, 17 Dec 2014 06:45:13 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Completed 200 OK in 11ms (Views: 0.4ms | ActiveRecord: 3.4ms) +Processing by NotifyUser::NotificationsController#read as HTML + Parameters: {"id"=>"1669"} + NotifyUser::BaseNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1647 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1669') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 +Completed 200 OK in 2ms (Views: 0.3ms | ActiveRecord: 4.1ms) +  (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, 17 Dec 2014 06:45:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:45:13 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" = 1648 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, 17 Dec 2014 06:45:13 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1648], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:45:13 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" = 1648 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, 17 Dec 2014 06:45:13 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1648], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:45:13 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" = 1648 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, 17 Dec 2014 06:45:13 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1648], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:45:13 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#mark_all as HTML + SQL (0.9ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1648 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: 0.9ms) + NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1648 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('["pending","sent"]')) +  (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, 17 Dec 2014 06:45:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:45:13 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" = 1649 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, 17 Dec 2014 06:45:13 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1649], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:45:13 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#mark_read as HTML + Parameters: {"ids"=>["1675"]} + SQL (0.7ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1649 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1675')) + NotifyUser::BaseNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1649 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1675')) +Completed 200 OK in 6ms (Views: 2.7ms | ActiveRecord: 1.4ms) + NewPostNotification Load (0.9ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1675]] +  (0.2ms) ROLLBACK +  (0.4ms) BEGIN +  (0.4ms) SAVEPOINT active_record_1 + SQL (0.7ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 17 Dec 2014 06:45:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:45:13 UTC +00:00]] +  (0.5ms) 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" = 1650 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, 17 Dec 2014 06:45:13 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1650], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:45:13 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#mark_read as HTML + Parameters: {"ids"=>["1676"]} + SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1650 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1676')) + NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1650 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1676')) +Completed 200 OK in 6ms (Views: 3.0ms | ActiveRecord: 1.2ms) +  (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, 17 Dec 2014 06:45:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:45:13 UTC +00:00]] +  (0.2ms) 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" = 1651 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, 17 Dec 2014 06:45:13 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1651], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:45:13 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NotifyUser::Unsubscribe Load (0.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1651 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.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1651 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" = 1651) LIMIT 1 + SQL (1.1ms) 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, 17 Dec 2014 06:45:13 UTC +00:00], ["target_id", 1651], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:45:13 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1651 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +Completed 200 OK in 34ms (Views: 0.4ms | ActiveRecord: 3.4ms) + NotifyUser::Unsubscribe Load (0.5ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1651 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.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 17 Dec 2014 06:45:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:45:13 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" = 1652 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.8ms) 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, 17 Dec 2014 06:45:13 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1652], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:45:13 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 + NotifyUser::Unsubscribe Load (0.5ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1652 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.7ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1652 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" = 1652 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 1.1ms) + NotifyUser::Unsubscribe Load (0.6ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1652 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (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, 17 Dec 2014 06:45:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:45:13 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" = 1653 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, 17 Dec 2014 06:45:13 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1653], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:45:13 UTC +00:00]] +  (0.5ms) 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.7ms) 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" = 1653) LIMIT 1 + SQL (0.9ms) 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, 17 Dec 2014 06:45:13 UTC +00:00], ["target_id", 1653], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:45:13 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://test.host/notify_user/notifications/unsubscribe +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1653 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +Completed 302 Found in 8ms (ActiveRecord: 2.7ms) + 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.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, 17 Dec 2014 06:45:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:45:13 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) SAVEPOINT active_record_1 +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1654 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, 17 Dec 2014 06:45:13 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1654], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:45:13 UTC +00:00]] +  (0.5ms) 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" = 1654) 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, 17 Dec 2014 06:45:13 UTC +00:00], ["target_id", 1654], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:45:13 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#subscribe as HTML + Parameters: {"type"=>"NewPostNotification"} + NotifyUser::Unsubscribe Load (0.7ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1654 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.6ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 377]] +  (0.3ms) 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.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, 17 Dec 2014 06:45:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:45:13 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" = 1655 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, 17 Dec 2014 06:45:13 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1655], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:45:13 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NotifyUser::UserHash Load (0.9ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1655 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" = 'T-dPpdUq_UpoaL1s9Vy7MgplLg7XnPIz12CKFSoxGa1w' 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, 17 Dec 2014 06:45:14 UTC +00:00], ["target_id", 1655], ["target_type", "User"], ["token", "T-dPpdUq_UpoaL1s9Vy7MgplLg7XnPIz12CKFSoxGa1w"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:45:14 UTC +00:00]] +  (0.5ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#unauth_unsubscribe as HTML + Parameters: {"type"=>"NewPostNotification", "token"=>"T-dPpdUq_UpoaL1s9Vy7MgplLg7XnPIz12CKFSoxGa1w"} + NotifyUser::UserHash Exists (0.7ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'T-dPpdUq_UpoaL1s9Vy7MgplLg7XnPIz12CKFSoxGa1w' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1 + NotifyUser::UserHash Load (0.8ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'T-dPpdUq_UpoaL1s9Vy7MgplLg7XnPIz12CKFSoxGa1w' AND "notify_user_user_hashes"."type" = 'NewPostNotification' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1 + User Load (0.6ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1655]] +  (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" = 1655) 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, 17 Dec 2014 06:45:14 UTC +00:00], ["target_id", 1655], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:45:14 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" = 466 [["active", false], ["updated_at", Wed, 17 Dec 2014 06:45:14 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Completed 200 OK in 14ms (Views: 0.5ms | ActiveRecord: 4.8ms) + NotifyUser::UserHash Load (0.7ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" ORDER BY "notify_user_user_hashes"."id" DESC LIMIT 1 +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN + NotifyUser::UserHash Load (1.0ms) 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.4ms) SAVEPOINT active_record_1 +  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 + 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 +  (0.4ms) ROLLBACK +  (0.3ms) BEGIN + NotifyUser::UserHash Load (0.6ms) 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 (1.0ms) 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.5ms) ROLLBACK TO SAVEPOINT active_record_1 +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN + NotifyUser::UserHash Load (1.2ms) 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.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.2ms) ROLLBACK TO SAVEPOINT active_record_1 +  (0.3ms) 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, 17 Dec 2014 06:45:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:45:14 UTC +00:00]] +  (0.4ms) 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" = 1656 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, 17 Dec 2014 06:45:14 UTC +00:00], ["state", "pending"], ["target_id", 1656], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:45:14 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1656 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('sent','pending')) +  (0.3ms) ROLLBACK +  (0.3ms) BEGIN +  (0.3ms) SAVEPOINT active_record_1 + SQL (5.2ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 17 Dec 2014 06:45:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:45:14 UTC +00:00]] +  (0.4ms) 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" = 1657 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, 17 Dec 2014 06:45:14 UTC +00:00], ["state", "pending"], ["target_id", 1657], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:45:14 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, 17 Dec 2014 06:45:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:45:14 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" = 1658 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, 17 Dec 2014 06:45:14 UTC +00:00], ["state", "pending"], ["target_id", 1658], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:45:14 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_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, 17 Dec 2014 06:45:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:45:14 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" = 1659 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, 17 Dec 2014 06:45:14 UTC +00:00], ["state", "pending"], ["target_id", 1659], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:45:14 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" = 1659 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (1.1ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1685 [["params", {"listing_id"=>1}], ["updated_at", Wed, 17 Dec 2014 06:45:14 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, 17 Dec 2014 06:45:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:45:14 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" = 1660 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, 17 Dec 2014 06:45:14 UTC +00:00], ["state", "pending"], ["target_id", 1660], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:45:14 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1660 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" = 1686 [["params", {"listing_id"=>1}], ["updated_at", Wed, 17 Dec 2014 06:45:14 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NewPostNotification Load (0.6ms) 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 (1.1ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 17 Dec 2014 06:45:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:45:14 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" = 1661 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, 17 Dec 2014 06:45:14 UTC +00:00], ["state", "pending"], ["target_id", 1661], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:45:14 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" = 1661 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" = 1687 [["params", {:listing_id=>1}], ["updated_at", Wed, 17 Dec 2014 06:45:14 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 + NewPostNotification Load (0.8ms) 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, 17 Dec 2014 06:45:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:45:14 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" = 1662 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, 17 Dec 2014 06:45:14 UTC +00:00], ["state", "pending"], ["target_id", 1662], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:45:14 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" = 1662 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" = 1688 [["params", {:listing_id=>1}], ["updated_at", Wed, 17 Dec 2014 06:45:14 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NewPostNotification Load (0.8ms) 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.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 17 Dec 2014 06:45:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:45:14 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" = 1663 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, 17 Dec 2014 06:45:14 UTC +00:00], ["state", "pending"], ["target_id", 1663], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:45:14 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 +  (0.5ms) ROLLBACK TO SAVEPOINT active_record_1 +  (0.4ms) 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, 17 Dec 2014 06:45:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:45:14 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 +  (0.8ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1664 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, 17 Dec 2014 06:45:14 UTC +00:00], ["state", "pending"], ["target_id", 1664], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:45:14 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1664 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" = 1664 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1690) + NotifyUser::BaseNotification Load (0.9ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1690]] + User Load (0.6ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1664]] + 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" = 1664 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' +  (0.2ms) SAVEPOINT active_record_1 + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1664]] +  (0.9ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1664 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" = 1690 [["state", "sent"], ["updated_at", Wed, 17 Dec 2014 06:45:14 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 1690 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1664]] +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1664 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" = 1690 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1664]] +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1664 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns' +  (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, 17 Dec 2014 06:45:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:45:14 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" = 1665 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, 17 Dec 2014 06:45:14 UTC +00:00], ["state", "pending"], ["target_id", 1665], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:45:14 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" = 1665 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.3ms) 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" = 1665 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1691) + NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1691]] + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1665]] + NotifyUser::BaseNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1665 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' +  (0.2ms) SAVEPOINT active_record_1 + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1665]] +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1665 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" = 1691 [["state", "sent"], ["updated_at", Wed, 17 Dec 2014 06:45:14 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" = 1691 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1665]] +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1665 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' + NewPostNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1691 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1665]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1665 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns' +  (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, 17 Dec 2014 06:45:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:45:14 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" = 1666 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, 17 Dec 2014 06:45:14 UTC +00:00], ["state", "pending"], ["target_id", 1666], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:45:14 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" = 1666 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_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1666 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1692) +  (0.2ms) SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1666 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, 17 Dec 2014 06:45:14 UTC +00:00], ["state", "pending"], ["target_id", 1666], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:45:14 UTC +00:00]] +  (0.3ms) 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" = 1666 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1693) +  (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, 17 Dec 2014 06:45:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:45:14 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" = 1667 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.4ms) 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, 17 Dec 2014 06:45:14 UTC +00:00], ["state", "pending"], ["target_id", 1667], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:45:14 UTC +00:00]] +  (0.2ms) 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" = 1667 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, 17 Dec 2014 06:45:14 UTC +00:00], ["state", "pending"], ["target_id", 1667], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:45:14 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" = $1 LIMIT 1 [["id", 1695]] + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1667]] + NewPostNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1667 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' +  (0.4ms) SAVEPOINT active_record_1 + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1667]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1667 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" = 1694 [["state", "sent"], ["updated_at", Wed, 17 Dec 2014 06:45:14 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", 1667]] +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1667 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (1.2ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1695 [["state", "sent"], ["updated_at", Wed, 17 Dec 2014 06:45:14 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1667 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" = 1667 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" = '2aS2agEhkGRAvk2mQHh3GwE9YBeFogB-srkpdtmlG6rQ' LIMIT 1 + SQL (0.7ms) 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, 17 Dec 2014 06:45:14 UTC +00:00], ["target_id", 1667], ["target_type", "User"], ["token", "2aS2agEhkGRAvk2mQHh3GwE9YBeFogB-srkpdtmlG6rQ"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:45:14 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 + +Sent mail to user@example.com (12.8ms) +Date: Wed, 17 Dec 2014 17:45:14 +1100 +From: please-change-me-at-config-initializers-notify-user@example.com +To: user@example.com +Message-ID: <5491267a70ade_da033fec59c63bf035c4@wp.local.mail> +Subject: Rails404: You have new Newpostnotification 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=3D2aS2agEhkGRAvk2mQHh3GwE9YBeFogB-srkpdtmlG6rQ&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.3ms) ROLLBACK +  (0.3ms) 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, 17 Dec 2014 06:45:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:45:14 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" = 1668 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, 17 Dec 2014 06:45:14 UTC +00:00], ["state", "pending"], ["target_id", 1668], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:45:14 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" = $1 LIMIT 1 [["id", 1696]] + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1668]] + NewPostNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1668 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' +  (0.3ms) SAVEPOINT active_record_1 + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1668]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1668 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (1.2ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1696 [["state", "sent"], ["updated_at", Wed, 17 Dec 2014 06:45:14 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') AND "notify_user_notifications"."id" = 1696 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1668]] +  (0.8ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1668 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" = 1668 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" = 'm_a8zLf9VgUy2N8A0cb57g_PZCrUK_bhdDI64a8cvhAw' 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, 17 Dec 2014 06:45:14 UTC +00:00], ["target_id", 1668], ["target_type", "User"], ["token", "m_a8zLf9VgUy2N8A0cb57g_PZCrUK_bhdDI64a8cvhAw"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:45:14 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 + +Sent mail to user@example.com (7.1ms) +Date: Wed, 17 Dec 2014 17:45:14 +1100 +From: please-change-me-at-config-initializers-notify-user@example.com +To: user@example.com +Message-ID: <5491267a7e945_da033fec59c63bf036a6@wp.local.mail> +Subject: Rails404: You have a new Newpostnotification 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=3Dm_a8zLf9VgUy2N8A0cb57g_PZCrUK_bhdDI64a8cvhAw&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.7ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1668 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns' +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.8ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 17 Dec 2014 06:45:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:45:14 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) 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"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1669) 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, 17 Dec 2014 06:45:14 UTC +00:00], ["target_id", 1669], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:45:14 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" = 1669 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.4ms) 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.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, 17 Dec 2014 06:45:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:45:14 UTC +00:00]] +  (0.2ms) 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" = 1670 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, 17 Dec 2014 06:45:14 UTC +00:00], ["state", "pending"], ["target_id", 1670], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:45:14 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 1697 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1670]] +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1670 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' +  (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, 17 Dec 2014 06:45:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:45:14 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" = 1671 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, 17 Dec 2014 06:45:14 UTC +00:00], ["state", "pending"], ["target_id", 1671], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:45:14 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" = 1671 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, 17 Dec 2014 06:45:14 UTC +00:00], ["state", "pending"], ["target_id", 1671], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:45:14 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') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1699]] + User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1671]] + NewPostNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1671 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' +  (0.2ms) SAVEPOINT active_record_1 + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1671]] +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1671 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" = 1698 [["state", "sent"], ["updated_at", Wed, 17 Dec 2014 06:45:14 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SAVEPOINT active_record_1 + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1671]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1671 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" = 1699 [["state", "sent"], ["updated_at", Wed, 17 Dec 2014 06:45:14 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1671 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' + NotifyUser::UserHash Load (0.9ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1671 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.4ms) SAVEPOINT active_record_1 + NotifyUser::UserHash Exists (0.7ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'tCxCgpfTlcL-00KzC0sRBwNL9bLbNYB3lvG5CjHHb-Yw' 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, 17 Dec 2014 06:45:14 UTC +00:00], ["target_id", 1671], ["target_type", "User"], ["token", "tCxCgpfTlcL-00KzC0sRBwNL9bLbNYB3lvG5CjHHb-Yw"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:45:14 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 + +Sent mail to user@example.com (6.7ms) +Date: Wed, 17 Dec 2014 17:45:14 +1100 +From: please-change-me-at-config-initializers-notify-user@example.com +To: user@example.com +Message-ID: <5491267a94f8b_da033fec59c63bf037a2@wp.local.mail> +Subject: Rails404: You have new Newpostnotification 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=3DtCxCgpfTlcL-00KzC0sRBwNL9bLbNYB3lvG5CjHHb-Yw&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.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, 17 Dec 2014 06:45:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:45:14 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" = 1672 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, 17 Dec 2014 06:45:14 UTC +00:00], ["state", "pending"], ["target_id", 1672], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:45:14 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NewPostNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1700]] + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1672]] + NewPostNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1672 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' +  (0.2ms) SAVEPOINT active_record_1 + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1672]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1672 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" = 1700 [["state", "sent"], ["updated_at", Wed, 17 Dec 2014 06:45:14 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" = 1700 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1672]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1672 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" = 1672 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" = 'PubN2qk5muzp1gPI-tcMrgQ3Fjsf5Q0niHnqdopPDwHQ' 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, 17 Dec 2014 06:45:14 UTC +00:00], ["target_id", 1672], ["target_type", "User"], ["token", "PubN2qk5muzp1gPI-tcMrgQ3Fjsf5Q0niHnqdopPDwHQ"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:45:14 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 + +Sent mail to user@example.com (5.9ms) +Date: Wed, 17 Dec 2014 17:45:14 +1100 +From: please-change-me-at-config-initializers-notify-user@example.com +To: user@example.com +Message-ID: <5491267a9fb77_da033fec59c63bf03810@wp.local.mail> +Subject: Rails404: You have a new Newpostnotification 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=3DPubN2qk5muzp1gPI-tcMrgQ3Fjsf5Q0niHnqdopPDwHQ&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.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, 17 Dec 2014 06:45:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:45:14 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 +  (0.8ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1673 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, 17 Dec 2014 06:45:14 UTC +00:00], ["state", "pending"], ["target_id", 1673], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:45:14 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" = 1673 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.3ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1673 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.2ms) SAVEPOINT active_record_1 +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1673 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" = 1701 [["state", "sent"], ["updated_at", Wed, 17 Dec 2014 06:45:14 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') AND "notify_user_notifications"."id" = 1701 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1673]] +  (0.7ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1673 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" = 1673 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns' +  (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, 17 Dec 2014 06:45:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:45:14 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"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1674) 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, 17 Dec 2014 06:45:14 UTC +00:00], ["target_id", 1674], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:45:14 UTC +00:00]] +  (0.2ms) 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" = 1674 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.7ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1674 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1674 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (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, 17 Dec 2014 06:45:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:45:14 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" = 'action_mailer' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1675) 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, 17 Dec 2014 06:45:14 UTC +00:00], ["target_id", 1675], ["target_type", "User"], ["type", "action_mailer"], ["updated_at", Wed, 17 Dec 2014 06:45:14 UTC +00:00]] +  (0.3ms) 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"."id" != 381 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1675) LIMIT 1 +  (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" = 1675 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, 17 Dec 2014 06:45:14 UTC +00:00], ["state", "pending"], ["target_id", 1675], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:45:14 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" = 1675 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1675 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.2ms) SAVEPOINT active_record_1 +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1675 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (1.2ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1702 [["state", "sent"], ["updated_at", Wed, 17 Dec 2014 06:45:14 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" = 1702 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1675]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1675 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' +  (1.0ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1675 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns' +  (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, 17 Dec 2014 06:45:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:45:14 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" = 1676 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, 17 Dec 2014 06:45:14 UTC +00:00], ["state", "pending"], ["target_id", 1676], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:45:14 UTC +00:00]] +  (0.3ms) 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" = 1676 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" = 'nG7ToKUhD-0dzAzSkbhEIgVAgoipN-L6UFP2vuCWZ7fw' LIMIT 1 + SQL (1.0ms) 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, 17 Dec 2014 06:45:14 UTC +00:00], ["target_id", 1676], ["target_type", "User"], ["token", "nG7ToKUhD-0dzAzSkbhEIgVAgoipN-L6UFP2vuCWZ7fw"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:45:14 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) 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, 17 Dec 2014 06:45:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:45:14 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" = 1677 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, 17 Dec 2014 06:45:14 UTC +00:00], ["state", "pending"], ["target_id", 1677], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:45:14 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" = 1677 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.9ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'TVLH0_dGRqnKdNuLhKg-swwULaGC0emPQ_wrifh5D5dw' 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, 17 Dec 2014 06:45:14 UTC +00:00], ["target_id", 1677], ["target_type", "User"], ["token", "TVLH0_dGRqnKdNuLhKg-swwULaGC0emPQ_wrifh5D5dw"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:45:14 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NotifyUser::UserHash Load (0.5ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1677 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.1ms) 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, 17 Dec 2014 06:45:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:45:14 UTC +00:00]] +  (0.1ms) 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" = 1678 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, 17 Dec 2014 06:45:14 UTC +00:00], ["state", "pending"], ["target_id", 1678], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:45:14 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NotifyUser::UserHash Load (0.5ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1678 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" = 'EQlKRJO0JJqdLEniO8vKOgK3ybY8xqHNdv0J6rnO_qBA' LIMIT 1 + SQL (0.4ms) 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, 17 Dec 2014 06:45:14 UTC +00:00], ["target_id", 1678], ["target_type", "User"], ["token", "EQlKRJO0JJqdLEniO8vKOgK3ybY8xqHNdv0J6rnO_qBA"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:45:14 UTC +00:00]] +  (0.1ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 + SQL (0.8ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 473 [["active", false], ["updated_at", Wed, 17 Dec 2014 06:45:14 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NotifyUser::UserHash Load (0.5ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1678 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.1ms) SAVEPOINT active_record_1 + NotifyUser::UserHash Exists (0.5ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'CPRSHOlZsgNFJ0Epzbq3ZwjLr09Bsehko0R5Ln6aNg0A' 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, 17 Dec 2014 06:45:14 UTC +00:00], ["target_id", 1678], ["target_type", "User"], ["token", "CPRSHOlZsgNFJ0Epzbq3ZwjLr09Bsehko0R5Ln6aNg0A"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:45:14 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_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, 17 Dec 2014 06:45:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:45:14 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"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1679) 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, 17 Dec 2014 06:45:14 UTC +00:00], ["target_id", 1679], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:45:14 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" != 382 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1679) LIMIT 1 +  (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" = 1679 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.3ms) ROLLBACK TO SAVEPOINT active_record_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, 17 Dec 2014 06:45:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:45:14 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"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1680) 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, 17 Dec 2014 06:45:14 UTC +00:00], ["target_id", 1680], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:45:14 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" != 383 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1680) LIMIT 1 +  (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" = 1680 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.2ms) ROLLBACK TO SAVEPOINT active_record_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, 17 Dec 2014 06:45:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:45:14 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + NotifyUser::Unsubscribe Exists (0.4ms) 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" = 1681) LIMIT 1 + SQL (0.8ms) 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, 17 Dec 2014 06:45:14 UTC +00:00], ["target_id", 1681], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:45:14 UTC +00:00]] +  (0.3ms) 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" != 384 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1681) LIMIT 1 +  (0.4ms) 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"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1681) LIMIT 1 +  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 +  (0.7ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1681 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + NotifyUser::Unsubscribe Load (0.6ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1681 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.4ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 384]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NotifyUser::Unsubscribe Load (0.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1681 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.2ms) 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, 17 Dec 2014 06:45:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:45:14 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" = 1682 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, 17 Dec 2014 06:45:14 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1682], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:45:14 UTC +00:00]] +  (0.2ms) 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, 17 Dec 2014 06:45:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:45:14 UTC +00:00]] +  (0.3ms) 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" = '0Gu5NEWvkUf8s9P8N4KixgxkMMNank2p9q2XiXWNWjDQ' 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, 17 Dec 2014 06:45:14 UTC +00:00], ["target_id", 1683], ["target_type", "User"], ["token", "0Gu5NEWvkUf8s9P8N4KixgxkMMNank2p9q2XiXWNWjDQ"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:45:14 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NotifyUser::UserHash Exists (0.6ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '0Gu5NEWvkUf8s9P8N4KixgxkMMNank2p9q2XiXWNWjDQ' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1 +  (0.3ms) ROLLBACK +  (0.3ms) 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, 17 Dec 2014 06:45:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:45:14 UTC +00:00]] +  (0.3ms) 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" = 'mF5OYrV-h2w_fqbNCNx_8A9goP21jSjj2pjwGxPb6NTg' 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, 17 Dec 2014 06:45:14 UTC +00:00], ["target_id", 1684], ["target_type", "User"], ["token", "mF5OYrV-h2w_fqbNCNx_8A9goP21jSjj2pjwGxPb6NTg"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:45:14 UTC +00:00]] +  (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 + SQL (0.9ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 476 [["active", false], ["updated_at", Wed, 17 Dec 2014 06:45:14 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NotifyUser::UserHash Exists (0.6ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'mF5OYrV-h2w_fqbNCNx_8A9goP21jSjj2pjwGxPb6NTg' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' 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, 17 Dec 2014 06:45:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:45:14 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_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" = 'OvPpb1W1ok0H-8emt0_x7wuIdXFZ9mznJYcvFerExhoA' 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, 17 Dec 2014 06:45:14 UTC +00:00], ["target_id", 1685], ["target_type", "User"], ["token", "OvPpb1W1ok0H-8emt0_x7wuIdXFZ9mznJYcvFerExhoA"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:45:14 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 +  (0.2ms) 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" = 477 [["active", false], ["updated_at", Wed, 17 Dec 2014 06:45:14 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, 17 Dec 2014 06:45:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:45:14 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_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" = 'qhmRim-KeqOeJxPZd8MtPAfdJPkiij4Bw6CevBWqny8A' 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, 17 Dec 2014 06:45:14 UTC +00:00], ["target_id", 1686], ["target_type", "User"], ["token", "qhmRim-KeqOeJxPZd8MtPAfdJPkiij4Bw6CevBWqny8A"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:45:14 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +  (0.2ms) ROLLBACK +  (0.1ms) 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.3ms) SAVEPOINT active_record_1 + SQL (8.3ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 17 Dec 2014 06:47:01 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:47:01 UTC +00:00]] +  (0.2ms) 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.4ms) +Completed 200 OK in 19ms (Views: 16.0ms | ActiveRecord: 0.0ms) +  (0.4ms) 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, 17 Dec 2014 06:47:01 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:47:01 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SAVEPOINT active_record_1 +  (1.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1688 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (1.9ms) 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, 17 Dec 2014 06:47:01 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1688], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:47:01 UTC +00:00]] +  (0.2ms) 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" = 1688 AND "notify_user_notifications"."target_type" = 'User' + NotifyUser::BaseNotification Load (1.2ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1688 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 +Completed 200 OK in 20ms (Views: 12.4ms | ActiveRecord: 2.0ms) +  (0.5ms) 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, 17 Dec 2014 06:47:01 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:47:01 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" = 1689 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, 17 Dec 2014 06:47:01 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1689], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:47:01 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" = 1689 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, 17 Dec 2014 06:47:01 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1689], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:47:01 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" = 1689 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, 17 Dec 2014 06:47:01 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1689], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:47:01 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#index as HTML + NotifyUser::BaseNotification Load (0.9ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1689 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 +Completed 200 OK in 60ms (Views: 57.8ms | ActiveRecord: 0.9ms) +  (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, 17 Dec 2014 06:47:01 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:47:01 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" = 1690 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, 17 Dec 2014 06:47:01 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1690], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:47:01 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" = 1690 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, 17 Dec 2014 06:47:01 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1690], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:47:01 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" = 1690 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, 17 Dec 2014 06:47:01 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1690], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:47:01 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#read as HTML + Parameters: {"id"=>"1711"} + NotifyUser::BaseNotification Load (0.8ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1690 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1711') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 +  (0.2ms) SAVEPOINT active_record_1 + User Load (1.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1690]] +  (0.7ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1690 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (1.4ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1711 [["state", "read"], ["updated_at", Wed, 17 Dec 2014 06:47:01 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +Completed 200 OK in 24ms (Views: 2.2ms | ActiveRecord: 4.5ms) + NotifyUser::BaseNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 1711 ORDER BY "notify_user_notifications"."id" ASC 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, 17 Dec 2014 06:47:01 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:47:01 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" = 1691 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, 17 Dec 2014 06:47:01 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1691], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:47:01 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" = 1691 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, 17 Dec 2014 06:47:01 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1691], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:47:01 UTC +00:00]] +  (0.3ms) 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" = 1691 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, 17 Dec 2014 06:47:01 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1691], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:47:01 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#read as HTML + Parameters: {"id"=>"1714"} + NotifyUser::BaseNotification Load (0.8ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1691 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1714') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 +  (0.2ms) SAVEPOINT active_record_1 + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1691]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1691 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" = 1714 [["state", "read"], ["updated_at", Wed, 17 Dec 2014 06:47:01 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Completed 200 OK in 10ms (Views: 0.4ms | ActiveRecord: 3.0ms) +Processing by NotifyUser::NotificationsController#read as HTML + Parameters: {"id"=>"1714"} + NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1691 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1714') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 +Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 3.6ms) +  (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, 17 Dec 2014 06:47:01 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:47:01 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" = 1692 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, 17 Dec 2014 06:47:01 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1692], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:47:01 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" = 1692 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, 17 Dec 2014 06:47:01 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1692], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:47:01 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" = 1692 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, 17 Dec 2014 06:47:01 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1692], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:47:01 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#mark_all as HTML + SQL (1.0ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1692 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.0ms) + NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1692 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('["pending","sent"]')) +  (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, 17 Dec 2014 06:47:01 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:47:01 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" = 1693 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, 17 Dec 2014 06:47:01 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1693], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:47:01 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#mark_read as HTML + Parameters: {"ids"=>["1720"]} + SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1693 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1720')) + NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1693 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1720')) +Completed 200 OK in 5ms (Views: 2.2ms | ActiveRecord: 1.2ms) + NewPostNotification Load (0.8ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1720]] +  (0.3ms) 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, 17 Dec 2014 06:47:01 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:47:01 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" = 1694 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, 17 Dec 2014 06:47:01 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1694], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:47:01 UTC +00:00]] +  (0.4ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#mark_read as HTML + Parameters: {"ids"=>["1721"]} + SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1694 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1721')) + NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1694 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1721')) +Completed 200 OK in 5ms (Views: 2.3ms | ActiveRecord: 1.1ms) +  (0.3ms) ROLLBACK +  (0.1ms) 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, 17 Dec 2014 06:47:01 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:47:01 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" = 1695 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, 17 Dec 2014 06:47:01 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1695], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:47:01 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NotifyUser::Unsubscribe Load (0.7ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1695 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"}]} +  (1.0ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1695 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.3ms) SAVEPOINT active_record_1 + NotifyUser::Unsubscribe Exists (0.9ms) 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" = 1695) LIMIT 1 + SQL (1.4ms) 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, 17 Dec 2014 06:47:01 UTC +00:00], ["target_id", 1695], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:47:01 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1695 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +Completed 200 OK in 29ms (Views: 0.4ms | ActiveRecord: 4.5ms) + NotifyUser::Unsubscribe Load (0.9ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1695 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, 17 Dec 2014 06:47:01 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:47:01 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" = 1696 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (11.3ms) 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, 17 Dec 2014 06:47:01 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1696], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:47:01 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 + NotifyUser::Unsubscribe Load (0.5ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1696 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" = 1696 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" = 1696 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 1.0ms) + NotifyUser::Unsubscribe Load (0.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1696 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (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, 17 Dec 2014 06:47:01 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:47:01 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" = 1697 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, 17 Dec 2014 06:47:01 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1697], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:47:01 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#unsubscribe as HTML + Parameters: {"type"=>"NewPostNotification"} +  (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" = 1697) 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, 17 Dec 2014 06:47:01 UTC +00:00], ["target_id", 1697], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:47:01 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://test.host/notify_user/notifications/unsubscribe +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1697 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +Completed 302 Found in 6ms (ActiveRecord: 1.9ms) + NotifyUser::Unsubscribe Load (0.6ms) 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.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 17 Dec 2014 06:47:01 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:47:01 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" = 1698 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, 17 Dec 2014 06:47:01 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1698], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:47:01 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" = 1698) 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, 17 Dec 2014 06:47:01 UTC +00:00], ["target_id", 1698], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:47:01 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#subscribe as HTML + Parameters: {"type"=>"NewPostNotification"} + NotifyUser::Unsubscribe Load (0.5ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1698 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.6ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 387]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://test.host/notify_user/notifications/unsubscribe +Completed 302 Found in 4ms (ActiveRecord: 1.6ms) + NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" +  (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, 17 Dec 2014 06:47:01 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:47:01 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" = 1699 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, 17 Dec 2014 06:47:01 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1699], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:47:01 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NotifyUser::UserHash Load (1.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1699 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" = 'h4tqiA2L3d0MDxeQ1uKJcw-z1lLLFgexTmCeL6XC9baQ' LIMIT 1 + SQL (1.1ms) 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, 17 Dec 2014 06:47:01 UTC +00:00], ["target_id", 1699], ["target_type", "User"], ["token", "h4tqiA2L3d0MDxeQ1uKJcw-z1lLLFgexTmCeL6XC9baQ"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:47:01 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#unauth_unsubscribe as HTML + Parameters: {"type"=>"NewPostNotification", "token"=>"h4tqiA2L3d0MDxeQ1uKJcw-z1lLLFgexTmCeL6XC9baQ"} + NotifyUser::UserHash Exists (0.6ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'h4tqiA2L3d0MDxeQ1uKJcw-z1lLLFgexTmCeL6XC9baQ' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1 + NotifyUser::UserHash Load (0.8ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'h4tqiA2L3d0MDxeQ1uKJcw-z1lLLFgexTmCeL6XC9baQ' 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", 1699]] +  (0.2ms) SAVEPOINT active_record_1 + NotifyUser::Unsubscribe Exists (0.4ms) 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" = 1699) 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, 17 Dec 2014 06:47:01 UTC +00:00], ["target_id", 1699], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:47:01 UTC +00:00]] +  (0.2ms) 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" = 479 [["active", false], ["updated_at", Wed, 17 Dec 2014 06:47:01 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Completed 200 OK in 11ms (Views: 0.4ms | ActiveRecord: 4.1ms) + NotifyUser::UserHash Load (0.5ms) 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.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.3ms) 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.2ms) ROLLBACK TO 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" 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.2ms) 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 +  (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, 17 Dec 2014 06:47:01 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:47:01 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" = 1700 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, 17 Dec 2014 06:47:01 UTC +00:00], ["state", "pending"], ["target_id", 1700], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:47:01 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1700 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, 17 Dec 2014 06:47:01 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:47:01 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" = 1701 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, 17 Dec 2014 06:47:01 UTC +00:00], ["state", "pending"], ["target_id", 1701], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:47:01 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_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, 17 Dec 2014 06:47:01 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:47:01 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" = 1702 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, 17 Dec 2014 06:47:01 UTC +00:00], ["state", "pending"], ["target_id", 1702], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:47:01 UTC +00:00]] +  (0.3ms) 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, 17 Dec 2014 06:47:01 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:47:01 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" = 1703 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, 17 Dec 2014 06:47:01 UTC +00:00], ["state", "pending"], ["target_id", 1703], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:47:01 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" = 1703 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (1.1ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1730 [["params", {"listing_id"=>1}], ["updated_at", Wed, 17 Dec 2014 06:47:01 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.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, 17 Dec 2014 06:47:01 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:47:01 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" = 1704 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, 17 Dec 2014 06:47:01 UTC +00:00], ["state", "pending"], ["target_id", 1704], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:47:01 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" = 1704 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" = 1731 [["params", {"listing_id"=>1}], ["updated_at", Wed, 17 Dec 2014 06:47:01 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, 17 Dec 2014 06:47:01 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:47:01 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" = 1705 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, 17 Dec 2014 06:47:01 UTC +00:00], ["state", "pending"], ["target_id", 1705], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:47:01 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" = 1705 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" = 1732 [["params", {:listing_id=>1}], ["updated_at", Wed, 17 Dec 2014 06:47:01 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NewPostNotification Load (0.6ms) 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.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 17 Dec 2014 06:47:01 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:47:01 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" = 1706 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, 17 Dec 2014 06:47:01 UTC +00:00], ["state", "pending"], ["target_id", 1706], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:47:01 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" = 1706 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (1.3ms) UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1733 [["params", {:listing_id=>1}], ["updated_at", Wed, 17 Dec 2014 06:47:01 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 + NewPostNotification Load (0.6ms) 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, 17 Dec 2014 06:47:01 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:47:01 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" = 1707 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, 17 Dec 2014 06:47:01 UTC +00:00], ["state", "pending"], ["target_id", 1707], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:47:01 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SAVEPOINT active_record_1 +  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +  (0.2ms) SAVEPOINT active_record_1 + SQL (1.0ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 17 Dec 2014 06:47:01 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:47:01 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" = 1708 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.4ms) 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, 17 Dec 2014 06:47:01 UTC +00:00], ["state", "pending"], ["target_id", 1708], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:47:01 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" = 1708 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" = 1708 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1735) + NotifyUser::BaseNotification Load (0.8ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1735]] + User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1708]] + 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" = 1708 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' +  (0.3ms) SAVEPOINT active_record_1 + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1708]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1708 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (1.1ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1735 [["state", "sent"], ["updated_at", Wed, 17 Dec 2014 06:47:01 UTC +00:00]] +  (0.4ms) RELEASE SAVEPOINT active_record_1 + NotifyUser::BaseNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 1735 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1708]] +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1708 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' + NewPostNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1735 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1708]] +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1708 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns' +  (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, 17 Dec 2014 06:47:01 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:47:01 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" = 1709 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.4ms) 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, 17 Dec 2014 06:47:01 UTC +00:00], ["state", "pending"], ["target_id", 1709], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:47:01 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" = 1709 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" = 1709 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1736) + NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1736]] + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1709]] + 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" = 1709 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' +  (0.2ms) SAVEPOINT active_record_1 + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1709]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1709 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" = 1736 [["state", "sent"], ["updated_at", Wed, 17 Dec 2014 06:47:01 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" = 1736 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1709]] +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1709 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' + NewPostNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1736 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1709]] +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1709 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns' +  (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, 17 Dec 2014 06:47:01 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:47:01 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" = 1710 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.4ms) 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, 17 Dec 2014 06:47:01 UTC +00:00], ["state", "pending"], ["target_id", 1710], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:47:01 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 +  (0.8ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1710 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.3ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) 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" = 1710 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1737) +  (0.2ms) SAVEPOINT active_record_1 +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1710 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, 17 Dec 2014 06:47:01 UTC +00:00], ["state", "pending"], ["target_id", 1710], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:47:01 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) 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" = 1710 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1738) +  (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, 17 Dec 2014 06:47:01 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:47:01 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" = 1711 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, 17 Dec 2014 06:47:01 UTC +00:00], ["state", "pending"], ["target_id", 1711], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:47:01 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" = 1711 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.4ms) 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, 17 Dec 2014 06:47:01 UTC +00:00], ["state", "pending"], ["target_id", 1711], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:47:01 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NewPostNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1740]] + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1711]] + NewPostNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1711 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' +  (0.2ms) SAVEPOINT active_record_1 + User Load (0.6ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1711]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1711 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" = 1739 [["state", "sent"], ["updated_at", Wed, 17 Dec 2014 06:47:01 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SAVEPOINT active_record_1 + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1711]] +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1711 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" = 1740 [["state", "sent"], ["updated_at", Wed, 17 Dec 2014 06:47:01 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1711 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' + NotifyUser::UserHash Load (0.9ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1711 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" = '9B0antfau8-BSiTwcCbkNwLKBNVK1xjlAFpMoi-rQBrw' LIMIT 1 + SQL (0.7ms) 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, 17 Dec 2014 06:47:02 UTC +00:00], ["target_id", 1711], ["target_type", "User"], ["token", "9B0antfau8-BSiTwcCbkNwLKBNVK1xjlAFpMoi-rQBrw"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:47:02 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 + +Sent mail to user@example.com (12.0ms) +Date: Wed, 17 Dec 2014 17:47:02 +1100 +From: please-change-me-at-config-initializers-notify-user@example.com +To: user@example.com +Message-ID: <549126e62e13_da8c3ffa31865be45734@wp.local.mail> +Subject: Rails404: You have new Newpostnotification 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=3D9B0antfau8-BSiTwcCbkNwLKBNVK1xjlAFpMoi-rQBrw&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.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, 17 Dec 2014 06:47:02 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:47:02 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" = 1712 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, 17 Dec 2014 06:47:02 UTC +00:00], ["state", "pending"], ["target_id", 1712], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:47:02 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NewPostNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1741]] + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1712]] + NewPostNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1712 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' +  (0.2ms) SAVEPOINT active_record_1 + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1712]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1712 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" = 1741 [["state", "sent"], ["updated_at", Wed, 17 Dec 2014 06:47:02 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NewPostNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1741 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1712]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1712 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' + NotifyUser::UserHash Load (1.3ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1712 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" = 's6SoiIvLG7LFTXSx4S5Y6ASQFBIUzdjHDYpGf6qynfTw' 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, 17 Dec 2014 06:47:02 UTC +00:00], ["target_id", 1712], ["target_type", "User"], ["token", "s6SoiIvLG7LFTXSx4S5Y6ASQFBIUzdjHDYpGf6qynfTw"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:47:02 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + +Sent mail to user@example.com (5.8ms) +Date: Wed, 17 Dec 2014 17:47:02 +1100 +From: please-change-me-at-config-initializers-notify-user@example.com +To: user@example.com +Message-ID: <549126e6fa48_da8c3ffa31865be457452@wp.local.mail> +Subject: Rails404: You have a new Newpostnotification 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=3Ds6SoiIvLG7LFTXSx4S5Y6ASQFBIUzdjHDYpGf6qynfTw&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" = 1712 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns' +  (0.3ms) 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, 17 Dec 2014 06:47:02 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:47:02 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" = 1713) 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, 17 Dec 2014 06:47:02 UTC +00:00], ["target_id", 1713], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:47:02 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" = 1713 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1 + NotifyUser::BaseNotification Load (0.6ms) 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.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, 17 Dec 2014 06:47:02 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:47:02 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" = 1714 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, 17 Dec 2014 06:47:02 UTC +00:00], ["state", "pending"], ["target_id", 1714], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:47:02 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" = 1742 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1714]] +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1714 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' +  (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, 17 Dec 2014 06:47:02 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:47:02 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" = 1715 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, 17 Dec 2014 06:47:02 UTC +00:00], ["state", "pending"], ["target_id", 1715], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:47:02 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" = 1715 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, 17 Dec 2014 06:47:02 UTC +00:00], ["state", "pending"], ["target_id", 1715], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:47:02 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') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1744]] + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1715]] + NewPostNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1715 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' +  (0.2ms) SAVEPOINT active_record_1 + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1715]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1715 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (1.2ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1743 [["state", "sent"], ["updated_at", Wed, 17 Dec 2014 06:47:02 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", 1715]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1715 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" = 1744 [["state", "sent"], ["updated_at", Wed, 17 Dec 2014 06:47:02 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1715 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" = 1715 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.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '17oDGg-oFin8zTvUTEtZkQ0cRz_3zEhtviUTYyzho9Zg' 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, 17 Dec 2014 06:47:02 UTC +00:00], ["target_id", 1715], ["target_type", "User"], ["token", "17oDGg-oFin8zTvUTEtZkQ0cRz_3zEhtviUTYyzho9Zg"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:47:02 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 + +Sent mail to user@example.com (9.2ms) +Date: Wed, 17 Dec 2014 17:47:02 +1100 +From: please-change-me-at-config-initializers-notify-user@example.com +To: user@example.com +Message-ID: <549126e623fb9_da8c3ffa31865be45758@wp.local.mail> +Subject: Rails404: You have new Newpostnotification 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=3D17oDGg-oFin8zTvUTEtZkQ0cRz_3zEhtviUTYyzho9Zg&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.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 17 Dec 2014 06:47:02 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:47:02 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" = 1716 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, 17 Dec 2014 06:47:02 UTC +00:00], ["state", "pending"], ["target_id", 1716], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:47:02 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') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1745]] + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1716]] + NewPostNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1716 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' +  (0.2ms) SAVEPOINT active_record_1 + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1716]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1716 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" = 1745 [["state", "sent"], ["updated_at", Wed, 17 Dec 2014 06:47:02 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') AND "notify_user_notifications"."id" = 1745 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1716]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1716 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' + NotifyUser::UserHash Load (0.9ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1716 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" = 'AS7Kdj0c5ZBduOcugztF9A4zPqPjgD-xtK8vMfUVY1kg' 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, 17 Dec 2014 06:47:02 UTC +00:00], ["target_id", 1716], ["target_type", "User"], ["token", "AS7Kdj0c5ZBduOcugztF9A4zPqPjgD-xtK8vMfUVY1kg"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:47:02 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 + +Sent mail to user@example.com (5.9ms) +Date: Wed, 17 Dec 2014 17:47:02 +1100 +From: please-change-me-at-config-initializers-notify-user@example.com +To: user@example.com +Message-ID: <549126e62fa51_da8c3ffa31865be4576f9@wp.local.mail> +Subject: Rails404: You have a new Newpostnotification 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=3DAS7Kdj0c5ZBduOcugztF9A4zPqPjgD-xtK8vMfUVY1kg&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.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, 17 Dec 2014 06:47:02 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:47:02 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" = 1717 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, 17 Dec 2014 06:47:02 UTC +00:00], ["state", "pending"], ["target_id", 1717], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:47:02 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" = 1717 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.3ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1717 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.3ms) SAVEPOINT active_record_1 +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1717 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" = 1746 [["state", "sent"], ["updated_at", Wed, 17 Dec 2014 06:47:02 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') AND "notify_user_notifications"."id" = 1746 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1717]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1717 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" = 1717 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns' +  (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, 17 Dec 2014 06:47:02 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:47:02 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" = 1718) 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, 17 Dec 2014 06:47:02 UTC +00:00], ["target_id", 1718], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:47:02 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" = 1718 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1718 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1718 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (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, 17 Dec 2014 06:47:02 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:47:02 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" = 'action_mailer' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1719) LIMIT 1 + SQL (0.4ms) 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, 17 Dec 2014 06:47:02 UTC +00:00], ["target_id", 1719], ["target_type", "User"], ["type", "action_mailer"], ["updated_at", Wed, 17 Dec 2014 06:47:02 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" = 'action_mailer' AND "notify_user_unsubscribes"."id" != 391 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1719) LIMIT 1 +  (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" = 1719 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, 17 Dec 2014 06:47:02 UTC +00:00], ["state", "pending"], ["target_id", 1719], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:47:02 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" = 1719 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.3ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1719 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.2ms) SAVEPOINT active_record_1 +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1719 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" = 1747 [["state", "sent"], ["updated_at", Wed, 17 Dec 2014 06:47:02 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 + NewPostNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1747 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1719]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1719 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" = 1719 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns' +  (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, 17 Dec 2014 06:47:02 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:47:02 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" = 1720 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, 17 Dec 2014 06:47:02 UTC +00:00], ["state", "pending"], ["target_id", 1720], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:47:02 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" = 1720 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" = 't-frXxRgBO8ty9VAjFrBEwfu7HiWf4NGBybylMXJUwjQ' LIMIT 1 + SQL (0.7ms) 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, 17 Dec 2014 06:47:02 UTC +00:00], ["target_id", 1720], ["target_type", "User"], ["token", "t-frXxRgBO8ty9VAjFrBEwfu7HiWf4NGBybylMXJUwjQ"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:47:02 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 17 Dec 2014 06:47:02 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:47:02 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" = 1721 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.4ms) 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, 17 Dec 2014 06:47:02 UTC +00:00], ["state", "pending"], ["target_id", 1721], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:47:02 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NotifyUser::UserHash Load (0.5ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1721 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" = 'TjCewXAotZEPS8E_gTxJvw6vVBGOnCGCy8Ip20CGWMnA' 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, 17 Dec 2014 06:47:02 UTC +00:00], ["target_id", 1721], ["target_type", "User"], ["token", "TjCewXAotZEPS8E_gTxJvw6vVBGOnCGCy8Ip20CGWMnA"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:47:02 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 + NotifyUser::UserHash Load (0.9ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1721 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) 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, 17 Dec 2014 06:47:02 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:47:02 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" = 1722 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (0.4ms) 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, 17 Dec 2014 06:47:02 UTC +00:00], ["state", "pending"], ["target_id", 1722], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:47:02 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NotifyUser::UserHash Load (0.5ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1722 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" = 'V66CuJgt6iQsqUrQptpOJA9Mgb3Jya7YsUNjoBQ2IlHA' 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, 17 Dec 2014 06:47:02 UTC +00:00], ["target_id", 1722], ["target_type", "User"], ["token", "V66CuJgt6iQsqUrQptpOJA9Mgb3Jya7YsUNjoBQ2IlHA"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:47:02 UTC +00:00]] +  (0.2ms) 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" = 486 [["active", false], ["updated_at", Wed, 17 Dec 2014 06:47:02 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" = 1722 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.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'yOXSXp0aq7o5zIXvKUGWZQLew0EArLToWpdYDUi7L4pw' 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, 17 Dec 2014 06:47:02 UTC +00:00], ["target_id", 1722], ["target_type", "User"], ["token", "yOXSXp0aq7o5zIXvKUGWZQLew0EArLToWpdYDUi7L4pw"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:47:02 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_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, 17 Dec 2014 06:47:02 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:47:02 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + NotifyUser::Unsubscribe Exists (0.4ms) 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" = 1723) LIMIT 1 + SQL (0.4ms) 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, 17 Dec 2014 06:47:02 UTC +00:00], ["target_id", 1723], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:47:02 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + NotifyUser::Unsubscribe Exists (0.4ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 392 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1723) 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" = 1723 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, 17 Dec 2014 06:47:02 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:47:02 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" = 1724) 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, 17 Dec 2014 06:47:02 UTC +00:00], ["target_id", 1724], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:47:02 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" != 393 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1724) 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" = 1724 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.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, 17 Dec 2014 06:47:02 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:47:02 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + NotifyUser::Unsubscribe Exists (0.4ms) 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" = 1725) 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, 17 Dec 2014 06:47:02 UTC +00:00], ["target_id", 1725], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:47:02 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"."id" != 394 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1725) LIMIT 1 +  (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" = 1725) LIMIT 1 +  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1 +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1725 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + NotifyUser::Unsubscribe Load (0.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1725 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.4ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 394]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 + NotifyUser::Unsubscribe Load (0.5ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1725 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 (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Wed, 17 Dec 2014 06:47:02 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:47:02 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" = 1726 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, 17 Dec 2014 06:47:02 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1726], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:47:02 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_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, 17 Dec 2014 06:47:02 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:47:02 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + NotifyUser::UserHash Exists (0.7ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'go4fcmmiGQGUPMQ6OLfzRQz1WbPtgLXUaWLPITZM9DOA' LIMIT 1 + SQL (0.7ms) 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, 17 Dec 2014 06:47:02 UTC +00:00], ["target_id", 1727], ["target_type", "User"], ["token", "go4fcmmiGQGUPMQ6OLfzRQz1WbPtgLXUaWLPITZM9DOA"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:47:02 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 +  (0.3ms) 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" = 'go4fcmmiGQGUPMQ6OLfzRQz1WbPtgLXUaWLPITZM9DOA' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1 +  (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, 17 Dec 2014 06:47:02 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:47:02 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_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" = '-iHGGo46USPoLn7ryEgWJQzpn2-2p3imQBtVVjAR6DIQ' LIMIT 1 + SQL (0.4ms) 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, 17 Dec 2014 06:47:02 UTC +00:00], ["target_id", 1728], ["target_type", "User"], ["token", "-iHGGo46USPoLn7ryEgWJQzpn2-2p3imQBtVVjAR6DIQ"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:47:02 UTC +00:00]] +  (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 + SQL (0.7ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 489 [["active", false], ["updated_at", Wed, 17 Dec 2014 06:47:02 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + NotifyUser::UserHash Exists (0.6ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '-iHGGo46USPoLn7ryEgWJQzpn2-2p3imQBtVVjAR6DIQ' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1 +  (0.4ms) 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, 17 Dec 2014 06:47:02 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:47:02 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_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" = '9gEVIdeIpsdFQ1YozN1gWg3dAE-PHvHds758vpFGSbrQ' 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, 17 Dec 2014 06:47:02 UTC +00:00], ["target_id", 1729], ["target_type", "User"], ["token", "9gEVIdeIpsdFQ1YozN1gWg3dAE-PHvHds758vpFGSbrQ"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:47:02 UTC +00:00]] +  (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 + SQL (0.7ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 490 [["active", false], ["updated_at", Wed, 17 Dec 2014 06:47:02 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_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, 17 Dec 2014 06:47:02 UTC +00:00], ["email", "user@example.com"], ["updated_at", Wed, 17 Dec 2014 06:47:02 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" = 'Bw_zp23AS7xFOitfYKWOwQwgNWrP64X8bkNyIexIHjqA' 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, 17 Dec 2014 06:47:02 UTC +00:00], ["target_id", 1730], ["target_type", "User"], ["token", "Bw_zp23AS7xFOitfYKWOwQwgNWrP64X8bkNyIexIHjqA"], ["type", "NewPostNotification"], ["updated_at", Wed, 17 Dec 2014 06:47:02 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN +  (0.3ms) ROLLBACK +  (0.3ms) BEGIN +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN +  (0.3ms) ROLLBACK +  (0.3ms) BEGIN +  (0.3ms) ROLLBACK +  (0.4ms) BEGIN +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +  (0.2ms) ROLLBACK