spec/dummy/rails-4.0.4/log/test.log in notify_user-0.0.24 vs spec/dummy/rails-4.0.4/log/test.log in notify_user-0.0.25

- old
+ new

@@ -30322,5 +30322,3236 @@  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.3ms) ROLLBACK +  (1.1ms) BEGIN +  (0.8ms) SAVEPOINT active_record_1 + SQL (22.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 11 Dec 2014 01:38:23 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:38:23 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.3ms) +Completed 200 OK in 17ms (Views: 13.2ms | ActiveRecord: 0.0ms) +  (0.5ms) 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", Thu, 11 Dec 2014 01:38:23 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:38:23 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SAVEPOINT active_record_1 +  (5.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1248 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (3.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", Thu, 11 Dec 2014 01:38:23 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1248], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:38:23 UTC +00:00]] +  (0.3ms) 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" = 1248 AND "notify_user_notifications"."target_type" = 'User' + NotifyUser::BaseNotification Load (3.3ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1248 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 +Completed 200 OK in 24ms (Views: 12.5ms | ActiveRecord: 4.2ms) +  (0.4ms) 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", Thu, 11 Dec 2014 01:38:23 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:38:23 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" = 1249 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", Thu, 11 Dec 2014 01:38:23 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1249], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:38: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" = 1249 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", Thu, 11 Dec 2014 01:38:23 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1249], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:38: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" = 1249 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", Thu, 11 Dec 2014 01:38:23 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1249], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:38: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" = 1249 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 +Completed 200 OK in 42ms (Views: 40.6ms | ActiveRecord: 0.7ms) +  (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", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:38:24 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" = 1250 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", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1250], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:38: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" = 1250 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", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1250], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:38: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" = 1250 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", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1250], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:38:24 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#read as HTML + Parameters: {"id"=>"1261"} + NotifyUser::BaseNotification Load (1.1ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1250 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1261') 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", 1250]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1250 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (2.6ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1261 [["state", "read"], ["updated_at", Thu, 11 Dec 2014 01:38:24 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +Completed 200 OK in 24ms (Views: 2.0ms | ActiveRecord: 5.6ms) + NotifyUser::BaseNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 1261 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", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:38: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" = 1251 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", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1251], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:38:24 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" = 1251 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", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1251], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:38:24 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" = 1251 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", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1251], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:38:24 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#read as HTML + Parameters: {"id"=>"1264"} + NotifyUser::BaseNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1251 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1264') 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", 1251]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1251 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" = 1264 [["state", "read"], ["updated_at", Thu, 11 Dec 2014 01:38:24 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Completed 200 OK in 8ms (Views: 0.4ms | ActiveRecord: 2.8ms) +Processing by NotifyUser::NotificationsController#read as HTML + Parameters: {"id"=>"1264"} + NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1251 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1264') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 +Completed 200 OK in 2ms (Views: 0.3ms | ActiveRecord: 3.4ms) +  (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", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:38:24 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" = 1252 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", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1252], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:38: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" = 1252 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", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1252], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:38:24 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" = 1252 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", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1252], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:38:24 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" = 1252 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('pending','sent')) +Redirected to http://test.host/notify_user/notifications +Completed 302 Found in 2ms (ActiveRecord: 0.9ms) + NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1252 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", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:38: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" = 1253 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", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1253], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:38:24 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#mark_read as HTML + Parameters: {"ids"=>["1270"]} + SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1253 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1270')) + NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1253 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1270')) +Completed 200 OK in 5ms (Views: 2.3ms | ActiveRecord: 1.1ms) + 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", 1270]] +  (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", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:38: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" = 1254 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", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1254], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:38:24 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#mark_read as HTML + Parameters: {"ids"=>["1271"]} + SQL (0.7ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1254 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1271')) + NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1254 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1271')) +Completed 200 OK in 5ms (Views: 2.5ms | ActiveRecord: 1.3ms) +  (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", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:38: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" = 1255 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", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1255], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:38:24 UTC +00:00]] +  (0.4ms) RELEASE SAVEPOINT active_record_1 + NotifyUser::Unsubscribe Load (0.6ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1255 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" = 1255 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" = 1255) LIMIT 1 + SQL (3.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", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["target_id", 1255], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:38:24 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1255 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +Completed 200 OK in 36ms (Views: 0.3ms | ActiveRecord: 5.4ms) + NotifyUser::Unsubscribe Load (0.5ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1255 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.8ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:38:24 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" = 1256 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", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1256], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:38:24 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" = 1256 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" = 1256 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" = 1256 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +Completed 200 OK in 4ms (Views: 0.5ms | ActiveRecord: 1.1ms) + NotifyUser::Unsubscribe Load (0.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1256 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", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:38: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" = 1257 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", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1257], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:38:24 UTC +00:00]] +  (0.3ms) 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" = 1257) 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", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["target_id", 1257], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:38:24 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://test.host/notify_user/notifications/unsubscribe +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1257 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.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.3ms) SAVEPOINT active_record_1 + SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:38: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" = 1258 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", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1258], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:38: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" = 1258) 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", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["target_id", 1258], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:38:24 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" = 1258 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", 287]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://test.host/notify_user/notifications/unsubscribe +Completed 302 Found in 5ms (ActiveRecord: 1.9ms) + 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.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:38: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" = 1259 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", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1259], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:38:24 UTC +00:00]] +  (0.4ms) RELEASE SAVEPOINT active_record_1 + NotifyUser::UserHash Load (11.0ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1259 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" = 'r9d3tEXxcwUzJBrdZbMY5AeWYR9o8pgqZcPm0M8KRF3g' LIMIT 1 + SQL (2.3ms) 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", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["target_id", 1259], ["target_type", "User"], ["token", "r9d3tEXxcwUzJBrdZbMY5AeWYR9o8pgqZcPm0M8KRF3g"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:38:24 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#unauth_unsubscribe as HTML + Parameters: {"type"=>"NewPostNotification", "token"=>"r9d3tEXxcwUzJBrdZbMY5AeWYR9o8pgqZcPm0M8KRF3g"} + NotifyUser::UserHash Exists (0.6ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'r9d3tEXxcwUzJBrdZbMY5AeWYR9o8pgqZcPm0M8KRF3g' 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" = 'r9d3tEXxcwUzJBrdZbMY5AeWYR9o8pgqZcPm0M8KRF3g' 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", 1259]] +  (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" = 1259) 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", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["target_id", 1259], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:38:24 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" = 350 [["active", false], ["updated_at", Thu, 11 Dec 2014 01:38:24 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Completed 200 OK in 13ms (Views: 0.4ms | ActiveRecord: 4.5ms) + 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.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.9ms) 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 + 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 (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 +  (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.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.3ms) SAVEPOINT active_record_1 +  (0.2ms) ROLLBACK TO 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", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:38: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" = 1260 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", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["state", "pending"], ["target_id", 1260], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:38:24 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.6ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1260 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.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:38: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" = 1261 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", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["state", "pending"], ["target_id", 1261], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:38: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.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:38: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" = 1262 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", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["state", "pending"], ["target_id", 1262], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:38:24 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", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:38: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" = 1263 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", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["state", "pending"], ["target_id", 1263], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:38: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" = 1263 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" = 1280 [["params", {"listing_id"=>1}], ["updated_at", Thu, 11 Dec 2014 01:38:24 UTC +00:00]] +  (0.4ms) 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", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:38:24 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" = 1264 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", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["state", "pending"], ["target_id", 1264], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:38: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" = 1264 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" = 1281 [["params", {"listing_id"=>1}], ["updated_at", Thu, 11 Dec 2014 01:38:24 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", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:38: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" = 1265 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", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["state", "pending"], ["target_id", 1265], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:38: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" = 1265 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" = 1282 [["params", {:listing_id=>1}], ["updated_at", Thu, 11 Dec 2014 01:38: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.2ms) SAVEPOINT active_record_1 + SQL (0.8ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:38: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" = 1266 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", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["state", "pending"], ["target_id", 1266], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:38:24 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" = 1266 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" = 1283 [["params", {:listing_id=>1}], ["updated_at", Thu, 11 Dec 2014 01:38: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.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", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:38:24 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" = 1267 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", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["state", "pending"], ["target_id", 1267], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:38:24 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.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", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:38: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" = 1268 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", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["state", "pending"], ["target_id", 1268], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:38: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" = 1268 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.9ms) 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" = 1268 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1285) + NotifyUser::BaseNotification Load (1.0ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1285]] + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1268]] + 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" = 1268 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", 1268]] +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1268 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" = 1285 [["state", "sent"], ["updated_at", Thu, 11 Dec 2014 01:38:24 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" = 1285 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1268]] +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1268 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" = 1285 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.8ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1268]] +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1268 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.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:38: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" = 1269 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", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["state", "pending"], ["target_id", 1269], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:38:24 UTC +00:00]] +  (0.4ms) 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" = 1269 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" = 1269 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1286) + NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1286]] + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1269]] + 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" = 1269 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", 1269]] +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1269 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" = 1286 [["state", "sent"], ["updated_at", Thu, 11 Dec 2014 01:38: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" = 1286 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1269]] +  (0.7ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1269 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" = 1286 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1269]] +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1269 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", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:38: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" = 1270 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", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["state", "pending"], ["target_id", 1270], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:38: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" = 1270 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" = 1270 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1287) +  (0.2ms) SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1270 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", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["state", "pending"], ["target_id", 1270], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:38:24 UTC +00:00]] +  (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" = 1270 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1288) +  (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", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:38:24 UTC +00:00]] +  (0.1ms) 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" = 1271 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", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["state", "pending"], ["target_id", 1271], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:38: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" = 1271 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", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["state", "pending"], ["target_id", 1271], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:38: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" = $1 LIMIT 1 [["id", 1290]] + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1271]] + 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" = 1271 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", 1271]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1271 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" = 1289 [["state", "sent"], ["updated_at", Thu, 11 Dec 2014 01:38: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", 1271]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1271 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" = 1290 [["state", "sent"], ["updated_at", Thu, 11 Dec 2014 01:38: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" = 1271 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" = 1271 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" = 'ZLepSvYwZpDG4hKywa1HXQylFUB5aAI92ET6pmk6lLTw' 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", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["target_id", 1271], ["target_type", "User"], ["token", "ZLepSvYwZpDG4hKywa1HXQylFUB5aAI92ET6pmk6lLTw"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:38:24 UTC +00:00]] +  (0.4ms) RELEASE SAVEPOINT active_record_1 + +Sent mail to user@example.com (15.5ms) +Date: Thu, 11 Dec 2014 12:38:24 +1100 +From: please-change-me-at-config-initializers-notify-user@example.com +To: user@example.com +Message-ID: <5488f590ade1a_cf913fcda5865be8805a@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=3DZLepSvYwZpDG4hKywa1HXQylFUB5aAI92ET6pmk6lLTw&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", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:38: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" = 1272 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", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["state", "pending"], ["target_id", 1272], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:38:24 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", 1291]] + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1272]] + 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" = 1272 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", 1272]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1272 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" = 1291 [["state", "sent"], ["updated_at", Thu, 11 Dec 2014 01:38:24 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" = 1291 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1272]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1272 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" = 1272 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" = 'lUgYUSTLalKvxuHpmQetkwXGMuUEP03kfkoxQXbr3cQg' 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", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["target_id", 1272], ["target_type", "User"], ["token", "lUgYUSTLalKvxuHpmQetkwXGMuUEP03kfkoxQXbr3cQg"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:38:24 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + +Sent mail to user@example.com (7.0ms) +Date: Thu, 11 Dec 2014 12:38:24 +1100 +From: please-change-me-at-config-initializers-notify-user@example.com +To: user@example.com +Message-ID: <5488f590bace6_cf913fcda5865be88062e@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=3DlUgYUSTLalKvxuHpmQetkwXGMuUEP03kfkoxQXbr3cQg&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" = 1272 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns' +  (0.2ms) ROLLBACK +  (0.3ms) BEGIN +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:38:24 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) SAVEPOINT active_record_1 + NotifyUser::Unsubscribe Exists (0.5ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1273) 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", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["target_id", 1273], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:38: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" = 1273 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", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:38: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" = 1274 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", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["state", "pending"], ["target_id", 1274], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:38:24 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" = 1292 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1274]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1274 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' +  (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", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:38: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" = 1275 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", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["state", "pending"], ["target_id", 1275], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:38: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" = 1275 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", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["state", "pending"], ["target_id", 1275], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:38:24 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", 1294]] + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1275]] + 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" = 1275 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", 1275]] +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1275 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" = 1293 [["state", "sent"], ["updated_at", Thu, 11 Dec 2014 01:38:24 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + User Load (0.8ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1275]] +  (0.7ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1275 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" = 1294 [["state", "sent"], ["updated_at", Thu, 11 Dec 2014 01:38:24 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1275 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" = 1275 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" = 'xHixiDGSVtQaz_xL6b1YGwqcIBaHODdM4y6MPIkGv7uA' 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", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["target_id", 1275], ["target_type", "User"], ["token", "xHixiDGSVtQaz_xL6b1YGwqcIBaHODdM4y6MPIkGv7uA"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:38:24 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 + +Sent mail to user@example.com (5.7ms) +Date: Thu, 11 Dec 2014 12:38:24 +1100 +From: please-change-me-at-config-initializers-notify-user@example.com +To: user@example.com +Message-ID: <5488f590d0ef6_cf913fcda5865be88073@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=3DxHixiDGSVtQaz_xL6b1YGwqcIBaHODdM4y6MPIkGv7uA&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", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:38: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" = 1276 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", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["state", "pending"], ["target_id", 1276], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:38:24 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", 1295]] + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1276]] + 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" = 1276 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", 1276]] +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1276 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" = 1295 [["state", "sent"], ["updated_at", Thu, 11 Dec 2014 01:38:24 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" = 1295 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1276]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1276 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" = 1276 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" = 'rJ5_beQrEuR7NJb6c8ExEwRuQEzIok_nYuAYQYjRbvCA' 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", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["target_id", 1276], ["target_type", "User"], ["token", "rJ5_beQrEuR7NJb6c8ExEwRuQEzIok_nYuAYQYjRbvCA"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:38:24 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + +Sent mail to user@example.com (5.8ms) +Date: Thu, 11 Dec 2014 12:38:24 +1100 +From: please-change-me-at-config-initializers-notify-user@example.com +To: user@example.com +Message-ID: <5488f590db14b_cf913fcda5865be880834@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=3DrJ5_beQrEuR7NJb6c8ExEwRuQEzIok_nYuAYQYjRbvCA&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", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:38: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" = 1277 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", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["state", "pending"], ["target_id", 1277], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:38:24 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SAVEPOINT active_record_1 +  (0.8ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1277 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" = 1277 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" = 1277 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" = 1296 [["state", "sent"], ["updated_at", Thu, 11 Dec 2014 01:38:24 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" = 1296 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1277]] +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1277 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" = 1277 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", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:38: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" = 1278) 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", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["target_id", 1278], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:38: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" = 1278 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" = 1278 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1278 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", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:38: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"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1279) 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", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["target_id", 1279], ["target_type", "User"], ["type", "action_mailer"], ["updated_at", Thu, 11 Dec 2014 01:38: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" != 291 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1279) LIMIT 1 +  (0.3ms) 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" = 1279 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", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["state", "pending"], ["target_id", 1279], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:38: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" = 1279 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" = 1279 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" = 1279 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" = 1297 [["state", "sent"], ["updated_at", Thu, 11 Dec 2014 01:38: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" = 1297 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1279]] +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1279 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" = 1279 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns' +  (0.2ms) ROLLBACK +  (0.3ms) BEGIN +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.9ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:38: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" = 1280 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", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["state", "pending"], ["target_id", 1280], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:38: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" = 1280 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" = '3ynOc0_mCKF6-vu5_mZ1Ag7vEVH3BVTkRI79F4RTQPYQ' 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", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["target_id", 1280], ["target_type", "User"], ["token", "3ynOc0_mCKF6-vu5_mZ1Ag7vEVH3BVTkRI79F4RTQPYQ"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:38: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.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 11 Dec 2014 01:38:24 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:38: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" = 1281 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", Thu, 11 Dec 2014 01:38:25 UTC +00:00], ["state", "pending"], ["target_id", 1281], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:38:25 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" = 1281 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" = 'WWI-Vvz0ecF68iDQ480vGQnTOekyrxcqIAzXY7FyPM6A' 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", Thu, 11 Dec 2014 01:38:25 UTC +00:00], ["target_id", 1281], ["target_type", "User"], ["token", "WWI-Vvz0ecF68iDQ480vGQnTOekyrxcqIAzXY7FyPM6A"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:38:25 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" = 1281 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.9ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 11 Dec 2014 01:38:25 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:38:25 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" = 1282 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", Thu, 11 Dec 2014 01:38:25 UTC +00:00], ["state", "pending"], ["target_id", 1282], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:38:25 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" = 1282 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" = '0YhLhaYAWDc8YNnRmkgrOw-EpxwsR9_Vokpkl0pBRZow' 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", Thu, 11 Dec 2014 01:38:25 UTC +00:00], ["target_id", 1282], ["target_type", "User"], ["token", "0YhLhaYAWDc8YNnRmkgrOw-EpxwsR9_Vokpkl0pBRZow"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:38:25 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" = 357 [["active", false], ["updated_at", Thu, 11 Dec 2014 01:38:25 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" = 1282 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" = 'tfOuzqatfJ6MJhiTg6h2ngRFH1mByKiMrMhb2yMlg4qg' 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", Thu, 11 Dec 2014 01:38:25 UTC +00:00], ["target_id", 1282], ["target_type", "User"], ["token", "tfOuzqatfJ6MJhiTg6h2ngRFH1mByKiMrMhb2yMlg4qg"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:38:25 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", Thu, 11 Dec 2014 01:38:25 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:38:25 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" = 1283) 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", Thu, 11 Dec 2014 01:38:25 UTC +00:00], ["target_id", 1283], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:38:25 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" != 292 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1283) 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" = 1283 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.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 11 Dec 2014 01:38:25 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:38:25 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" = 1284) 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", Thu, 11 Dec 2014 01:38:25 UTC +00:00], ["target_id", 1284], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:38:25 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" != 293 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1284) 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" = 1284 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.8ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 11 Dec 2014 01:38:25 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:38:25 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" = 1285) 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", Thu, 11 Dec 2014 01:38:25 UTC +00:00], ["target_id", 1285], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:38:25 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" != 294 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1285) 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" = 1285) LIMIT 1 +  (0.4ms) ROLLBACK TO SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1285 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + NotifyUser::Unsubscribe Load (0.8ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1285 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.3ms) SAVEPOINT active_record_1 + SQL (0.5ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 294]] +  (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" = 1285 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.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 11 Dec 2014 01:38:25 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:38:25 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" = 1286 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", Thu, 11 Dec 2014 01:38:25 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1286], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:38:25 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", Thu, 11 Dec 2014 01:38:25 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:38:25 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" = 'Vmay6rDx_uW5ZKKfLP_f9gvD_GjsD6AIPMi3omC_KKlQ' 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", Thu, 11 Dec 2014 01:38:25 UTC +00:00], ["target_id", 1287], ["target_type", "User"], ["token", "Vmay6rDx_uW5ZKKfLP_f9gvD_GjsD6AIPMi3omC_KKlQ"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:38:25 UTC +00:00]] +  (0.4ms) 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" = 'Vmay6rDx_uW5ZKKfLP_f9gvD_GjsD6AIPMi3omC_KKlQ' 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", Thu, 11 Dec 2014 01:38:25 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:38:25 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" = 'LVhpgruv-U1Ze-zJaNKieggOSxhaTzwK2tVX21O5F_NQ' 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", Thu, 11 Dec 2014 01:38:25 UTC +00:00], ["target_id", 1288], ["target_type", "User"], ["token", "LVhpgruv-U1Ze-zJaNKieggOSxhaTzwK2tVX21O5F_NQ"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:38:25 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" = 360 [["active", false], ["updated_at", Thu, 11 Dec 2014 01:38:25 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" = 'LVhpgruv-U1Ze-zJaNKieggOSxhaTzwK2tVX21O5F_NQ' 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.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 11 Dec 2014 01:38:25 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:38:25 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" = 'WavCmpddVddvCHpRPUpJAgSF0cYJ5wWpq_y0ny9DCILw' 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", Thu, 11 Dec 2014 01:38:25 UTC +00:00], ["target_id", 1289], ["target_type", "User"], ["token", "WavCmpddVddvCHpRPUpJAgSF0cYJ5wWpq_y0ny9DCILw"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:38:25 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 +  (0.3ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + SQL (1.3ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 361 [["active", false], ["updated_at", Thu, 11 Dec 2014 01:38:25 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_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", Thu, 11 Dec 2014 01:38:25 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:38:25 UTC +00:00]] +  (0.1ms) 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" = 'PW6v1sPCHiRhPW29HOMC_AlqaCVKvjAtqHUsr1cI1YfA' 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", Thu, 11 Dec 2014 01:38:25 UTC +00:00], ["target_id", 1290], ["target_type", "User"], ["token", "PW6v1sPCHiRhPW29HOMC_AlqaCVKvjAtqHUsr1cI1YfA"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:38:25 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) ROLLBACK +  (0.2ms) BEGIN +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +  (0.3ms) SAVEPOINT active_record_1 + SQL (6.7ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 11 Dec 2014 01:43:12 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43:12 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.5ms) +Completed 200 OK in 19ms (Views: 14.4ms | 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", Thu, 11 Dec 2014 01:43:12 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43:12 UTC +00:00]] +  (0.3ms) 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" = 1292 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (2.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", Thu, 11 Dec 2014 01:43:12 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1292], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:12 UTC +00:00]] +  (0.2ms) 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" = 1292 AND "notify_user_notifications"."target_type" = 'User' + NotifyUser::BaseNotification Load (1.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1292 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 +Completed 200 OK in 24ms (Views: 13.7ms | ActiveRecord: 2.7ms) +  (0.4ms) 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", Thu, 11 Dec 2014 01:43:12 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43:12 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" = 1293 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", Thu, 11 Dec 2014 01:43:12 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1293], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:12 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" = 1293 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", Thu, 11 Dec 2014 01:43:12 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1293], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:12 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" = 1293 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", Thu, 11 Dec 2014 01:43:12 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1293], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:12 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" = 1293 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 +Completed 200 OK in 63ms (Views: 60.8ms | 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", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43: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" = 1294 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", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1294], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43: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" = 1294 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", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1294], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43: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" = 1294 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", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1294], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:13 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#read as HTML + Parameters: {"id"=>"1306"} + NotifyUser::BaseNotification Load (0.9ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1294 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1306') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 +  (0.2ms) SAVEPOINT active_record_1 + User Load (0.8ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1294]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1294 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" = 1306 [["state", "read"], ["updated_at", Thu, 11 Dec 2014 01:43:13 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +Completed 200 OK in 22ms (Views: 1.9ms | ActiveRecord: 4.0ms) + NotifyUser::BaseNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 1306 ORDER BY "notify_user_notifications"."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", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43: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" = 1295 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", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1295], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43: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" = 1295 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", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1295], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43: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" = 1295 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", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1295], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:13 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#read as HTML + Parameters: {"id"=>"1309"} + NotifyUser::BaseNotification Load (0.9ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1295 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1309') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 +  (0.3ms) SAVEPOINT active_record_1 + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1295]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1295 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" = 1309 [["state", "read"], ["updated_at", Thu, 11 Dec 2014 01:43:13 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Completed 200 OK in 9ms (Views: 0.4ms | ActiveRecord: 3.1ms) +Processing by NotifyUser::NotificationsController#read as HTML + Parameters: {"id"=>"1309"} + NotifyUser::BaseNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1295 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1309') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 +Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 3.8ms) +  (0.2ms) 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", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43: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" = 1296 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", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1296], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43: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" = 1296 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", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1296], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43: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" = 1296 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", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1296], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43: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" = 1296 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.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1296 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('["pending","sent"]')) +  (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", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43: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" = 1297 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", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1297], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:13 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#mark_read as HTML + Parameters: {"ids"=>["1315"]} + SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1297 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1315')) + NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1297 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1315')) +Completed 200 OK in 5ms (Views: 2.3ms | ActiveRecord: 1.1ms) + 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", 1315]] +  (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", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43: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" = 1298 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", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1298], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:13 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#mark_read as HTML + Parameters: {"ids"=>["1316"]} + SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1298 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1316')) + NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1298 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1316')) +Completed 200 OK in 5ms (Views: 2.1ms | 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", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43: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" = 1299 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", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1299], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:13 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" = 1299 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" = 1299 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.3ms) 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" = 1299) 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", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["target_id", 1299], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:13 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +  (0.7ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1299 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +Completed 200 OK in 35ms (Views: 0.4ms | ActiveRecord: 3.8ms) + NotifyUser::Unsubscribe Load (0.6ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1299 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", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43: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" = 1300 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", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1300], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43: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" = 1300 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" = 1300 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" = 1300 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" = 1300 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", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43: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" = 1301 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", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1301], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:13 UTC +00:00]] +  (0.3ms) 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.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" = 1301) 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", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["target_id", 1301], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:13 UTC +00:00]] +  (0.3ms) 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" = 1301 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +Completed 302 Found in 8ms (ActiveRecord: 2.3ms) + 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.3ms) SAVEPOINT active_record_1 + SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43:13 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SAVEPOINT active_record_1 +  (1.2ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1302 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", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1302], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:13 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" = 1302) 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", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["target_id", 1302], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:13 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" = 1302 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.7ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 297]] +  (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.6ms) 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", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43: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" = 1303 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", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1303], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43: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" = 1303 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" = '-1EMK1Ko3uNabZ_MXBjnSg615GVSChomX9zhTqmq-V1w' 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", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["target_id", 1303], ["target_type", "User"], ["token", "-1EMK1Ko3uNabZ_MXBjnSg615GVSChomX9zhTqmq-V1w"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:13 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#unauth_unsubscribe as HTML + Parameters: {"type"=>"NewPostNotification", "token"=>"-1EMK1Ko3uNabZ_MXBjnSg615GVSChomX9zhTqmq-V1w"} + NotifyUser::UserHash Exists (0.7ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '-1EMK1Ko3uNabZ_MXBjnSg615GVSChomX9zhTqmq-V1w' 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" = '-1EMK1Ko3uNabZ_MXBjnSg615GVSChomX9zhTqmq-V1w' 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", 1303]] +  (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" = 1303) 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", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["target_id", 1303], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43: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" = 363 [["active", false], ["updated_at", Thu, 11 Dec 2014 01:43:13 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Completed 200 OK in 17ms (Views: 0.7ms | ActiveRecord: 5.5ms) + 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.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.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.3ms) 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.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.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.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.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.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43: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" = 1304 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", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["state", "pending"], ["target_id", 1304], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:13 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1304 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.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43: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" = 1305 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", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["state", "pending"], ["target_id", 1305], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:13 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", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43: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" = 1306 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", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["state", "pending"], ["target_id", 1306], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43: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.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43: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" = 1307 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", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["state", "pending"], ["target_id", 1307], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43: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" = 1307 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" = 1325 [["params", {"listing_id"=>1}], ["updated_at", Thu, 11 Dec 2014 01:43: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.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", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43: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" = 1308 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", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["state", "pending"], ["target_id", 1308], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43: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" = 1308 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" = 1326 [["params", {"listing_id"=>1}], ["updated_at", Thu, 11 Dec 2014 01:43: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.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", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43: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" = 1309 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", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["state", "pending"], ["target_id", 1309], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43: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" = 1309 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" = 1327 [["params", {:listing_id=>1}], ["updated_at", Thu, 11 Dec 2014 01:43: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.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", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43: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" = 1310 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", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["state", "pending"], ["target_id", 1310], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43: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" = 1310 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" = 1328 [["params", {:listing_id=>1}], ["updated_at", Thu, 11 Dec 2014 01:43: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') 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", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43: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" = 1311 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", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["state", "pending"], ["target_id", 1311], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:13 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.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", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43: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" = 1312 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", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["state", "pending"], ["target_id", 1312], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43: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" = 1312 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" = 1312 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1330) + NotifyUser::BaseNotification Load (0.8ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1330]] + User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1312]] + 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" = 1312 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", 1312]] +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1312 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" = 1330 [["state", "sent"], ["updated_at", Thu, 11 Dec 2014 01:43:13 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" = 1330 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1312]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1312 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" = 1330 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1312]] +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1312 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", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43: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" = 1313 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", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["state", "pending"], ["target_id", 1313], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43: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" = 1313 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" = 1313 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1331) + NotifyUser::BaseNotification Load (0.8ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1331]] + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1313]] + 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" = 1313 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", 1313]] +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1313 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" = 1331 [["state", "sent"], ["updated_at", Thu, 11 Dec 2014 01:43:13 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 + NotifyUser::BaseNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 1331 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1313]] +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1313 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' + NewPostNotification Load (0.8ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1331 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1313]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1313 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns' +  (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", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43: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" = 1314 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", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["state", "pending"], ["target_id", 1314], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43: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" = 1314 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" = 1314 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1332) +  (0.3ms) SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1314 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", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["state", "pending"], ["target_id", 1314], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:13 UTC +00:00]] +  (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" = 1314 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1333) +  (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", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43: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" = 1315 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", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["state", "pending"], ["target_id", 1315], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43: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" = 1315 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", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["state", "pending"], ["target_id", 1315], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43: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') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1335]] + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1315]] + 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" = 1315 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", 1315]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1315 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" = 1334 [["state", "sent"], ["updated_at", Thu, 11 Dec 2014 01:43:13 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) SAVEPOINT active_record_1 + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1315]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1315 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" = 1335 [["state", "sent"], ["updated_at", Thu, 11 Dec 2014 01:43:13 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +  (1.0ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1315 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" = 1315 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 (1.1ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'C40_iSsnVw_hAaJa4q-pUgGEcRGKw5uaBCqzi59YowOA' 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", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["target_id", 1315], ["target_type", "User"], ["token", "C40_iSsnVw_hAaJa4q-pUgGEcRGKw5uaBCqzi59YowOA"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:13 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + +Sent mail to user@example.com (8.3ms) +Date: Thu, 11 Dec 2014 12:43:13 +1100 +From: please-change-me-at-config-initializers-notify-user@example.com +To: user@example.com +Message-ID: <5488f6b1b07c6_d0a63fdfa1059be4998@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=3DC40_iSsnVw_hAaJa4q-pUgGEcRGKw5uaBCqzi59YowOA&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.3ms) SAVEPOINT active_record_1 + SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43: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" = 1316 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", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["state", "pending"], ["target_id", 1316], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43: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", 1336]] + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1316]] + 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" = 1316 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", 1316]] +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1316 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" = 1336 [["state", "sent"], ["updated_at", Thu, 11 Dec 2014 01:43: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') AND "notify_user_notifications"."id" = 1336 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1316]] +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1316 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" = 1316 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" = 'q5AKX6Vp1uIM8Xwh9UAfMwmrpQV8HEVsuajqgddAHZvA' 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", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["target_id", 1316], ["target_type", "User"], ["token", "q5AKX6Vp1uIM8Xwh9UAfMwmrpQV8HEVsuajqgddAHZvA"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:13 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + +Sent mail to user@example.com (5.3ms) +Date: Thu, 11 Dec 2014 12:43:13 +1100 +From: please-change-me-at-config-initializers-notify-user@example.com +To: user@example.com +Message-ID: <5488f6b1bc028_d0a63fdfa1059be4100e7@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=3Dq5AKX6Vp1uIM8Xwh9UAfMwmrpQV8HEVsuajqgddAHZvA&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" = 1316 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", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43:13 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" = 1317) 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", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["target_id", 1317], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43: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" = 1317 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.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", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43: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" = 1318 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", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["state", "pending"], ["target_id", 1318], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43: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" = 1337 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1318]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1318 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.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43: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" = 1319 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", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["state", "pending"], ["target_id", 1319], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43: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" = 1319 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", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["state", "pending"], ["target_id", 1319], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43: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') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1339]] + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1319]] + 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" = 1319 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", 1319]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1319 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" = 1338 [["state", "sent"], ["updated_at", Thu, 11 Dec 2014 01:43:13 UTC +00:00]] +  (0.3ms) 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", 1319]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1319 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" = 1339 [["state", "sent"], ["updated_at", Thu, 11 Dec 2014 01:43:13 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1319 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" = 1319 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" = 'ijN70Pr8X0-aTP3llca7jg62BOqTjYpbwZbSFNP4kokQ' 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", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["target_id", 1319], ["target_type", "User"], ["token", "ijN70Pr8X0-aTP3llca7jg62BOqTjYpbwZbSFNP4kokQ"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:13 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + +Sent mail to user@example.com (9.0ms) +Date: Thu, 11 Dec 2014 12:43:13 +1100 +From: please-change-me-at-config-initializers-notify-user@example.com +To: user@example.com +Message-ID: <5488f6b1cea2d_d0a63fdfa1059be41014@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=3DijN70Pr8X0-aTP3llca7jg62BOqTjYpbwZbSFNP4kokQ&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.3ms) SAVEPOINT active_record_1 + SQL (0.8ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43: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" = 1320 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", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["state", "pending"], ["target_id", 1320], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43: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') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1340]] + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1320]] + 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" = 1320 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", 1320]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1320 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" = 1340 [["state", "sent"], ["updated_at", Thu, 11 Dec 2014 01:43: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') AND "notify_user_notifications"."id" = 1340 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1320]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1320 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" = 1320 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" = '0SwOsSR_n36a-qgqgjdT1wGBZvOwPKZ-mAEiB_3bJuNw' 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", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["target_id", 1320], ["target_type", "User"], ["token", "0SwOsSR_n36a-qgqgjdT1wGBZvOwPKZ-mAEiB_3bJuNw"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:13 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + +Sent mail to user@example.com (6.2ms) +Date: Thu, 11 Dec 2014 12:43:13 +1100 +From: please-change-me-at-config-initializers-notify-user@example.com +To: user@example.com +Message-ID: <5488f6b1da174_d0a63fdfa1059be4102a2@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=3D0SwOsSR_n36a-qgqgjdT1wGBZvOwPKZ-mAEiB_3bJuNw&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", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43: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" = 1321 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", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["state", "pending"], ["target_id", 1321], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43: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" = 1321 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_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1321 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" = 1321 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" = 1341 [["state", "sent"], ["updated_at", Thu, 11 Dec 2014 01:43: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') AND "notify_user_notifications"."id" = 1341 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1321]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1321 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" = 1321 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", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43:13 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" = 1322) 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", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["target_id", 1322], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43: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" = 1322 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" = 1322 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1322 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", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43:13 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" = 'action_mailer' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1323) 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", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["target_id", 1323], ["target_type", "User"], ["type", "action_mailer"], ["updated_at", Thu, 11 Dec 2014 01:43:13 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" != 301 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1323) 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" = 1323 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", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["state", "pending"], ["target_id", 1323], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43: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" = 1323 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" = 1323 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" = 1323 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" = 1342 [["state", "sent"], ["updated_at", Thu, 11 Dec 2014 01:43:13 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" = 1342 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1323]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1323 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" = 1323 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns' +  (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", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43: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" = 1324 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", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["state", "pending"], ["target_id", 1324], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:13 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" = 1324 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" = 'qGPim1bdAxD2nyg9phw2UQWYNirOPRe5AXrNAl0dO7UQ' 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", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["target_id", 1324], ["target_type", "User"], ["token", "qGPim1bdAxD2nyg9phw2UQWYNirOPRe5AXrNAl0dO7UQ"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:13 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", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43:13 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" = 1325 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", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["state", "pending"], ["target_id", 1325], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:13 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" = 1325 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" = '4vUCX_kq6HY0vPPiPaSWeARdGbqkFAOXBz_Yz4Q6JnOw' 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", Thu, 11 Dec 2014 01:43:13 UTC +00:00], ["target_id", 1325], ["target_type", "User"], ["token", "4vUCX_kq6HY0vPPiPaSWeARdGbqkFAOXBz_Yz4Q6JnOw"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:13 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" = 1325 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", Thu, 11 Dec 2014 01:43:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43: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" = 1326 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", Thu, 11 Dec 2014 01:43:14 UTC +00:00], ["state", "pending"], ["target_id", 1326], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43: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" = 1326 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" = 'RdzZzmjz9V_Wvfu5Aq_v_AyxeCwoVWonqeW7VFroErtg' 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", Thu, 11 Dec 2014 01:43:14 UTC +00:00], ["target_id", 1326], ["target_type", "User"], ["token", "RdzZzmjz9V_Wvfu5Aq_v_AyxeCwoVWonqeW7VFroErtg"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:14 UTC +00:00]] +  (0.2ms) 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" = 370 [["active", false], ["updated_at", Thu, 11 Dec 2014 01:43:14 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" = 1326 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" = 'JlVs309BxJ59o_tZWZBaDAwUOrn_aEg-1n3NwF41_GCA' 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", Thu, 11 Dec 2014 01:43:14 UTC +00:00], ["target_id", 1326], ["target_type", "User"], ["token", "JlVs309BxJ59o_tZWZBaDAwUOrn_aEg-1n3NwF41_GCA"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:14 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +  (0.4ms) SAVEPOINT active_record_1 + SQL (0.8ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 11 Dec 2014 01:43:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43: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" = 1327) 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", Thu, 11 Dec 2014 01:43:14 UTC +00:00], ["target_id", 1327], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43: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"."id" != 302 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1327) 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" = 1327 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", Thu, 11 Dec 2014 01:43:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43: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" = 1328) 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", Thu, 11 Dec 2014 01:43:14 UTC +00:00], ["target_id", 1328], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43: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"."id" != 303 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1328) LIMIT 1 +  (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" = 1328 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", Thu, 11 Dec 2014 01:43:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43: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" = 1329) 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", Thu, 11 Dec 2014 01:43:14 UTC +00:00], ["target_id", 1329], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43: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"."id" != 304 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1329) 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" = 1329) LIMIT 1 +  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1329 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" = 1329 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", 304]] +  (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" = 1329 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", Thu, 11 Dec 2014 01:43:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43:14 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 +  (1.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1330 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", Thu, 11 Dec 2014 01:43:14 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1330], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:14 UTC +00:00]] +  (0.8ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) ROLLBACK +  (0.3ms) BEGIN +  (1.0ms) SAVEPOINT active_record_1 + SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 11 Dec 2014 01:43:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43:14 UTC +00:00]] +  (0.3ms) 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" = 'EctIRLJtozQRItF_l-MHjgjOMddbRmq81Gj8stSn6lLg' 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", Thu, 11 Dec 2014 01:43:14 UTC +00:00], ["target_id", 1331], ["target_type", "User"], ["token", "EctIRLJtozQRItF_l-MHjgjOMddbRmq81Gj8stSn6lLg"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:14 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) 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" = 'EctIRLJtozQRItF_l-MHjgjOMddbRmq81Gj8stSn6lLg' 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", Thu, 11 Dec 2014 01:43:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43:14 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) SAVEPOINT active_record_1 + NotifyUser::UserHash Exists (0.6ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'itxtNRzGkurlewO27CkCcg0XUtCkjLfTLQOKkIhMDGRQ' 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", Thu, 11 Dec 2014 01:43:14 UTC +00:00], ["target_id", 1332], ["target_type", "User"], ["token", "itxtNRzGkurlewO27CkCcg0XUtCkjLfTLQOKkIhMDGRQ"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43: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.8ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 373 [["active", false], ["updated_at", Thu, 11 Dec 2014 01:43: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" = 'itxtNRzGkurlewO27CkCcg0XUtCkjLfTLQOKkIhMDGRQ' 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", Thu, 11 Dec 2014 01:43:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43:14 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_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" = '9gigJf6Udle2JcMcV4ENdQDY1VdnyNUXk0h_nxKocrIw' 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", Thu, 11 Dec 2014 01:43:14 UTC +00:00], ["target_id", 1333], ["target_type", "User"], ["token", "9gigJf6Udle2JcMcV4ENdQDY1VdnyNUXk0h_nxKocrIw"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:14 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SAVEPOINT active_record_1 +  (0.3ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SAVEPOINT active_record_1 + SQL (1.3ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 374 [["active", false], ["updated_at", Thu, 11 Dec 2014 01:43: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.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 11 Dec 2014 01:43:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43:14 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + NotifyUser::UserHash Exists (1.6ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'krIK9O69xZ7xw6pN5zUUjgAueWv1eTixgoGRpcbCnFNw' LIMIT 1 + SQL (10.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", Thu, 11 Dec 2014 01:43:14 UTC +00:00], ["target_id", 1334], ["target_type", "User"], ["token", "krIK9O69xZ7xw6pN5zUUjgAueWv1eTixgoGRpcbCnFNw"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:14 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) SAVEPOINT active_record_1 +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.5ms) ROLLBACK +  (0.2ms) BEGIN +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +  (0.5ms) ROLLBACK +  (0.3ms) BEGIN +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +  (0.1ms) ROLLBACK +  (0.2ms) BEGIN +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +  (0.2ms) ROLLBACK +  (0.1ms) BEGIN +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +  (0.4ms) SAVEPOINT active_record_1 + SQL (14.9ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 11 Dec 2014 01:43:41 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43:41 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 11ms (Views: 8.1ms | 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", Thu, 11 Dec 2014 01:43:41 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43:41 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SAVEPOINT active_record_1 +  (1.8ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1336 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", Thu, 11 Dec 2014 01:43:41 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1336], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:41 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" = 1336 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" = 1336 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 +Completed 200 OK in 19ms (Views: 9.9ms | ActiveRecord: 2.1ms) +  (0.4ms) 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", Thu, 11 Dec 2014 01:43:41 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43:41 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" = 1337 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", Thu, 11 Dec 2014 01:43:41 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1337], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:41 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" = 1337 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", Thu, 11 Dec 2014 01:43:41 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1337], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:41 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" = 1337 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", Thu, 11 Dec 2014 01:43:41 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1337], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:41 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" = 1337 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 +Completed 200 OK in 30ms (Views: 27.9ms | ActiveRecord: 0.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", Thu, 11 Dec 2014 01:43:41 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43:41 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" = 1338 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", Thu, 11 Dec 2014 01:43:41 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1338], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:41 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" = 1338 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", Thu, 11 Dec 2014 01:43:41 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1338], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:41 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" = 1338 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", Thu, 11 Dec 2014 01:43:41 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1338], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:41 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#read as HTML + Parameters: {"id"=>"1351"} + NotifyUser::BaseNotification Load (0.9ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1338 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1351') 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", 1338]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1338 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" = 1351 [["state", "read"], ["updated_at", Thu, 11 Dec 2014 01:43:41 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +Completed 200 OK in 19ms (Views: 1.4ms | ActiveRecord: 4.0ms) + NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 1351 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 +  (0.5ms) 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", Thu, 11 Dec 2014 01:43:41 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43:41 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" = 1339 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", Thu, 11 Dec 2014 01:43:41 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1339], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:41 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" = 1339 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", Thu, 11 Dec 2014 01:43:41 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1339], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:41 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" = 1339 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", Thu, 11 Dec 2014 01:43:41 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1339], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:41 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#read as HTML + Parameters: {"id"=>"1354"} + NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1339 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1354') 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", 1339]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1339 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" = 1354 [["state", "read"], ["updated_at", Thu, 11 Dec 2014 01:43:41 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +Completed 200 OK in 9ms (Views: 0.6ms | ActiveRecord: 2.9ms) +Processing by NotifyUser::NotificationsController#read as HTML + Parameters: {"id"=>"1354"} + NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1339 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1354') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 +Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 3.4ms) +  (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", Thu, 11 Dec 2014 01:43:41 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43:41 UTC +00:00]] +  (0.3ms) 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" = 1340 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (1.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", Thu, 11 Dec 2014 01:43:41 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1340], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:41 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" = 1340 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", Thu, 11 Dec 2014 01:43:41 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1340], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:41 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" = 1340 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", Thu, 11 Dec 2014 01:43:41 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1340], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:41 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" = 1340 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" = 1340 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", Thu, 11 Dec 2014 01:43:41 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43:41 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" = 1341 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", Thu, 11 Dec 2014 01:43:41 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1341], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:41 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#mark_read as HTML + Parameters: {"ids"=>["1360"]} + SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1341 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1360')) + NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1341 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1360')) +Completed 200 OK in 4ms (Views: 2.1ms | ActiveRecord: 1.1ms) + NewPostNotification Load (1.2ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1360]] +  (0.3ms) 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", Thu, 11 Dec 2014 01:43:41 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43:41 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" = 1342 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", Thu, 11 Dec 2014 01:43:41 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1342], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:41 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#mark_read as HTML + Parameters: {"ids"=>["1361"]} + SQL (0.6ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1342 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1361')) + NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1342 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1361')) +Completed 200 OK in 5ms (Views: 2.7ms | ActiveRecord: 1.2ms) +  (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", Thu, 11 Dec 2014 01:43:41 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43:41 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" = 1343 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", Thu, 11 Dec 2014 01:43:41 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1343], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:41 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" = 1343 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +Processing by NotifyUser::NotificationsController#subscriptions as HTML + Parameters: {"types"=>[{"type"=>"NewPostNotification", "status"=>"0"}]} +  (0.7ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1343 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" = 1343) 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", Thu, 11 Dec 2014 01:43:41 UTC +00:00], ["target_id", 1343], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:41 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.9ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1343 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +Completed 200 OK in 31ms (Views: 0.5ms | ActiveRecord: 3.6ms) + NotifyUser::Unsubscribe Load (1.0ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1343 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", Thu, 11 Dec 2014 01:43:41 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43:41 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" = 1344 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", Thu, 11 Dec 2014 01:43:41 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1344], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:41 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" = 1344 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" = 1344 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.7ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1344 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +Completed 200 OK in 4ms (Views: 0.4ms | ActiveRecord: 1.4ms) + NotifyUser::Unsubscribe Load (0.5ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1344 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (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", Thu, 11 Dec 2014 01:43:41 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43:41 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" = 1345 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", Thu, 11 Dec 2014 01:43:41 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1345], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:41 UTC +00:00]] +  (0.3ms) 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" = 1345) 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", Thu, 11 Dec 2014 01:43:41 UTC +00:00], ["target_id", 1345], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:41 UTC +00:00]] +  (0.3ms) 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" = 1345 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +Completed 302 Found in 7ms (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.2ms) SAVEPOINT active_record_1 + SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 11 Dec 2014 01:43:41 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43:41 UTC +00:00]] +  (0.2ms) 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" = 1346 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", Thu, 11 Dec 2014 01:43:41 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1346], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:41 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" = 1346) 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", Thu, 11 Dec 2014 01:43:41 UTC +00:00], ["target_id", 1346], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:41 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" = 1346 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.7ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 307]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +Redirected to http://test.host/notify_user/notifications/unsubscribe +Completed 302 Found in 4ms (ActiveRecord: 1.7ms) + NotifyUser::Unsubscribe Load (0.5ms) 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", Thu, 11 Dec 2014 01:43:41 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43:41 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" = 1347 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", Thu, 11 Dec 2014 01:43:41 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1347], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:41 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" = 1347 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" = 'wS6f8c6q8vkWWUq4aJA3UQa_fq2iVa8lokzqnPzQ_rMQ' 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", Thu, 11 Dec 2014 01:43:41 UTC +00:00], ["target_id", 1347], ["target_type", "User"], ["token", "wS6f8c6q8vkWWUq4aJA3UQa_fq2iVa8lokzqnPzQ_rMQ"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:41 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Processing by NotifyUser::NotificationsController#unauth_unsubscribe as HTML + Parameters: {"type"=>"NewPostNotification", "token"=>"wS6f8c6q8vkWWUq4aJA3UQa_fq2iVa8lokzqnPzQ_rMQ"} + NotifyUser::UserHash Exists (0.5ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'wS6f8c6q8vkWWUq4aJA3UQa_fq2iVa8lokzqnPzQ_rMQ' 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" = 'wS6f8c6q8vkWWUq4aJA3UQa_fq2iVa8lokzqnPzQ_rMQ' 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", 1347]] +  (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" = 1347) 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", Thu, 11 Dec 2014 01:43:41 UTC +00:00], ["target_id", 1347], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:41 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 +  (0.3ms) SAVEPOINT active_record_1 + SQL (1.0ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 376 [["active", false], ["updated_at", Thu, 11 Dec 2014 01:43:41 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +Completed 200 OK in 14ms (Views: 0.4ms | 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.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.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.2ms) ROLLBACK TO SAVEPOINT active_record_1 +  (0.5ms) 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.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.3ms) ROLLBACK TO SAVEPOINT active_record_1 +  (0.2ms) 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 (1.1ms) 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 +  (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", Thu, 11 Dec 2014 01:43:42 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43:42 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" = 1348 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", Thu, 11 Dec 2014 01:43:42 UTC +00:00], ["state", "pending"], ["target_id", 1348], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:42 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.6ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1348 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", Thu, 11 Dec 2014 01:43:42 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43:42 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" = 1349 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", Thu, 11 Dec 2014 01:43:42 UTC +00:00], ["state", "pending"], ["target_id", 1349], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:42 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", Thu, 11 Dec 2014 01:43:42 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43:42 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" = 1350 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", Thu, 11 Dec 2014 01:43:42 UTC +00:00], ["state", "pending"], ["target_id", 1350], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:42 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", Thu, 11 Dec 2014 01:43:42 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43:42 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" = 1351 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", Thu, 11 Dec 2014 01:43:42 UTC +00:00], ["state", "pending"], ["target_id", 1351], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:42 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" = 1351 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" = 1370 [["params", {"listing_id"=>1}], ["updated_at", Thu, 11 Dec 2014 01:43:42 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.8ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 11 Dec 2014 01:43:42 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43:42 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" = 1352 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", Thu, 11 Dec 2014 01:43:42 UTC +00:00], ["state", "pending"], ["target_id", 1352], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:42 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" = 1352 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" = 1371 [["params", {"listing_id"=>1}], ["updated_at", Thu, 11 Dec 2014 01:43:42 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') ORDER BY "notify_user_notifications"."id" DESC LIMIT 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", Thu, 11 Dec 2014 01:43:42 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43:42 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" = 1353 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", Thu, 11 Dec 2014 01:43:42 UTC +00:00], ["state", "pending"], ["target_id", 1353], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:42 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" = 1353 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" = 1372 [["params", {:listing_id=>1}], ["updated_at", Thu, 11 Dec 2014 01:43:42 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.1ms) SAVEPOINT active_record_1 + SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 11 Dec 2014 01:43:42 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43:42 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" = 1354 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", Thu, 11 Dec 2014 01:43:42 UTC +00:00], ["state", "pending"], ["target_id", 1354], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:42 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" = 1354 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" = 1373 [["params", {:listing_id=>1}], ["updated_at", Thu, 11 Dec 2014 01:43:42 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.1ms) SAVEPOINT active_record_1 + SQL (3.0ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 11 Dec 2014 01:43:42 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43:42 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" = 1355 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", Thu, 11 Dec 2014 01:43:42 UTC +00:00], ["state", "pending"], ["target_id", 1355], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:42 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", Thu, 11 Dec 2014 01:43:42 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43:42 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" = 1356 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", Thu, 11 Dec 2014 01:43:42 UTC +00:00], ["state", "pending"], ["target_id", 1356], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:42 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" = 1356 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" = 1356 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1375) + NotifyUser::BaseNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1375]] + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1356]] + 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" = 1356 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", 1356]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1356 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' + SQL (1.9ms) UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1375 [["state", "sent"], ["updated_at", Thu, 11 Dec 2014 01:43:42 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" = 1375 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.6ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1356]] +  (0.7ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1356 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" = 1375 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1356]] +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1356 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", Thu, 11 Dec 2014 01:43:42 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43:42 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" = 1357 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", Thu, 11 Dec 2014 01:43:42 UTC +00:00], ["state", "pending"], ["target_id", 1357], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:42 UTC +00:00]] +  (0.2ms) 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" = 1357 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.4ms) RELEASE SAVEPOINT active_record_1 +  (1.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" = 1357 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1376) + NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1376]] + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1357]] + 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" = 1357 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", 1357]] +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1357 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" = 1376 [["state", "sent"], ["updated_at", Thu, 11 Dec 2014 01:43:42 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" = 1376 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1357]] +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1357 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" = 1376 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1357]] +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1357 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns' +  (0.2ms) ROLLBACK +  (0.2ms) 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", Thu, 11 Dec 2014 01:43:42 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43:42 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" = 1358 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", Thu, 11 Dec 2014 01:43:42 UTC +00:00], ["state", "pending"], ["target_id", 1358], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:42 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" = 1358 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" = 1358 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1377) +  (0.2ms) SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1358 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", Thu, 11 Dec 2014 01:43:42 UTC +00:00], ["state", "pending"], ["target_id", 1358], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:42 UTC +00:00]] +  (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" = 1358 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1378) +  (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", Thu, 11 Dec 2014 01:43:42 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43:42 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" = 1359 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", Thu, 11 Dec 2014 01:43:42 UTC +00:00], ["state", "pending"], ["target_id", 1359], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:42 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" = 1359 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", Thu, 11 Dec 2014 01:43:42 UTC +00:00], ["state", "pending"], ["target_id", 1359], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:42 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", 1380]] + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1359]] + 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" = 1359 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", 1359]] +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1359 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" = 1379 [["state", "sent"], ["updated_at", Thu, 11 Dec 2014 01:43:42 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", 1359]] +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1359 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" = 1380 [["state", "sent"], ["updated_at", Thu, 11 Dec 2014 01:43:42 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1359 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" = 1359 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" = 'oYj91bF96iSeKHibEm4c7gVtrRyzmm8N1J4MOqomVgiw' 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", Thu, 11 Dec 2014 01:43:42 UTC +00:00], ["target_id", 1359], ["target_type", "User"], ["token", "oYj91bF96iSeKHibEm4c7gVtrRyzmm8N1J4MOqomVgiw"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:42 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 + +Sent mail to user@example.com (8.5ms) +Date: Thu, 11 Dec 2014 12:43:42 +1100 +From: please-change-me-at-config-initializers-notify-user@example.com +To: user@example.com +Message-ID: <5488f6ce5173c_d0ce3fc435465be8778a5@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=3DoYj91bF96iSeKHibEm4c7gVtrRyzmm8N1J4MOqomVgiw&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.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", Thu, 11 Dec 2014 01:43:42 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43:42 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" = 1360 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", Thu, 11 Dec 2014 01:43:42 UTC +00:00], ["state", "pending"], ["target_id", 1360], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:42 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", 1381]] + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1360]] + 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" = 1360 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", 1360]] +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1360 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" = 1381 [["state", "sent"], ["updated_at", Thu, 11 Dec 2014 01:43:42 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" = 1381 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1360]] +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1360 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" = 1360 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" = 'nInxA6Fwx6fWinLZ9-EB6whl7CCql4k5twevaYyLuWjQ' 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", Thu, 11 Dec 2014 01:43:42 UTC +00:00], ["target_id", 1360], ["target_type", "User"], ["token", "nInxA6Fwx6fWinLZ9-EB6whl7CCql4k5twevaYyLuWjQ"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:42 UTC +00:00]] +  (0.4ms) RELEASE SAVEPOINT active_record_1 + +Sent mail to user@example.com (7.7ms) +Date: Thu, 11 Dec 2014 12:43:42 +1100 +From: please-change-me-at-config-initializers-notify-user@example.com +To: user@example.com +Message-ID: <5488f6ce5cd08_d0ce3fc435465be87799f@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=3DnInxA6Fwx6fWinLZ9-EB6whl7CCql4k5twevaYyLuWjQ&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" = 1360 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns' +  (0.2ms) ROLLBACK +  (0.2ms) 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", Thu, 11 Dec 2014 01:43:42 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43:42 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" = 1361) 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", Thu, 11 Dec 2014 01:43:42 UTC +00:00], ["target_id", 1361], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:42 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.1ms) SAVEPOINT active_record_1 +  (0.7ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1361 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 + NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" IS NULL ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 +  (0.2ms) ROLLBACK +  (0.2ms) BEGIN +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 11 Dec 2014 01:43:42 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43:42 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" = 1362 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", Thu, 11 Dec 2014 01:43:42 UTC +00:00], ["state", "pending"], ["target_id", 1362], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:42 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" = 1382 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1362]] +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1362 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.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 11 Dec 2014 01:43:42 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43:42 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" = 1363 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", Thu, 11 Dec 2014 01:43:42 UTC +00:00], ["state", "pending"], ["target_id", 1363], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:42 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" = 1363 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", Thu, 11 Dec 2014 01:43:42 UTC +00:00], ["state", "pending"], ["target_id", 1363], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:42 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", 1384]] + User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1363]] + 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" = 1363 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", 1363]] +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1363 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" = 1383 [["state", "sent"], ["updated_at", Thu, 11 Dec 2014 01:43:42 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", 1363]] +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1363 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" = 1384 [["state", "sent"], ["updated_at", Thu, 11 Dec 2014 01:43:42 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1363 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" = 1363 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" = 'q91_De5VjpdYJ32YcDvu_QvnqmxL34iyhpkY-LyczehA' 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", Thu, 11 Dec 2014 01:43:42 UTC +00:00], ["target_id", 1363], ["target_type", "User"], ["token", "q91_De5VjpdYJ32YcDvu_QvnqmxL34iyhpkY-LyczehA"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:42 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + +Sent mail to user@example.com (6.4ms) +Date: Thu, 11 Dec 2014 12:43:42 +1100 +From: please-change-me-at-config-initializers-notify-user@example.com +To: user@example.com +Message-ID: <5488f6ce6fc7e_d0ce3fc435465be8780ba@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=3Dq91_De5VjpdYJ32YcDvu_QvnqmxL34iyhpkY-LyczehA&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", Thu, 11 Dec 2014 01:43:42 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43:42 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" = 1364 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", Thu, 11 Dec 2014 01:43:42 UTC +00:00], ["state", "pending"], ["target_id", 1364], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:42 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", 1385]] + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1364]] + 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" = 1364 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' +  (0.1ms) SAVEPOINT active_record_1 + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1364]] +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1364 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" = 1385 [["state", "sent"], ["updated_at", Thu, 11 Dec 2014 01:43:42 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" = 1385 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1364]] +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1364 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" = 1364 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 (1.9ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'yB1c61dmljcJZYRON6GiYQxNvawf6ZdiFjZ8frmc-qqg' 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", Thu, 11 Dec 2014 01:43:42 UTC +00:00], ["target_id", 1364], ["target_type", "User"], ["token", "yB1c61dmljcJZYRON6GiYQxNvawf6ZdiFjZ8frmc-qqg"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:42 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 + +Sent mail to user@example.com (6.9ms) +Date: Thu, 11 Dec 2014 12:43:42 +1100 +From: please-change-me-at-config-initializers-notify-user@example.com +To: user@example.com +Message-ID: <5488f6ce7a6ba_d0ce3fc435465be8781b3@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=3DyB1c61dmljcJZYRON6GiYQxNvawf6ZdiFjZ8frmc-qqg&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.7ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 11 Dec 2014 01:43:42 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43:42 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" = 1365 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", Thu, 11 Dec 2014 01:43:42 UTC +00:00], ["state", "pending"], ["target_id", 1365], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:42 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" = 1365 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" = 1365 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' +  (0.1ms) SAVEPOINT active_record_1 +  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1365 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" = 1386 [["state", "sent"], ["updated_at", Thu, 11 Dec 2014 01:43:42 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" = 1386 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1365]] +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1365 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" = 1365 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.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 11 Dec 2014 01:43:42 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43:42 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" = 1366) LIMIT 1 + SQL (1.3ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 11 Dec 2014 01:43:42 UTC +00:00], ["target_id", 1366], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:42 UTC +00:00]] +  (0.3ms) 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" = 1366 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" = 1366 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" = 1366 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", Thu, 11 Dec 2014 01:43:42 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43:42 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" = 'action_mailer' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1367) 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", Thu, 11 Dec 2014 01:43:42 UTC +00:00], ["target_id", 1367], ["target_type", "User"], ["type", "action_mailer"], ["updated_at", Thu, 11 Dec 2014 01:43:42 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" != 311 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1367) LIMIT 1 +  (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" = 1367 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", Thu, 11 Dec 2014 01:43:42 UTC +00:00], ["state", "pending"], ["target_id", 1367], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:42 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" = 1367 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" = 1367 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" = 1367 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" = 1387 [["state", "sent"], ["updated_at", Thu, 11 Dec 2014 01:43:42 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" = 1387 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1 + User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1367]] +  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1367 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" = 1367 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", Thu, 11 Dec 2014 01:43:42 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43:42 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" = 1368 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", Thu, 11 Dec 2014 01:43:42 UTC +00:00], ["state", "pending"], ["target_id", 1368], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:42 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" = 1368 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" = 'XasKzwIuM_-rHjOkGS8quAQ_TRv3yMZ4cmqYjMjLFQTg' 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", Thu, 11 Dec 2014 01:43:42 UTC +00:00], ["target_id", 1368], ["target_type", "User"], ["token", "XasKzwIuM_-rHjOkGS8quAQ_TRv3yMZ4cmqYjMjLFQTg"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:42 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", Thu, 11 Dec 2014 01:43:42 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43:42 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" = 1369 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", Thu, 11 Dec 2014 01:43:42 UTC +00:00], ["state", "pending"], ["target_id", 1369], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:42 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" = 1369 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" = 'wu144_ZKxoeFhmspEtqHLQl-jcuHkvjH8--Leo5K8bzg' 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", Thu, 11 Dec 2014 01:43:42 UTC +00:00], ["target_id", 1369], ["target_type", "User"], ["token", "wu144_ZKxoeFhmspEtqHLQl-jcuHkvjH8--Leo5K8bzg"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:42 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" = 1369 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", Thu, 11 Dec 2014 01:43:42 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43:42 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" = 1370 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", Thu, 11 Dec 2014 01:43:42 UTC +00:00], ["state", "pending"], ["target_id", 1370], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:42 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" = 1370 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" = '5wGrrAzr7sI1OwFTPobNqgqkh-NvufqicsiXr37LYvsQ' 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", Thu, 11 Dec 2014 01:43:42 UTC +00:00], ["target_id", 1370], ["target_type", "User"], ["token", "5wGrrAzr7sI1OwFTPobNqgqkh-NvufqicsiXr37LYvsQ"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:42 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 + SQL (0.6ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 383 [["active", false], ["updated_at", Thu, 11 Dec 2014 01:43:42 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" = 1370 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.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'qeQeaDBCIzN66C7WKMwhkQkKSB2sDjE-J77W2eEEVLwg' 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", Thu, 11 Dec 2014 01:43:42 UTC +00:00], ["target_id", 1370], ["target_type", "User"], ["token", "qeQeaDBCIzN66C7WKMwhkQkKSB2sDjE-J77W2eEEVLwg"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:42 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", Thu, 11 Dec 2014 01:43:42 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43:42 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" = 1371) 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", Thu, 11 Dec 2014 01:43:42 UTC +00:00], ["target_id", 1371], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:42 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" != 312 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1371) 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" = 1371 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.7ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 11 Dec 2014 01:43:42 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43:42 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" = 1372) 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", Thu, 11 Dec 2014 01:43:42 UTC +00:00], ["target_id", 1372], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:42 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" != 313 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1372) 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" = 1372 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", Thu, 11 Dec 2014 01:43:42 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43:42 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" = 1373) 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", Thu, 11 Dec 2014 01:43:42 UTC +00:00], ["target_id", 1373], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:42 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" != 314 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1373) 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" = 1373) LIMIT 1 +  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1 +  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1373 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" = 1373 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", 314]] +  (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" = 1373 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", Thu, 11 Dec 2014 01:43:42 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43:42 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" = 1374 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", Thu, 11 Dec 2014 01:43:42 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1374], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:42 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", Thu, 11 Dec 2014 01:43:42 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43:42 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" = 'Je8F1TKyDEpXoPtQ7cANnwF3kYIn5VGvI8FThc0HIB5Q' 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", Thu, 11 Dec 2014 01:43:42 UTC +00:00], ["target_id", 1375], ["target_type", "User"], ["token", "Je8F1TKyDEpXoPtQ7cANnwF3kYIn5VGvI8FThc0HIB5Q"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:42 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) 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" = 'Je8F1TKyDEpXoPtQ7cANnwF3kYIn5VGvI8FThc0HIB5Q' 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", Thu, 11 Dec 2014 01:43:42 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43:42 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" = 'vhZD9k6hNfDgqWvVNxjcsQX-UJSx1vZ7H4gNO5XmCEZg' 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", Thu, 11 Dec 2014 01:43:42 UTC +00:00], ["target_id", 1376], ["target_type", "User"], ["token", "vhZD9k6hNfDgqWvVNxjcsQX-UJSx1vZ7H4gNO5XmCEZg"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:42 UTC +00:00]] +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.2ms) SAVEPOINT active_record_1 +  (0.2ms) RELEASE SAVEPOINT active_record_1 +  (0.4ms) SAVEPOINT active_record_1 + SQL (0.9ms) UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 386 [["active", false], ["updated_at", Thu, 11 Dec 2014 01:43:42 UTC +00:00]] +  (0.3ms) RELEASE SAVEPOINT active_record_1 + NotifyUser::UserHash Exists (0.7ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'vhZD9k6hNfDgqWvVNxjcsQX-UJSx1vZ7H4gNO5XmCEZg' 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", Thu, 11 Dec 2014 01:43:42 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43:42 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" = 'Q-9ko88VKzwPhlfULw5XzAf3JdznmkgVu0rwNb8XuYLA' 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", Thu, 11 Dec 2014 01:43:42 UTC +00:00], ["target_id", 1377], ["target_type", "User"], ["token", "Q-9ko88VKzwPhlfULw5XzAf3JdznmkgVu0rwNb8XuYLA"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:42 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" = 387 [["active", false], ["updated_at", Thu, 11 Dec 2014 01:43:42 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", Thu, 11 Dec 2014 01:43:42 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 11 Dec 2014 01:43:42 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" = 'srMV0WtoqQL4UTGdRc57IQ7b_UoMQ3iJ_9CdEYUr7Q7w' 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", Thu, 11 Dec 2014 01:43:42 UTC +00:00], ["target_id", 1378], ["target_type", "User"], ["token", "srMV0WtoqQL4UTGdRc57IQ7b_UoMQ3iJ_9CdEYUr7Q7w"], ["type", "NewPostNotification"], ["updated_at", Thu, 11 Dec 2014 01:43:42 UTC +00:00]] +  (0.3ms) 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.1ms) BEGIN +  (0.1ms) ROLLBACK +  (0.1ms) BEGIN +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN +  (0.3ms) ROLLBACK +  (0.2ms) BEGIN +  (0.2ms) ROLLBACK