spec/dummy/rails-4.0.4/log/test.log in notify_user-0.0.20 vs spec/dummy/rails-4.0.4/log/test.log in notify_user-0.0.22
- old
+ new
@@ -17990,5 +17990,8033 @@
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
[1m[35m (0.2ms)[0m BEGIN
[1m[36m (0.3ms)[0m [1mROLLBACK[0m
[1m[35m (0.2ms)[0m BEGIN
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (11.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+Processing by NotifyUser::NotificationsController#index as HTML
+ Rendered /Users/william/Papercloud/notify_user/app/views/notify_user/base_notifications/index.html.erb within layouts/application (0.4ms)
+Completed 200 OK in 17ms (Views: 13.5ms | ActiveRecord: 0.0ms)
+ [1m[36m (0.8ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.7ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.4ms)[0m SAVEPOINT active_record_1
+ [1m[36m (1.7ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 723 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (2.7ms)[0m 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, 09 Oct 2014 04:23:54 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 723], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+Processing by NotifyUser::NotificationsController#index as JSON
+ [1m[35m (1.0ms)[0m SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 723 AND "notify_user_notifications"."target_type" = 'User'
+ [1m[36mNotifyUser::BaseNotification Load (1.8ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 723 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0[0m
+Completed 200 OK in 21ms (Views: 11.0ms | ActiveRecord: 2.9ms)
+ [1m[35m (0.4ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 724 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.7ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 724], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 724 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.7ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 724], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 724 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.7ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 724], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+Processing by NotifyUser::NotificationsController#index as HTML
+ [1m[36mNotifyUser::BaseNotification Load (1.1ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 724 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0[0m
+Completed 200 OK in 51ms (Views: 48.8ms | ActiveRecord: 1.1ms)
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 725 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.7ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 725], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 725 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.7ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 725], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 725 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.7ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 725], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+Processing by NotifyUser::NotificationsController#read as HTML
+ Parameters: {"id"=>"728"}
+ [1m[36mNotifyUser::BaseNotification Load (1.0ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 725 AND "notify_user_notifications"."target_type" = 'User' AND (id = '728') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mUser Load (1.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 725]]
+ [1m[35m (0.7ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 725 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (1.1ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 728[0m [["state", "read"], ["updated_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+Completed 200 OK in 27ms (Views: 2.6ms | ActiveRecord: 4.8ms)
+ [1m[36mNotifyUser::BaseNotification Load (0.8ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 728 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 726 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 726], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 726 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.7ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 726], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 726 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 726], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+Processing by NotifyUser::NotificationsController#read as HTML
+ Parameters: {"id"=>"731"}
+ [1m[36mNotifyUser::BaseNotification Load (0.7ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 726 AND "notify_user_notifications"."target_type" = 'User' AND (id = '731') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mUser Load (0.5ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 726]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 726 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.9ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 731[0m [["state", "read"], ["updated_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+Completed 200 OK in 9ms (Views: 0.3ms | ActiveRecord: 3.0ms)
+Processing by NotifyUser::NotificationsController#read as HTML
+ Parameters: {"id"=>"731"}
+ [1m[36mNotifyUser::BaseNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 726 AND "notify_user_notifications"."target_type" = 'User' AND (id = '731') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 3.6ms)
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 727 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.9ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 727], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 727 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.7ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 727], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.7ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 727 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 727], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+Processing by NotifyUser::NotificationsController#mark_all as HTML
+ [1m[36mSQL (1.1ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 727 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('pending','sent'))[0m
+Redirected to http://test.host/notify_user/notifications
+Completed 302 Found in 3ms (ActiveRecord: 1.1ms)
+ [1m[35mNotifyUser::BaseNotification Load (0.6ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 727 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('["pending","sent"]'))
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.8ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 728 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.6ms)[0m 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, 09 Oct 2014 04:23:54 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 728], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+Processing by NotifyUser::NotificationsController#mark_read as HTML
+ Parameters: {"ids"=>["737"]}
+ [1m[35mSQL (0.6ms)[0m UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 728 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('737'))
+ [1m[36mNotifyUser::BaseNotification Load (0.7ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 728 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('737'))[0m
+Completed 200 OK in 5ms (Views: 2.0ms | ActiveRecord: 1.3ms)
+ [1m[35mNewPostNotification Load (0.9ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 737]]
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 729 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.6ms)[0m 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, 09 Oct 2014 04:23:54 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 729], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+Processing by NotifyUser::NotificationsController#mark_read as HTML
+ Parameters: {"ids"=>["738"]}
+ [1m[35mSQL (0.6ms)[0m UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 729 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('738'))
+ [1m[36mNotifyUser::BaseNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 729 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('738'))[0m
+Completed 200 OK in 4ms (Views: 2.0ms | ActiveRecord: 1.2ms)
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.7ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 730 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 730], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Load (0.5ms)[0m [1mSELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 730 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+Processing by NotifyUser::NotificationsController#subscriptions as HTML
+ Parameters: {"types"=>[{"type"=>"NewPostNotification", "status"=>"0"}]}
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 730 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.7ms)[0m 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" = 730) LIMIT 1
+ [1m[36mSQL (1.4ms)[0m [1mINSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00], ["target_id", 730], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 730 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+Completed 200 OK in 25ms (Views: 0.4ms | ActiveRecord: 3.9ms)
+ [1m[35mNotifyUser::Unsubscribe Load (0.6ms)[0m SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 730 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.7ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 731 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.6ms)[0m 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, 09 Oct 2014 04:23:54 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 731], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Load (0.5ms)[0m SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 731 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"}]}
+ [1m[36mNotifyUser::Unsubscribe Load (0.5ms)[0m [1mSELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 731 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 731 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+Completed 200 OK in 3ms (Views: 0.2ms | ActiveRecord: 1.0ms)
+ [1m[36mNotifyUser::Unsubscribe Load (0.4ms)[0m [1mSELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 731 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 732 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 732], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+Processing by NotifyUser::NotificationsController#unsubscribe as HTML
+ Parameters: {"type"=>"NewPostNotification"}
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.5ms)[0m 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" = 732) LIMIT 1
+ [1m[36mSQL (0.7ms)[0m [1mINSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00], ["target_id", 732], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+Redirected to http://test.host/notify_user/notifications/unsubscribe
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 732 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+Completed 302 Found in 7ms (ActiveRecord: 2.3ms)
+ [1m[35mNotifyUser::Unsubscribe Load (0.6ms)[0m SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" ORDER BY "notify_user_unsubscribes"."id" DESC LIMIT 1
+ [1m[36m (0.6ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.3ms)[0m BEGIN
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 733 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.6ms)[0m 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, 09 Oct 2014 04:23:54 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 733], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Exists (0.6ms)[0m [1mSELECT 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" = 733) LIMIT 1[0m
+ [1m[35mSQL (0.6ms)[0m 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, 09 Oct 2014 04:23:54 UTC +00:00], ["target_id", 733], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+Processing by NotifyUser::NotificationsController#subscribe as HTML
+ Parameters: {"type"=>"NewPostNotification"}
+ [1m[35mNotifyUser::Unsubscribe Load (0.7ms)[0m SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 733 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.8ms)[0m DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 174]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+Redirected to http://test.host/notify_user/notifications/unsubscribe
+Completed 302 Found in 5ms (ActiveRecord: 1.9ms)
+ [1m[35mNotifyUser::Unsubscribe Load (0.4ms)[0m SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes"
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 734 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.6ms)[0m 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, 09 Oct 2014 04:23:54 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 734], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Load (1.2ms)[0m SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 734 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
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Exists (0.5ms)[0m SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'oM5TXRwXtCJYTBd0NnbGcQhBdxSkCiHi86uR-ZgatA6A' LIMIT 1
+ [1m[36mSQL (1.2ms)[0m [1mINSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00], ["target_id", 734], ["target_type", "User"], ["token", "oM5TXRwXtCJYTBd0NnbGcQhBdxSkCiHi86uR-ZgatA6A"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+Processing by NotifyUser::NotificationsController#unauth_unsubscribe as HTML
+ Parameters: {"type"=>"NewPostNotification", "token"=>"oM5TXRwXtCJYTBd0NnbGcQhBdxSkCiHi86uR-ZgatA6A"}
+ [1m[36mNotifyUser::UserHash Exists (0.6ms)[0m [1mSELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'oM5TXRwXtCJYTBd0NnbGcQhBdxSkCiHi86uR-ZgatA6A' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1[0m
+ [1m[35mNotifyUser::UserHash Load (0.6ms)[0m SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'oM5TXRwXtCJYTBd0NnbGcQhBdxSkCiHi86uR-ZgatA6A' AND "notify_user_user_hashes"."type" = 'NewPostNotification' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
+ [1m[36mUser Load (0.5ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 734]]
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Exists (0.5ms)[0m [1mSELECT 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" = 734) LIMIT 1[0m
+ [1m[35mSQL (0.7ms)[0m 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, 09 Oct 2014 04:23:54 UTC +00:00], ["target_id", 734], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.8ms)[0m [1mUPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 212[0m [["active", false], ["updated_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+Completed 200 OK in 14ms (Views: 0.4ms | ActiveRecord: 4.6ms)
+ [1m[36mNotifyUser::UserHash Load (0.6ms)[0m [1mSELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" ORDER BY "notify_user_user_hashes"."id" DESC LIMIT 1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35mNotifyUser::UserHash Load (0.8ms)[0m 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
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Load (0.7ms)[0m [1mSELECT "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[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.8ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35mNotifyUser::UserHash Load (0.7ms)[0m 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
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Load (1.0ms)[0m [1mSELECT "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[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.4ms)[0m [1mBEGIN[0m
+ [1m[35mNotifyUser::UserHash Load (0.8ms)[0m 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
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.4ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Load (0.8ms)[0m [1mSELECT "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[0m
+ [1m[35m (0.4ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 735 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.9ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00], ["state", "pending"], ["target_id", 735], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 735 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('sent','pending'))[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 736 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00], ["state", "pending"], ["target_id", 736], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 737 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "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, 09 Oct 2014 04:23:54 UTC +00:00], ["state", "pending"], ["target_id", 737], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 738 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00], ["state", "pending"], ["target_id", 738], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.7ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 738 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (1.2ms)[0m [1mUPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 747[0m [["params", {"listing_id"=>1}], ["updated_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNewPostNotification Load (0.7ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 739 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.7ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00], ["state", "pending"], ["target_id", 739], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 739 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (1.0ms)[0m [1mUPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 748[0m [["params", {"listing_id"=>1}], ["updated_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNewPostNotification Load (0.7ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 740 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00], ["state", "pending"], ["target_id", 740], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 740 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (1.0ms)[0m [1mUPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 749[0m [["params", {:listing_id=>1}], ["updated_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNewPostNotification Load (0.8ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.7ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 741 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00], ["state", "pending"], ["target_id", 741], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.9ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 741 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (1.2ms)[0m [1mUPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 750[0m [["params", {:listing_id=>1}], ["updated_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNewPostNotification Load (0.5ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 04:23:54 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 742 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00], ["state", "pending"], ["target_id", 742], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 743 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "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, 09 Oct 2014 04:23:55 UTC +00:00], ["state", "pending"], ["target_id", 743], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.4ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 743 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (2.2ms)[0m [1mSELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 743 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 752)[0m
+ [1m[35mNotifyUser::BaseNotification Load (1.2ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 752]]
+ [1m[36mUser Load (0.5ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 743]]
+ [1m[35mNotifyUser::BaseNotification Load (0.5ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 743 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 743]]
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 743 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (1.8ms)[0m UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 752 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00]]
+ [1m[36m (0.5ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::BaseNotification Load (1.7ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 752 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
+ [1m[36mUser Load (0.5ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 743]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 743 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
+ [1m[36mNewPostNotification Load (0.7ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 752 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+ [1m[35mUser Load (0.5ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 743]]
+ [1m[36m (0.7ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 743 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 744 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00], ["state", "pending"], ["target_id", 744], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 744 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m 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" = 744 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 753)
+ [1m[36mNotifyUser::BaseNotification Load (0.5ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1[0m [["id", 753]]
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 744]]
+ [1m[36mNotifyUser::BaseNotification Load (0.5ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 744 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 744]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 744 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (1.0ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 753[0m [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::BaseNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 753 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+ [1m[35mUser Load (0.5ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 744]]
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 744 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'[0m
+ [1m[35mNewPostNotification Load (0.6ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 753 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 744]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 744 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 745 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "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, 09 Oct 2014 04:23:55 UTC +00:00], ["state", "pending"], ["target_id", 745], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 745 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (1.0ms)[0m [1mSELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 745 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 754)[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 745 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "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, 09 Oct 2014 04:23:55 UTC +00:00], ["state", "pending"], ["target_id", 745], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m 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" = 745 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 755)
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 746 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "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, 09 Oct 2014 04:23:55 UTC +00:00], ["state", "pending"], ["target_id", 746], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 746 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "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, 09 Oct 2014 04:23:55 UTC +00:00], ["state", "pending"], ["target_id", 746], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::BaseNotification Load (0.6ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 757]]
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 746]]
+ [1m[35mNotifyUser::BaseNotification Load (1.0ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 746 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
+ [1m[36m (0.4ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mUser Load (0.6ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 746]]
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 746 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.9ms)[0m UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 756 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 746]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 746 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.8ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 757[0m [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::BaseNotification Load (0.7ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 746 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 747 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00], ["state", "pending"], ["target_id", 747], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::BaseNotification Load (0.5ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1[0m [["id", 758]]
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 747]]
+ [1m[36mNotifyUser::BaseNotification Load (0.5ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 747 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 747]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 747 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.8ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 758[0m [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::BaseNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 758 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 747]]
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 747 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.5ms)[0m 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" = 748) LIMIT 1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00], ["target_id", 748], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 748 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.3ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::BaseNotification Load (0.4ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" IS NULL ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.4ms)[0m BEGIN
+ [1m[36m (0.4ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 749 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "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, 09 Oct 2014 04:23:55 UTC +00:00], ["state", "pending"], ["target_id", 749], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::BaseNotification Load (0.5ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 759 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 749]]
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 749 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 750 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "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, 09 Oct 2014 04:23:55 UTC +00:00], ["state", "pending"], ["target_id", 750], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 750 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "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, 09 Oct 2014 04:23:55 UTC +00:00], ["state", "pending"], ["target_id", 750], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::BaseNotification Load (0.5ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 761]]
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 750]]
+ [1m[35mNotifyUser::BaseNotification Load (0.7ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 750 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 750]]
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 750 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (1.1ms)[0m UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 760 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 750]]
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 750 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.9ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 761[0m [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 750 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'[0m
+ [1m[35m (0.4ms)[0m ROLLBACK
+ [1m[36m (0.3ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.4ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.7ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 751 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00], ["state", "pending"], ["target_id", 751], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::BaseNotification Load (0.5ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1[0m [["id", 762]]
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 751]]
+ [1m[36mNotifyUser::BaseNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 751 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 751]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 751 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.9ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 762[0m [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::BaseNotification Load (0.7ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 762 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 751]]
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 751 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 752 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00], ["state", "pending"], ["target_id", 752], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.7ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 752 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.4ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 752 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 752 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.9ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 763[0m [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNewPostNotification Load (0.7ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 763 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 752]]
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 752 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'[0m
+ [1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 752 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Exists (0.6ms)[0m [1mSELECT 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" = 753) LIMIT 1[0m
+ [1m[35mSQL (0.6ms)[0m 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, 09 Oct 2014 04:23:55 UTC +00:00], ["target_id", 753], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 753 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 753 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 753 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Exists (0.5ms)[0m [1mSELECT 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" = 754) LIMIT 1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 754 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00], ["state", "pending"], ["target_id", 754], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 754 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 754 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 754 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (1.0ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 764[0m [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNewPostNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 764 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 754]]
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 754 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'[0m
+ [1m[35m (0.7ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.8ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 755 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00], ["state", "pending"], ["target_id", 755], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Load (1.1ms)[0m [1mSELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 755 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[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Exists (0.6ms)[0m [1mSELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'x3n0uM4w7-E707nkxFcCewD1_WDZvjsTgJuhi0KUzanA' LIMIT 1[0m
+ [1m[35mSQL (0.6ms)[0m 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, 09 Oct 2014 04:23:55 UTC +00:00], ["target_id", 755], ["target_type", "User"], ["token", "x3n0uM4w7-E707nkxFcCewD1_WDZvjsTgJuhi0KUzanA"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 756 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00], ["state", "pending"], ["target_id", 756], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Load (0.7ms)[0m [1mSELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 756 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[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Exists (0.4ms)[0m [1mSELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'bXGCR7Rgu5PlZH49ebpMzw4OEk3KOYN_DZuuyyokFhRQ' LIMIT 1[0m
+ [1m[35mSQL (0.5ms)[0m 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, 09 Oct 2014 04:23:55 UTC +00:00], ["target_id", 756], ["target_type", "User"], ["token", "bXGCR7Rgu5PlZH49ebpMzw4OEk3KOYN_DZuuyyokFhRQ"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Load (0.6ms)[0m SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 756 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
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.3ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 757 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "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, 09 Oct 2014 04:23:55 UTC +00:00], ["state", "pending"], ["target_id", 757], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Load (0.8ms)[0m SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 757 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
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Exists (0.5ms)[0m SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'k9_bEycJwEpNy1DWh9sB1guMwKPrfok6jxPXunyGWtAw' LIMIT 1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00], ["target_id", 757], ["target_type", "User"], ["token", "k9_bEycJwEpNy1DWh9sB1guMwKPrfok6jxPXunyGWtAw"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.8ms)[0m UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 215 [["active", false], ["updated_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Load (0.7ms)[0m SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 757 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
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Exists (0.5ms)[0m SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '5qaTAqNS-5u767cio1KzEQjGcmZUeFprx487SSqfOF0Q' LIMIT 1
+ [1m[36mSQL (0.7ms)[0m [1mINSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00], ["target_id", 757], ["target_type", "User"], ["token", "5qaTAqNS-5u767cio1KzEQjGcmZUeFprx487SSqfOF0Q"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Exists (0.5ms)[0m [1mSELECT 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" = 758) LIMIT 1[0m
+ [1m[35mSQL (0.6ms)[0m 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, 09 Oct 2014 04:23:55 UTC +00:00], ["target_id", 758], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Exists (0.6ms)[0m [1mSELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 178 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 758) LIMIT 1[0m
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 758 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.4ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.7ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.5ms)[0m 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" = 759) LIMIT 1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00], ["target_id", 759], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.5ms)[0m SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 179 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 759) LIMIT 1
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 759 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Exists (0.5ms)[0m [1mSELECT 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" = 760) LIMIT 1[0m
+ [1m[35mSQL (0.5ms)[0m 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, 09 Oct 2014 04:23:55 UTC +00:00], ["target_id", 760], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Exists (0.5ms)[0m [1mSELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 180 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 760) LIMIT 1[0m
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.5ms)[0m SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'UnsubscribableNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 760) LIMIT 1
+ [1m[36m (0.3ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Load (0.6ms)[0m SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" ORDER BY "notify_user_unsubscribes"."id" DESC LIMIT 1
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Exists (0.6ms)[0m [1mSELECT 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" = 761) LIMIT 1[0m
+ [1m[35mSQL (0.5ms)[0m 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, 09 Oct 2014 04:23:55 UTC +00:00], ["target_id", 761], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Exists (0.6ms)[0m [1mSELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 181 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 761) LIMIT 1[0m
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.5ms)[0m 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" = 761) LIMIT 1
+ [1m[36m (0.3ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 761 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mNotifyUser::Unsubscribe Load (0.4ms)[0m [1mSELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 761 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.7ms)[0m [1mDELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1[0m [["id", 181]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Load (0.6ms)[0m [1mSELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 761 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 762 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 762], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Exists (0.5ms)[0m [1mSELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'JaQxkTjuqpGwFuOePdfs0AqwjGsE2yBC3ld-CgHXx6cQ' LIMIT 1[0m
+ [1m[35mSQL (0.6ms)[0m 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, 09 Oct 2014 04:23:55 UTC +00:00], ["target_id", 763], ["target_type", "User"], ["token", "JaQxkTjuqpGwFuOePdfs0AqwjGsE2yBC3ld-CgHXx6cQ"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.4ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Exists (0.5ms)[0m SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'JaQxkTjuqpGwFuOePdfs0AqwjGsE2yBC3ld-CgHXx6cQ' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.3ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Exists (0.5ms)[0m [1mSELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'uLX1VUF99X5ry67q3JS0sQaNh_6eH9o1zktXkVvFnBBw' LIMIT 1[0m
+ [1m[35mSQL (0.5ms)[0m 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, 09 Oct 2014 04:23:55 UTC +00:00], ["target_id", 764], ["target_type", "User"], ["token", "uLX1VUF99X5ry67q3JS0sQaNh_6eH9o1zktXkVvFnBBw"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (2.0ms)[0m [1mUPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 218[0m [["active", false], ["updated_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00]]
+ [1m[35m (0.4ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Exists (0.5ms)[0m [1mSELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'uLX1VUF99X5ry67q3JS0sQaNh_6eH9o1zktXkVvFnBBw' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (1.0ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Exists (0.5ms)[0m SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'r8UsQn6BumOdUNKGNUYWxg7EJ3Oe9-gLT3FEQKLu4Dkw' LIMIT 1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00], ["target_id", 765], ["target_type", "User"], ["token", "r8UsQn6BumOdUNKGNUYWxg7EJ3Oe9-gLT3FEQKLu4Dkw"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.9ms)[0m UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 219 [["active", false], ["updated_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Exists (0.5ms)[0m SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'e6GZyZEVPq24guusLX0JmgW2I77z0IZn3FC9iTnAuKRw' LIMIT 1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00], ["target_id", 766], ["target_type", "User"], ["token", "e6GZyZEVPq24guusLX0JmgW2I77z0IZn3FC9iTnAuKRw"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:23:55 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.3ms)[0m BEGIN
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36m (0.1ms)[0m [1mROLLBACK[0m
+ [1m[36m (5.3ms)[0m [1mBEGIN[0m
+ [1m[35m (1.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (16.0ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 04:54:46 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 04:54:46 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (1.7ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 767 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (1.6ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 04:54:46 UTC +00:00], ["state", "pending"], ["target_id", 767], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:54:46 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 767 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 04:54:46 UTC +00:00], ["state", "pending"], ["target_id", 767], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:54:46 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::BaseNotification Load (1.7ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1[0m [["id", 770]]
+ [1m[35mUser Load (1.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 767]]
+ [1m[36mNotifyUser::BaseNotification Load (0.8ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 767 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mUser Load (0.6ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 767]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 767 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (2.8ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 769[0m [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 04:54:46 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mUser Load (0.6ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 767]]
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 767 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.9ms)[0m UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 770 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 04:54:46 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::BaseNotification Load (0.7ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 767 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[36m (0.3ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (6.4ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 04:55:39 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 04:55:39 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.4ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (1.3ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 768 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (1.2ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 04:55:39 UTC +00:00], ["state", "pending"], ["target_id", 768], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:55:39 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 768 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 04:55:39 UTC +00:00], ["state", "pending"], ["target_id", 768], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:55:39 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::BaseNotification Load (1.1ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1[0m [["id", 772]]
+ [1m[35mUser Load (1.0ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 768]]
+ [1m[36mNotifyUser::BaseNotification Load (0.7ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 768 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 768]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 768 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (1.4ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 771[0m [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 04:55:39 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 768]]
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 768 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.9ms)[0m UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 772 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 04:55:39 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 768 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
+ Rendered notify_user/new_post_notification/action_mailer/notification.html.erb (0.4ms)
+ Rendered notify_user/new_post_notification/action_mailer/notification.html.erb (0.0ms)
+ Rendered /Users/william/Papercloud/notify_user/app/views/notify_user/action_mailer/aggregate_notification.html.erb within notify_user/layouts/action_mailer (3.9ms)
+ [1m[36mNotifyUser::UserHash Load (2.6ms)[0m [1mSELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 768 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[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Exists (0.7ms)[0m [1mSELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'UPMfV0G5gE7DmUzUuJC2EArvLpkolCXZNzMWvk9Wyqgw' LIMIT 1[0m
+ [1m[35mSQL (1.3ms)[0m 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, 09 Oct 2014 04:55:39 UTC +00:00], ["target_id", 768], ["target_type", "User"], ["token", "UPMfV0G5gE7DmUzUuJC2EArvLpkolCXZNzMWvk9Wyqgw"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:55:39 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+
+Sent mail to user@example.com (13.6ms)
+Date: Thu, 09 Oct 2014 15:55:39 +1100
+From: please-change-me-at-config-initializers-notify-user@example.com
+To: user@example.com
+Message-ID: <5436154bd7fcc_1b413fe13c465bec176f5@wp.local.mail>
+Subject: New Notifications
+Mime-Version: 1.0
+Content-Type: text/html;
+ charset=UTF-8
+Content-Transfer-Encoding: quoted-printable
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/h=
+tml4/strict.dtd">
+<html>
+<head>
+ <meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type=
+"/>
+ <title></title>
+</head>
+
+<body marginheight=3D"0" topmargin=3D"0" marginwidth=3D"0" leftmargin=3D"=
+0" style=3D"margin: 0px; -webkit-font-smoothing: antialiased; text-render=
+ing: optimizeLegibility;">
+<div style=3D"width: 100%; height: 70px; margin: 0; padding: 0;">
+ <div style=3D"width: 600px; margin: 0 auto; padding: 15px 0;">
+ Logo
+ </div>
+</div>
+<div style=3D"width: 100%; background-color: #fff; margin: 0; padding: 0;=
+">
+ <div style=3D"width: 500px; margin: 0 auto; padding: 40px 0; ">
+ =
+
+<div>
+ New Post Notification happened. =
+
+</div>
+<div>
+ New Post Notification happened. =
+
+</div>
+
+ </div>
+</div>
+<div style=3D"width: 100%; min-height: 80px; margin: 0; padding: 0;">
+ <div style=3D"width: 600px; margin: 0 auto; padding: 0;">
+ <p style=3D"text-align: center;">
+ <a href=3D"http://localhost:5000/notify_user/notifications/unauth=
+_unsubscribe?token=3DUPMfV0G5gE7DmUzUuJC2EArvLpkolCXZNzMWvk9Wyqgw&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>=
+
+ [1m[35m (0.4ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (4.4ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 04:56:07 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 04:56:07 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (1.0ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 769 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (1.1ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 04:56:07 UTC +00:00], ["state", "pending"], ["target_id", 769], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:56:07 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.8ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 769 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.7ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 04:56:07 UTC +00:00], ["state", "pending"], ["target_id", 769], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:56:07 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::BaseNotification Load (1.1ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1[0m [["id", 774]]
+ [1m[35mUser Load (0.8ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 769]]
+ [1m[36mNotifyUser::BaseNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 769 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 769]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 769 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (1.2ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 773[0m [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 04:56:07 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mUser Load (0.5ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 769]]
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 769 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (1.0ms)[0m UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 774 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 04:56:07 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::BaseNotification Load (0.5ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 769 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (4.8ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 04:56:37 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 04:56:37 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (1.0ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 770 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (1.1ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 04:56:37 UTC +00:00], ["state", "pending"], ["target_id", 770], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:56:37 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 770 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 04:56:37 UTC +00:00], ["state", "pending"], ["target_id", 770], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:56:37 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::BaseNotification Load (1.1ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1[0m [["id", 776]]
+ [1m[35mUser Load (1.0ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 770]]
+ [1m[36mNotifyUser::BaseNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 770 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mUser Load (0.5ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 770]]
+ [1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 770 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (1.3ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 775[0m [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 04:56:37 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mUser Load (0.5ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 770]]
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 770 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.9ms)[0m UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 776 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 04:56:37 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::BaseNotification Load (0.5ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 770 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
+ [1m[36m (0.4ms)[0m [1mROLLBACK[0m
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (5.0ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 04:57:03 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 04:57:03 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (1.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 771 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (1.2ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 04:57:04 UTC +00:00], ["state", "pending"], ["target_id", 771], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:57:04 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.4ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 771 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 04:57:04 UTC +00:00], ["state", "pending"], ["target_id", 771], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:57:04 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::BaseNotification Load (1.1ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1[0m [["id", 778]]
+ [1m[35mUser Load (0.9ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 771]]
+ [1m[36mNotifyUser::BaseNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 771 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mUser Load (0.5ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 771]]
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 771 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (1.3ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 777[0m [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 04:57:04 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mUser Load (0.5ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 771]]
+ [1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 771 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.9ms)[0m UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 778 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 04:57:04 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::BaseNotification Load (0.9ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 771 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
+ [1m[36m (0.4ms)[0m [1mROLLBACK[0m
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (8.2ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 04:57:21 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 04:57:21 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (1.3ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 772 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (1.1ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 04:57:21 UTC +00:00], ["state", "pending"], ["target_id", 772], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:57:21 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.7ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 772 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.7ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 04:57:21 UTC +00:00], ["state", "pending"], ["target_id", 772], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:57:21 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::BaseNotification Load (1.2ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1[0m [["id", 780]]
+ [1m[35mUser Load (0.9ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 772]]
+ [1m[36mNotifyUser::BaseNotification Load (0.7ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 772 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mUser Load (0.5ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 772]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 772 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (1.2ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 779[0m [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 04:57:21 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mUser Load (0.6ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 772]]
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 772 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.9ms)[0m UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 780 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 04:57:21 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::BaseNotification Load (0.5ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 772 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
+ [1m[36m (0.4ms)[0m [1mROLLBACK[0m
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (6.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 04:58:12 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 04:58:12 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (1.3ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 773 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (1.1ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 04:58:12 UTC +00:00], ["state", "pending"], ["target_id", 773], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:58:12 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.4ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 773 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 04:58:12 UTC +00:00], ["state", "pending"], ["target_id", 773], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:58:12 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::BaseNotification Load (1.2ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1[0m [["id", 782]]
+ [1m[35mUser Load (1.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 773]]
+ [1m[36mNotifyUser::BaseNotification Load (0.7ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 773 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mUser Load (0.5ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 773]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 773 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (1.1ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 781[0m [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 04:58:12 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mUser Load (0.5ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 773]]
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 773 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.9ms)[0m UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 782 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 04:58:12 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::BaseNotification Load (0.5ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 773 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (7.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 04:58:26 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 04:58:26 UTC +00:00]]
+ [1m[35m (0.4ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (1.1ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 774 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (1.1ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 04:58:26 UTC +00:00], ["state", "pending"], ["target_id", 774], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:58:26 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 774 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.7ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 04:58:26 UTC +00:00], ["state", "pending"], ["target_id", 774], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:58:26 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::BaseNotification Load (1.2ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1[0m [["id", 784]]
+ [1m[35mUser Load (1.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 774]]
+ [1m[36mNotifyUser::BaseNotification Load (0.7ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 774 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 774]]
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 774 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (1.2ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 783[0m [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 04:58:26 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mUser Load (0.5ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 774]]
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 774 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.8ms)[0m UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 784 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 04:58:26 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::BaseNotification Load (0.5ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 774 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
+ [1m[36m (0.4ms)[0m [1mROLLBACK[0m
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (7.2ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 04:58:50 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 04:58:50 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (1.2ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 775 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (1.1ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 04:58:50 UTC +00:00], ["state", "pending"], ["target_id", 775], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:58:50 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 775 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 04:58:50 UTC +00:00], ["state", "pending"], ["target_id", 775], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 04:58:50 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::BaseNotification Load (1.1ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1[0m [["id", 786]]
+ [1m[35mUser Load (1.0ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 775]]
+ [1m[36mNotifyUser::BaseNotification Load (0.7ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 775 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 775]]
+ [1m[35m (0.7ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 775 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (1.2ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 785[0m [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 04:58:50 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mUser Load (0.6ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 775]]
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 775 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.9ms)[0m UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 786 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 04:58:50 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::BaseNotification Load (0.6ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 775 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (6.1ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 05:01:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 05:01:55 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (1.1ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 776 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (1.1ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 05:01:55 UTC +00:00], ["state", "pending"], ["target_id", 776], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 05:01:55 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 776 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 05:01:55 UTC +00:00], ["state", "pending"], ["target_id", 776], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 05:01:55 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNewPostNotification Load (0.9ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1[0m [["id", 788]]
+ [1m[35mUser Load (0.7ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 776]]
+ [1m[36mNewPostNotification Load (0.6ms)[0m [1mSELECT "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" = 776 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mUser Load (0.5ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 776]]
+ [1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 776 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.8ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 787[0m [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 05:01:55 UTC +00:00]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 776]]
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 776 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (1.1ms)[0m UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 788 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 05:01:55 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 776 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
+ [1m[36mNotifyUser::BaseNotification Load (0.4ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 776 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (5.4ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 05:02:07 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 05:02:07 UTC +00:00]]
+ [1m[35m (0.4ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (1.7ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 777 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (1.4ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 05:02:07 UTC +00:00], ["state", "pending"], ["target_id", 777], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 05:02:07 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 777 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 05:02:07 UTC +00:00], ["state", "pending"], ["target_id", 777], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 05:02:07 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNewPostNotification Load (1.1ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1[0m [["id", 790]]
+ [1m[35mUser Load (0.9ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 777]]
+ [1m[36mNewPostNotification Load (0.7ms)[0m [1mSELECT "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" = 777 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 777]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 777 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (1.1ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 789[0m [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 05:02:07 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mUser Load (0.6ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 777]]
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 777 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.9ms)[0m UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 790 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 05:02:07 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 777 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
+ [1m[36mNotifyUser::BaseNotification Load (0.5ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 777 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (1.6ms)[0m [1mBEGIN[0m
+ [1m[35m (0.9ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (14.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:39:42 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:39:42 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (2.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 778 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (1.5ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:39:43 UTC +00:00], ["state", "pending"], ["target_id", 778], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:39:43 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 778 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.7ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:39:43 UTC +00:00], ["state", "pending"], ["target_id", 778], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:39:43 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNewPostNotification Load (1.8ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1[0m [["id", 792]]
+ [1m[35mUser Load (0.9ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 778]]
+ [1m[36mNewPostNotification Load (0.8ms)[0m [1mSELECT "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" = 778 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 778]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 778 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (5.0ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 791[0m [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 06:39:43 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mUser Load (0.5ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 778]]
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 778 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (1.0ms)[0m UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 792 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 06:39:43 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 778 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
+ Rendered notify_user/new_post_notification/action_mailer/notification.html.erb (0.5ms)
+ Rendered notify_user/new_post_notification/action_mailer/notification.html.erb (0.0ms)
+ Rendered /Users/william/Papercloud/notify_user/app/views/notify_user/action_mailer/aggregate_notification.html.erb within notify_user/layouts/action_mailer (4.2ms)
+ [1m[36mNotifyUser::UserHash Load (2.6ms)[0m [1mSELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 778 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[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Exists (0.6ms)[0m [1mSELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '2xglyUsAnAjc81jeaJZMcQMX6b_Ar5MR5AVc--bTov2A' LIMIT 1[0m
+ [1m[35mSQL (1.2ms)[0m 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, 09 Oct 2014 06:39:43 UTC +00:00], ["target_id", 778], ["target_type", "User"], ["token", "2xglyUsAnAjc81jeaJZMcQMX6b_Ar5MR5AVc--bTov2A"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:39:43 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+
+Sent mail to user@example.com (15.7ms)
+Date: Thu, 09 Oct 2014 17:39:43 +1100
+From: please-change-me-at-config-initializers-notify-user@example.com
+To: user@example.com
+Message-ID: <54362daf231e4_1d2f3fef2e065bf0437ec@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=3D2xglyUsAnAjc81jeaJZMcQMX6b_Ar5MR5AVc--bTov2A&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>=
+
+ [1m[35m (0.4ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (6.0ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:39:51 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:39:51 UTC +00:00]]
+ [1m[35m (0.3ms)[0m 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 14ms (Views: 10.8ms | ActiveRecord: 0.0ms)
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.7ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:39:51 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:39:51 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (1.3ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 780 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (2.5ms)[0m 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, 09 Oct 2014 06:39:51 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 780], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:39:51 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+Processing by NotifyUser::NotificationsController#index as JSON
+ [1m[35m (0.7ms)[0m SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 780 AND "notify_user_notifications"."target_type" = 'User'
+ [1m[36mNotifyUser::BaseNotification Load (2.1ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 780 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0[0m
+Completed 200 OK in 22ms (Views: 13.9ms | ActiveRecord: 2.9ms)
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:39:51 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:39:51 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 781 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.7ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 06:39:51 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 781], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:39:51 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 781 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 06:39:51 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 781], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:39:51 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 781 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 06:39:51 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 781], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:39:51 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+Processing by NotifyUser::NotificationsController#index as HTML
+ [1m[36mNotifyUser::BaseNotification Load (1.5ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 781 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0[0m
+Completed 200 OK in 52ms (Views: 49.8ms | ActiveRecord: 1.5ms)
+ [1m[35m (0.4ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.8ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:39:51 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:39:51 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 782 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.7ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 06:39:51 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 782], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:39:51 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 782 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 06:39:51 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 782], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:39:51 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 782 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 06:39:51 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 782], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:39:51 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+Processing by NotifyUser::NotificationsController#read as HTML
+ Parameters: {"id"=>"797"}
+ [1m[36mNotifyUser::BaseNotification Load (1.0ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 782 AND "notify_user_notifications"."target_type" = 'User' AND (id = '797') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mUser Load (1.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 782]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 782 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (1.1ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 797[0m [["state", "read"], ["updated_at", Thu, 09 Oct 2014 06:39:51 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+Completed 200 OK in 24ms (Views: 2.0ms | ActiveRecord: 4.3ms)
+ [1m[36mNotifyUser::BaseNotification Load (0.7ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 797 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+ [1m[35m (0.4ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:39:51 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:39:51 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 783 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.7ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 06:39:51 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 783], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:39:51 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 783 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 06:39:51 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 783], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:39:51 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 783 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.5ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 06:39:51 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 783], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:39:51 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+Processing by NotifyUser::NotificationsController#read as HTML
+ Parameters: {"id"=>"800"}
+ [1m[36mNotifyUser::BaseNotification Load (0.7ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 783 AND "notify_user_notifications"."target_type" = 'User' AND (id = '800') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mUser Load (0.5ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 783]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 783 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.9ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 800[0m [["state", "read"], ["updated_at", Thu, 09 Oct 2014 06:39:51 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+Completed 200 OK in 9ms (Views: 0.5ms | ActiveRecord: 3.1ms)
+Processing by NotifyUser::NotificationsController#read as HTML
+ Parameters: {"id"=>"800"}
+ [1m[36mNotifyUser::BaseNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 783 AND "notify_user_notifications"."target_type" = 'User' AND (id = '800') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 3.7ms)
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:39:51 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:39:51 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 784 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.7ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 06:39:51 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 784], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:39:51 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 784 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.9ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 06:39:51 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 784], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:39:51 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 784 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 06:39:51 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 784], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:39:51 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+Processing by NotifyUser::NotificationsController#mark_all as HTML
+ [1m[36mSQL (1.1ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 784 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('pending','sent'))[0m
+Redirected to http://test.host/notify_user/notifications
+Completed 302 Found in 3ms (ActiveRecord: 1.1ms)
+ [1m[35mNotifyUser::BaseNotification Load (0.6ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 784 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('["pending","sent"]'))
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:39:51 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:39:51 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.4ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 785 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.6ms)[0m 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, 09 Oct 2014 06:39:51 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 785], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:39:51 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+Processing by NotifyUser::NotificationsController#mark_read as HTML
+ Parameters: {"ids"=>["806"]}
+ [1m[35mSQL (0.6ms)[0m UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 785 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('806'))
+ [1m[36mNotifyUser::BaseNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 785 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('806'))[0m
+Completed 200 OK in 4ms (Views: 2.0ms | ActiveRecord: 1.2ms)
+ [1m[35mNewPostNotification Load (0.8ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 806]]
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:39:51 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:39:51 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 786 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.6ms)[0m 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, 09 Oct 2014 06:39:51 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 786], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:39:51 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+Processing by NotifyUser::NotificationsController#mark_read as HTML
+ Parameters: {"ids"=>["807"]}
+ [1m[35mSQL (0.6ms)[0m UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 786 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('807'))
+ [1m[36mNotifyUser::BaseNotification Load (0.5ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 786 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('807'))[0m
+Completed 200 OK in 4ms (Views: 1.8ms | ActiveRecord: 1.1ms)
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:39:51 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:39:51 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 787 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 06:39:51 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 787], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:39:51 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Load (0.5ms)[0m [1mSELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 787 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+Processing by NotifyUser::NotificationsController#subscriptions as HTML
+ Parameters: {"types"=>[{"type"=>"NewPostNotification", "status"=>"0"}]}
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 787 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.6ms)[0m 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" = 787) LIMIT 1
+ [1m[36mSQL (1.1ms)[0m [1mINSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:39:51 UTC +00:00], ["target_id", 787], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:39:51 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 787 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+Completed 200 OK in 19ms (Views: 0.4ms | ActiveRecord: 3.4ms)
+ [1m[35mNotifyUser::Unsubscribe Load (0.5ms)[0m SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 787 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36m (0.4ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:39:51 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:39:51 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 788 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.5ms)[0m 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, 09 Oct 2014 06:39:51 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 788], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:39:51 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Load (0.5ms)[0m SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 788 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"}]}
+ [1m[36mNotifyUser::Unsubscribe Load (0.5ms)[0m [1mSELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 788 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 788 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+Completed 200 OK in 3ms (Views: 0.4ms | ActiveRecord: 1.0ms)
+ [1m[36mNotifyUser::Unsubscribe Load (0.4ms)[0m [1mSELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 788 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:39:51 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:39:51 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 789 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.7ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 06:39:51 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 789], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:39:51 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+Processing by NotifyUser::NotificationsController#unsubscribe as HTML
+ Parameters: {"type"=>"NewPostNotification"}
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.5ms)[0m 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" = 789) LIMIT 1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:39:51 UTC +00:00], ["target_id", 789], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:39:51 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+Redirected to http://test.host/notify_user/notifications/unsubscribe
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 789 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+Completed 302 Found in 6ms (ActiveRecord: 2.0ms)
+ [1m[35mNotifyUser::Unsubscribe Load (0.5ms)[0m SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" ORDER BY "notify_user_unsubscribes"."id" DESC LIMIT 1
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:39:51 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:39:51 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 790 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.5ms)[0m 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, 09 Oct 2014 06:39:51 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 790], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:39:51 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Exists (0.5ms)[0m [1mSELECT 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" = 790) LIMIT 1[0m
+ [1m[35mSQL (0.5ms)[0m 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, 09 Oct 2014 06:39:51 UTC +00:00], ["target_id", 790], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:39:51 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+Processing by NotifyUser::NotificationsController#subscribe as HTML
+ Parameters: {"type"=>"NewPostNotification"}
+ [1m[35mNotifyUser::Unsubscribe Load (1.0ms)[0m SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 790 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.4ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.7ms)[0m DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 184]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+Redirected to http://test.host/notify_user/notifications/unsubscribe
+Completed 302 Found in 5ms (ActiveRecord: 2.3ms)
+ [1m[35mNotifyUser::Unsubscribe Load (0.4ms)[0m SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes"
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:39:51 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:39:51 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 791 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.5ms)[0m 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, 09 Oct 2014 06:39:51 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 791], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:39:51 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Load (0.8ms)[0m SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 791 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
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Exists (0.5ms)[0m SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'eS4YOWG82KcSVztEbKv7dwKlR_F3-cpl6AikDMZggQ_A' LIMIT 1
+ [1m[36mSQL (1.1ms)[0m [1mINSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:39:51 UTC +00:00], ["target_id", 791], ["target_type", "User"], ["token", "eS4YOWG82KcSVztEbKv7dwKlR_F3-cpl6AikDMZggQ_A"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:39:51 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+Processing by NotifyUser::NotificationsController#unauth_unsubscribe as HTML
+ Parameters: {"type"=>"NewPostNotification", "token"=>"eS4YOWG82KcSVztEbKv7dwKlR_F3-cpl6AikDMZggQ_A"}
+ [1m[36mNotifyUser::UserHash Exists (0.6ms)[0m [1mSELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'eS4YOWG82KcSVztEbKv7dwKlR_F3-cpl6AikDMZggQ_A' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1[0m
+ [1m[35mNotifyUser::UserHash Load (0.8ms)[0m SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'eS4YOWG82KcSVztEbKv7dwKlR_F3-cpl6AikDMZggQ_A' AND "notify_user_user_hashes"."type" = 'NewPostNotification' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
+ [1m[36mUser Load (0.6ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 791]]
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Exists (0.5ms)[0m [1mSELECT 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" = 791) LIMIT 1[0m
+ [1m[35mSQL (0.5ms)[0m 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, 09 Oct 2014 06:39:51 UTC +00:00], ["target_id", 791], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:39:51 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.8ms)[0m [1mUPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 223[0m [["active", false], ["updated_at", Thu, 09 Oct 2014 06:39:51 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+Completed 200 OK in 13ms (Views: 0.5ms | ActiveRecord: 4.9ms)
+ [1m[36mNotifyUser::UserHash Load (0.5ms)[0m [1mSELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" ORDER BY "notify_user_user_hashes"."id" DESC LIMIT 1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35mNotifyUser::UserHash Load (0.7ms)[0m 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
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.7ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Load (1.0ms)[0m [1mSELECT "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[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.4ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35mNotifyUser::UserHash Load (0.8ms)[0m 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
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Load (0.7ms)[0m [1mSELECT "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[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35mNotifyUser::UserHash Load (0.7ms)[0m 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
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Load (0.7ms)[0m [1mSELECT "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[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:39:51 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:39:51 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 792 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.8ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:39:51 UTC +00:00], ["state", "pending"], ["target_id", 792], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:39:51 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 792 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('sent','pending'))[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.3ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 793 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00], ["state", "pending"], ["target_id", 793], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.3ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 794 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.8ms)[0m INSERT INTO "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, 09 Oct 2014 06:39:52 UTC +00:00], ["state", "pending"], ["target_id", 794], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 795 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00], ["state", "pending"], ["target_id", 795], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 795 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (1.9ms)[0m [1mUPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 816[0m [["params", {"listing_id"=>1}], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNewPostNotification Load (0.7ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.7ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 796 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00], ["state", "pending"], ["target_id", 796], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 796 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (1.0ms)[0m [1mUPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 817[0m [["params", {"listing_id"=>1}], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNewPostNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.3ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 797 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00], ["state", "pending"], ["target_id", 797], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 797 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (1.0ms)[0m [1mUPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 818[0m [["params", {:listing_id=>1}], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNewPostNotification Load (0.5ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.3ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 798 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00], ["state", "pending"], ["target_id", 798], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 798 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (1.0ms)[0m [1mUPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 819[0m [["params", {:listing_id=>1}], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNewPostNotification Load (0.5ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.7ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 799 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00], ["state", "pending"], ["target_id", 799], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 800 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "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, 09 Oct 2014 06:39:52 UTC +00:00], ["state", "pending"], ["target_id", 800], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.4ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 800 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (2.2ms)[0m [1mSELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 800 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 821)[0m
+ [1m[35mNotifyUser::BaseNotification Load (0.9ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 821]]
+ [1m[36mUser Load (0.7ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 800]]
+ [1m[35mNotifyUser::BaseNotification Load (0.5ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 800 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 800]]
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 800 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.9ms)[0m UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 821 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::BaseNotification Load (9.5ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 821 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
+ [1m[36mUser Load (0.6ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 800]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 800 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
+ [1m[36mNewPostNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 821 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 800]]
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 800 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.3ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 801 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00], ["state", "pending"], ["target_id", 801], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 801 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m 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" = 801 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 822)
+ [1m[36mNotifyUser::BaseNotification Load (0.5ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1[0m [["id", 822]]
+ [1m[35mUser Load (0.5ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 801]]
+ [1m[36mNotifyUser::BaseNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 801 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 801]]
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 801 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (1.7ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 822[0m [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[35m (0.4ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::BaseNotification Load (0.7ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 822 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+ [1m[35mUser Load (0.6ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 801]]
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 801 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'[0m
+ [1m[35mNewPostNotification Load (0.5ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 822 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 801]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 801 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 802 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "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, 09 Oct 2014 06:39:52 UTC +00:00], ["state", "pending"], ["target_id", 802], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.7ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 802 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 802 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 823)[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 802 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "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, 09 Oct 2014 06:39:52 UTC +00:00], ["state", "pending"], ["target_id", 802], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m 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" = 802 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 824)
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 803 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "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, 09 Oct 2014 06:39:52 UTC +00:00], ["state", "pending"], ["target_id", 803], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 803 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "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, 09 Oct 2014 06:39:52 UTC +00:00], ["state", "pending"], ["target_id", 803], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNewPostNotification Load (0.7ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 826]]
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 803]]
+ [1m[35mNewPostNotification Load (0.6ms)[0m 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" = 803 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 803]]
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 803 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.9ms)[0m UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 825 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 803]]
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 803 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (1.1ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 826[0m [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 803 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'[0m
+ [1m[35mNotifyUser::UserHash Load (0.9ms)[0m SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 803 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
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Exists (0.4ms)[0m SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'z2vUTm9cj4XwAmXojxgqlQjP27h1swHJRFgXsPQ9VewQ' LIMIT 1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00], ["target_id", 803], ["target_type", "User"], ["token", "z2vUTm9cj4XwAmXojxgqlQjP27h1swHJRFgXsPQ9VewQ"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+
+Sent mail to user@example.com (8.4ms)
+Date: Thu, 09 Oct 2014 17:39:52 +1100
+From: please-change-me-at-config-initializers-notify-user@example.com
+To: user@example.com
+Message-ID: <54362db843081_1d393febf1465bf073661@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=3Dz2vUTm9cj4XwAmXojxgqlQjP27h1swHJRFgXsPQ9VewQ&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>=
+
+ [1m[36m (0.4ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 804 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "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, 09 Oct 2014 06:39:52 UTC +00:00], ["state", "pending"], ["target_id", 804], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNewPostNotification Load (0.6ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 827]]
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 804]]
+ [1m[35mNewPostNotification Load (0.6ms)[0m 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" = 804 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 804]]
+ [1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 804 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.8ms)[0m UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 827 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNewPostNotification Load (0.5ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 827 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 804]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 804 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
+ [1m[36mNotifyUser::UserHash Load (0.7ms)[0m [1mSELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 804 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[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Exists (0.4ms)[0m [1mSELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'Q-swfPOzfxSe0mePHMxS1Q5Cd3nNZ45wroaYa0NbJJKQ' LIMIT 1[0m
+ [1m[35mSQL (0.6ms)[0m 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, 09 Oct 2014 06:39:52 UTC +00:00], ["target_id", 804], ["target_type", "User"], ["token", "Q-swfPOzfxSe0mePHMxS1Q5Cd3nNZ45wroaYa0NbJJKQ"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+
+Sent mail to user@example.com (6.7ms)
+Date: Thu, 09 Oct 2014 17:39:52 +1100
+From: please-change-me-at-config-initializers-notify-user@example.com
+To: user@example.com
+Message-ID: <54362db84dd73_1d393febf1465bf0737ab@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=3DQ-swfPOzfxSe0mePHMxS1Q5Cd3nNZ45wroaYa0NbJJKQ&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>=
+
+ [1m[35m (0.7ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 804 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.3ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Exists (0.5ms)[0m [1mSELECT 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" = 805) LIMIT 1[0m
+ [1m[35mSQL (0.6ms)[0m 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, 09 Oct 2014 06:39:52 UTC +00:00], ["target_id", 805], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 805 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.3ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36mNotifyUser::BaseNotification Load (0.5ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" IS NULL ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 806 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00], ["state", "pending"], ["target_id", 806], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::BaseNotification Load (0.5ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 828 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 806]]
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 806 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 807 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00], ["state", "pending"], ["target_id", 807], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 807 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00], ["state", "pending"], ["target_id", 807], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::BaseNotification Load (0.5ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1[0m [["id", 830]]
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 807]]
+ [1m[36mNotifyUser::BaseNotification Load (0.9ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 807 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mUser Load (0.5ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 807]]
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 807 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.9ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 829[0m [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 807]]
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 807 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.8ms)[0m UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 830 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 807 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
+ [1m[36m (0.4ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 808 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "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, 09 Oct 2014 06:39:52 UTC +00:00], ["state", "pending"], ["target_id", 808], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::BaseNotification Load (0.5ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 831]]
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 808]]
+ [1m[35mNotifyUser::BaseNotification Load (0.6ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 808 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 808]]
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 808 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.9ms)[0m UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 831 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::BaseNotification Load (0.7ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 831 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 808]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 808 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
+ [1m[36m (0.4ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 809 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "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, 09 Oct 2014 06:39:52 UTC +00:00], ["state", "pending"], ["target_id", 809], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 809 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 809 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 809 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.8ms)[0m UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 832 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNewPostNotification Load (0.6ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 832 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 809]]
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 809 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
+ [1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 809 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.8ms)[0m 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" = 810) LIMIT 1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00], ["target_id", 810], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 810 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.3ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 810 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 810 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.5ms)[0m 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" = 811) LIMIT 1
+ [1m[36m (0.3ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 811 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "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, 09 Oct 2014 06:39:52 UTC +00:00], ["state", "pending"], ["target_id", 811], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 811 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 811 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 811 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.9ms)[0m UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 833 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNewPostNotification Load (0.6ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 833 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 811]]
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 811 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
+ [1m[36m (0.8ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 812 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "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, 09 Oct 2014 06:39:52 UTC +00:00], ["state", "pending"], ["target_id", 812], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Load (0.7ms)[0m SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 812 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
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Exists (0.4ms)[0m SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '2nMQO7W9NNM8XuHUj8WuyQMBnu9wL1hY08lokplg8Npw' LIMIT 1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00], ["target_id", 812], ["target_type", "User"], ["token", "2nMQO7W9NNM8XuHUj8WuyQMBnu9wL1hY08lokplg8Npw"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 813 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "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, 09 Oct 2014 06:39:52 UTC +00:00], ["state", "pending"], ["target_id", 813], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Load (0.6ms)[0m SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 813 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
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Exists (0.5ms)[0m SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '8Gyp8WqJzC6WoxKFCK5YEAdE4fAhpyMrbIFme-l44tXw' LIMIT 1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00], ["target_id", 813], ["target_type", "User"], ["token", "8Gyp8WqJzC6WoxKFCK5YEAdE4fAhpyMrbIFme-l44tXw"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Load (0.8ms)[0m [1mSELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 813 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[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 814 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00], ["state", "pending"], ["target_id", 814], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Load (0.6ms)[0m [1mSELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 814 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[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Exists (0.4ms)[0m [1mSELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '4T1McEoLjS9a5dzRMBeD8QFjDULvWNsmng-DAtYDOGkw' LIMIT 1[0m
+ [1m[35mSQL (0.5ms)[0m 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, 09 Oct 2014 06:39:52 UTC +00:00], ["target_id", 814], ["target_type", "User"], ["token", "4T1McEoLjS9a5dzRMBeD8QFjDULvWNsmng-DAtYDOGkw"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.8ms)[0m [1mUPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 228[0m [["active", false], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Load (0.9ms)[0m [1mSELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 814 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[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Exists (0.5ms)[0m [1mSELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'phRjWqulSWPO59p5M-YorALpriH3MED1-iIXBe4VIrXQ' LIMIT 1[0m
+ [1m[35mSQL (0.4ms)[0m 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, 09 Oct 2014 06:39:52 UTC +00:00], ["target_id", 814], ["target_type", "User"], ["token", "phRjWqulSWPO59p5M-YorALpriH3MED1-iIXBe4VIrXQ"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.3ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.5ms)[0m 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" = 815) LIMIT 1
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00], ["target_id", 815], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.6ms)[0m SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 188 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 815) LIMIT 1
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 815 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Exists (0.4ms)[0m [1mSELECT 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" = 816) LIMIT 1[0m
+ [1m[35mSQL (0.5ms)[0m 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, 09 Oct 2014 06:39:52 UTC +00:00], ["target_id", 816], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Exists (0.5ms)[0m [1mSELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 189 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 816) LIMIT 1[0m
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 816 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.5ms)[0m 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" = 817) LIMIT 1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00], ["target_id", 817], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.6ms)[0m SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 190 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 817) LIMIT 1
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Exists (0.5ms)[0m [1mSELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'UnsubscribableNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 817) LIMIT 1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Load (0.7ms)[0m [1mSELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" ORDER BY "notify_user_unsubscribes"."id" DESC LIMIT 1[0m
+ [1m[35m (0.4ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.5ms)[0m 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" = 818) LIMIT 1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00], ["target_id", 818], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.7ms)[0m SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 191 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 818) LIMIT 1
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Exists (0.5ms)[0m [1mSELECT 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" = 818) LIMIT 1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 818 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mNotifyUser::Unsubscribe Load (0.4ms)[0m SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 818 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 191]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Load (0.4ms)[0m SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 818 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 819 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.5ms)[0m 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, 09 Oct 2014 06:39:52 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 819], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Exists (0.5ms)[0m SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'S1r-vzaNt01fjKdFl07kpQJKKLFZ9jSxZhxRKT050Qrg' LIMIT 1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00], ["target_id", 820], ["target_type", "User"], ["token", "S1r-vzaNt01fjKdFl07kpQJKKLFZ9jSxZhxRKT050Qrg"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Exists (0.6ms)[0m [1mSELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'S1r-vzaNt01fjKdFl07kpQJKKLFZ9jSxZhxRKT050Qrg' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Exists (0.5ms)[0m SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'ONmPK4gh_VU0QooDZiOz9gnsL4uhP0VssnGQU3fn87gg' LIMIT 1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00], ["target_id", 821], ["target_type", "User"], ["token", "ONmPK4gh_VU0QooDZiOz9gnsL4uhP0VssnGQU3fn87gg"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.7ms)[0m UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 231 [["active", false], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Exists (0.7ms)[0m SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'ONmPK4gh_VU0QooDZiOz9gnsL4uhP0VssnGQU3fn87gg' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Exists (0.4ms)[0m [1mSELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'iq6-JnNXZWzc8N2DZyFqewTnlLrRNOovCvHfsk3qAwgw' LIMIT 1[0m
+ [1m[35mSQL (0.5ms)[0m 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, 09 Oct 2014 06:39:52 UTC +00:00], ["target_id", 822], ["target_type", "User"], ["token", "iq6-JnNXZWzc8N2DZyFqewTnlLrRNOovCvHfsk3qAwgw"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (1.1ms)[0m [1mUPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 232[0m [["active", false], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Exists (0.5ms)[0m [1mSELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'QnoLjZxCo_BvGRGhT-KQDgjQfVodEWam1IONPrvq6a4g' LIMIT 1[0m
+ [1m[35mSQL (0.7ms)[0m 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, 09 Oct 2014 06:39:52 UTC +00:00], ["target_id", 823], ["target_type", "User"], ["token", "QnoLjZxCo_BvGRGhT-KQDgjQfVodEWam1IONPrvq6a4g"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:39:52 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.3ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (5.1ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+Processing by NotifyUser::NotificationsController#index as HTML
+ Rendered /Users/william/Papercloud/notify_user/app/views/notify_user/base_notifications/index.html.erb within layouts/application (0.3ms)
+Completed 200 OK in 10ms (Views: 7.8ms | ActiveRecord: 0.0ms)
+ [1m[36m (0.4ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.3ms)[0m BEGIN
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (1.1ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 825 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (1.4ms)[0m 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, 09 Oct 2014 06:40:30 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 825], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+Processing by NotifyUser::NotificationsController#index as JSON
+ [1m[35m (0.9ms)[0m SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 825 AND "notify_user_notifications"."target_type" = 'User'
+ [1m[36mNotifyUser::BaseNotification Load (1.4ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 825 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0[0m
+Completed 200 OK in 17ms (Views: 7.4ms | ActiveRecord: 2.3ms)
+ [1m[35m (0.4ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 826 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 826], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 826 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 826], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 826 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.7ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 826], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+Processing by NotifyUser::NotificationsController#index as HTML
+ [1m[36mNotifyUser::BaseNotification Load (0.7ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 826 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0[0m
+Completed 200 OK in 26ms (Views: 24.1ms | ActiveRecord: 0.7ms)
+ [1m[35m (0.4ms)[0m ROLLBACK
+ [1m[36m (0.3ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.7ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 827 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 827], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 827 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 827], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 827 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 827], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+Processing by NotifyUser::NotificationsController#read as HTML
+ Parameters: {"id"=>"842"}
+ [1m[36mNotifyUser::BaseNotification Load (1.1ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 827 AND "notify_user_notifications"."target_type" = 'User' AND (id = '842') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mUser Load (0.9ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 827]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 827 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (1.2ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 842[0m [["state", "read"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+Completed 200 OK in 18ms (Views: 1.6ms | ActiveRecord: 4.2ms)
+ [1m[36mNotifyUser::BaseNotification Load (0.7ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 842 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 828 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 828], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 828 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 828], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 828 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 828], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+Processing by NotifyUser::NotificationsController#read as HTML
+ Parameters: {"id"=>"845"}
+ [1m[36mNotifyUser::BaseNotification Load (0.7ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 828 AND "notify_user_notifications"."target_type" = 'User' AND (id = '845') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mUser Load (0.5ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 828]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 828 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.9ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 845[0m [["state", "read"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+Completed 200 OK in 9ms (Views: 0.5ms | ActiveRecord: 3.1ms)
+Processing by NotifyUser::NotificationsController#read as HTML
+ Parameters: {"id"=>"845"}
+ [1m[36mNotifyUser::BaseNotification Load (0.7ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 828 AND "notify_user_notifications"."target_type" = 'User' AND (id = '845') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 3.8ms)
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 829 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 829], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (1.0ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 829 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.7ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 829], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 829 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 829], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+Processing by NotifyUser::NotificationsController#mark_all as HTML
+ [1m[36mSQL (1.1ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 829 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('pending','sent'))[0m
+Redirected to http://test.host/notify_user/notifications
+Completed 302 Found in 3ms (ActiveRecord: 1.1ms)
+ [1m[35mNotifyUser::BaseNotification Load (0.5ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 829 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('["pending","sent"]'))
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.4ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.7ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 830 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.6ms)[0m 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, 09 Oct 2014 06:40:30 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 830], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+Processing by NotifyUser::NotificationsController#mark_read as HTML
+ Parameters: {"ids"=>["851"]}
+ [1m[35mSQL (0.6ms)[0m UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 830 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('851'))
+ [1m[36mNotifyUser::BaseNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 830 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('851'))[0m
+Completed 200 OK in 5ms (Views: 2.3ms | ActiveRecord: 1.2ms)
+ [1m[35mNewPostNotification Load (1.0ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 851]]
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 831 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.6ms)[0m 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, 09 Oct 2014 06:40:30 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 831], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+Processing by NotifyUser::NotificationsController#mark_read as HTML
+ Parameters: {"ids"=>["852"]}
+ [1m[35mSQL (0.7ms)[0m UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 831 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('852'))
+ [1m[36mNotifyUser::BaseNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 831 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('852'))[0m
+Completed 200 OK in 5ms (Views: 2.0ms | ActiveRecord: 1.2ms)
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.4ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 832 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 832], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Load (0.5ms)[0m [1mSELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 832 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+Processing by NotifyUser::NotificationsController#subscriptions as HTML
+ Parameters: {"types"=>[{"type"=>"NewPostNotification", "status"=>"0"}]}
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 832 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.7ms)[0m 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" = 832) LIMIT 1
+ [1m[36mSQL (1.5ms)[0m [1mINSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00], ["target_id", 832], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 832 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+Completed 200 OK in 20ms (Views: 0.5ms | ActiveRecord: 3.8ms)
+ [1m[35mNotifyUser::Unsubscribe Load (0.6ms)[0m SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 832 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.4ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.3ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 833 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.5ms)[0m 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, 09 Oct 2014 06:40:30 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 833], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Load (0.5ms)[0m SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 833 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"}]}
+ [1m[36mNotifyUser::Unsubscribe Load (0.6ms)[0m [1mSELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 833 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 833 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 1.0ms)
+ [1m[36mNotifyUser::Unsubscribe Load (0.5ms)[0m [1mSELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 833 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 834 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 834], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+Processing by NotifyUser::NotificationsController#unsubscribe as HTML
+ Parameters: {"type"=>"NewPostNotification"}
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.5ms)[0m 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" = 834) LIMIT 1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00], ["target_id", 834], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+Redirected to http://test.host/notify_user/notifications/unsubscribe
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 834 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+Completed 302 Found in 7ms (ActiveRecord: 2.2ms)
+ [1m[35mNotifyUser::Unsubscribe Load (0.6ms)[0m SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" ORDER BY "notify_user_unsubscribes"."id" DESC LIMIT 1
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.7ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.8ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 835 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.6ms)[0m 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, 09 Oct 2014 06:40:30 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 835], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Exists (0.5ms)[0m [1mSELECT 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" = 835) LIMIT 1[0m
+ [1m[35mSQL (0.6ms)[0m 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, 09 Oct 2014 06:40:30 UTC +00:00], ["target_id", 835], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+Processing by NotifyUser::NotificationsController#subscribe as HTML
+ Parameters: {"type"=>"NewPostNotification"}
+ [1m[35mNotifyUser::Unsubscribe Load (0.6ms)[0m SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 835 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.7ms)[0m DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 194]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+Redirected to http://test.host/notify_user/notifications/unsubscribe
+Completed 302 Found in 4ms (ActiveRecord: 1.7ms)
+ [1m[35mNotifyUser::Unsubscribe Load (0.4ms)[0m SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes"
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 836 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.6ms)[0m 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, 09 Oct 2014 06:40:30 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 836], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Load (1.1ms)[0m SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 836 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
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Exists (0.5ms)[0m SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'mPT6k2h9E4vxluf5uuc8GQPo9Jp9JCYdlrW3rZ4VDtNQ' LIMIT 1
+ [1m[36mSQL (1.2ms)[0m [1mINSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00], ["target_id", 836], ["target_type", "User"], ["token", "mPT6k2h9E4vxluf5uuc8GQPo9Jp9JCYdlrW3rZ4VDtNQ"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+Processing by NotifyUser::NotificationsController#unauth_unsubscribe as HTML
+ Parameters: {"type"=>"NewPostNotification", "token"=>"mPT6k2h9E4vxluf5uuc8GQPo9Jp9JCYdlrW3rZ4VDtNQ"}
+ [1m[36mNotifyUser::UserHash Exists (0.6ms)[0m [1mSELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'mPT6k2h9E4vxluf5uuc8GQPo9Jp9JCYdlrW3rZ4VDtNQ' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1[0m
+ [1m[35mNotifyUser::UserHash Load (0.8ms)[0m SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'mPT6k2h9E4vxluf5uuc8GQPo9Jp9JCYdlrW3rZ4VDtNQ' AND "notify_user_user_hashes"."type" = 'NewPostNotification' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
+ [1m[36mUser Load (0.5ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 836]]
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Exists (0.6ms)[0m [1mSELECT 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" = 836) LIMIT 1[0m
+ [1m[35mSQL (0.6ms)[0m 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, 09 Oct 2014 06:40:30 UTC +00:00], ["target_id", 836], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.8ms)[0m [1mUPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 234[0m [["active", false], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+Completed 200 OK in 13ms (Views: 0.5ms | ActiveRecord: 4.7ms)
+ [1m[36mNotifyUser::UserHash Load (0.6ms)[0m [1mSELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" ORDER BY "notify_user_user_hashes"."id" DESC LIMIT 1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35mNotifyUser::UserHash Load (0.7ms)[0m 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
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Load (0.7ms)[0m [1mSELECT "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[0m
+ [1m[35m (0.4ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.4ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35mNotifyUser::UserHash Load (0.8ms)[0m 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
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Load (0.7ms)[0m [1mSELECT "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[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.3ms)[0m [1mBEGIN[0m
+ [1m[35mNotifyUser::UserHash Load (0.8ms)[0m 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
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Load (0.7ms)[0m [1mSELECT "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[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.4ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 837 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.9ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00], ["state", "pending"], ["target_id", 837], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 837 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('sent','pending'))[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 838 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00], ["state", "pending"], ["target_id", 838], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 839 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "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, 09 Oct 2014 06:40:30 UTC +00:00], ["state", "pending"], ["target_id", 839], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.8ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 840 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.7ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00], ["state", "pending"], ["target_id", 840], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 840 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.9ms)[0m [1mUPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 861[0m [["params", {"listing_id"=>1}], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNewPostNotification Load (0.7ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 841 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.7ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00], ["state", "pending"], ["target_id", 841], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 841 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (1.0ms)[0m [1mUPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 862[0m [["params", {"listing_id"=>1}], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNewPostNotification Load (0.7ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 842 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00], ["state", "pending"], ["target_id", 842], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 842 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (1.2ms)[0m [1mUPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 863[0m [["params", {:listing_id=>1}], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNewPostNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.7ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 843 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00], ["state", "pending"], ["target_id", 843], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 843 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.9ms)[0m [1mUPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 864[0m [["params", {:listing_id=>1}], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNewPostNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 844 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00], ["state", "pending"], ["target_id", 844], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 845 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "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, 09 Oct 2014 06:40:30 UTC +00:00], ["state", "pending"], ["target_id", 845], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 845 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.7ms)[0m [1mSELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 845 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 866)[0m
+ [1m[35mNotifyUser::BaseNotification Load (1.0ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 866]]
+ [1m[36mUser Load (0.5ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 845]]
+ [1m[35mNotifyUser::BaseNotification Load (0.5ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 845 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mUser Load (0.5ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 845]]
+ [1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 845 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.9ms)[0m UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 866 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::BaseNotification Load (11.5ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 866 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
+ [1m[36mUser Load (0.5ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 845]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 845 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
+ [1m[36mNewPostNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 866 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 845]]
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 845 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 846 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00], ["state", "pending"], ["target_id", 846], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 846 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m 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" = 846 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 867)
+ [1m[36mNotifyUser::BaseNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1[0m [["id", 867]]
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 846]]
+ [1m[36mNotifyUser::BaseNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 846 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 846]]
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 846 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.9ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 867[0m [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::BaseNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 867 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 846]]
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 846 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'[0m
+ [1m[35mNewPostNotification Load (0.6ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 867 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 846]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 846 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 847 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "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, 09 Oct 2014 06:40:30 UTC +00:00], ["state", "pending"], ["target_id", 847], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 847 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.8ms)[0m [1mSELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 847 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 868)[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 847 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "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, 09 Oct 2014 06:40:30 UTC +00:00], ["state", "pending"], ["target_id", 847], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.8ms)[0m 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" = 847 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 869)
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 848 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "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, 09 Oct 2014 06:40:30 UTC +00:00], ["state", "pending"], ["target_id", 848], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 848 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "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, 09 Oct 2014 06:40:30 UTC +00:00], ["state", "pending"], ["target_id", 848], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNewPostNotification Load (0.7ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 871]]
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 848]]
+ [1m[35mNewPostNotification Load (0.6ms)[0m 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" = 848 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 848]]
+ [1m[36m (0.9ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 848 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (1.1ms)[0m UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 870 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 848]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 848 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.9ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 871[0m [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 848 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'[0m
+ [1m[35mNotifyUser::UserHash Load (1.0ms)[0m SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 848 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
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Exists (0.5ms)[0m SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'mCWJPzHQ-nVW-gIzPoENCQwVQ4ma24hEdO2dUJoqxonQ' LIMIT 1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00], ["target_id", 848], ["target_type", "User"], ["token", "mCWJPzHQ-nVW-gIzPoENCQwVQ4ma24hEdO2dUJoqxonQ"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+
+Sent mail to user@example.com (7.1ms)
+Date: Thu, 09 Oct 2014 17:40:30 +1100
+From: please-change-me-at-config-initializers-notify-user@example.com
+To: user@example.com
+Message-ID: <54362dded5c90_1d473ff13d865bf068010@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=3DmCWJPzHQ-nVW-gIzPoENCQwVQ4ma24hEdO2dUJoqxonQ&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>=
+
+ [1m[36m (0.4ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 849 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "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, 09 Oct 2014 06:40:30 UTC +00:00], ["state", "pending"], ["target_id", 849], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNewPostNotification Load (0.7ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 872]]
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 849]]
+ [1m[35mNewPostNotification Load (0.5ms)[0m 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" = 849 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 849]]
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 849 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.9ms)[0m UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 872 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNewPostNotification Load (0.7ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 872 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 849]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 849 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
+ [1m[36mNotifyUser::UserHash Load (0.7ms)[0m [1mSELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 849 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[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Exists (0.5ms)[0m [1mSELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'KjymwF-aBJblQHWiOs5PXwwGBP5jvrd7sN7BpypDc2Kw' LIMIT 1[0m
+ [1m[35mSQL (0.6ms)[0m 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, 09 Oct 2014 06:40:30 UTC +00:00], ["target_id", 849], ["target_type", "User"], ["token", "KjymwF-aBJblQHWiOs5PXwwGBP5jvrd7sN7BpypDc2Kw"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+
+Sent mail to user@example.com (7.6ms)
+Date: Thu, 09 Oct 2014 17:40:30 +1100
+From: please-change-me-at-config-initializers-notify-user@example.com
+To: user@example.com
+Message-ID: <54362ddee0c33_1d473ff13d865bf068199@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=3DKjymwF-aBJblQHWiOs5PXwwGBP5jvrd7sN7BpypDc2Kw&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>=
+
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 849 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Exists (0.5ms)[0m [1mSELECT 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" = 850) LIMIT 1[0m
+ [1m[35mSQL (0.5ms)[0m 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, 09 Oct 2014 06:40:30 UTC +00:00], ["target_id", 850], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 850 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36mNotifyUser::BaseNotification Load (0.5ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" IS NULL ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 851 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00], ["state", "pending"], ["target_id", 851], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::BaseNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 873 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 851]]
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 851 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 852 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00], ["state", "pending"], ["target_id", 852], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 852 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00], ["state", "pending"], ["target_id", 852], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNewPostNotification Load (0.7ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1[0m [["id", 875]]
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 852]]
+ [1m[36mNewPostNotification Load (0.6ms)[0m [1mSELECT "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" = 852 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 852]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 852 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (1.0ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 874[0m [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 852]]
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 852 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.9ms)[0m UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 875 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 852 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
+ [1m[36mNotifyUser::UserHash Load (0.7ms)[0m [1mSELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 852 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[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Exists (0.5ms)[0m [1mSELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'iOY_8bQkGtgAvzFebKucrgQnq2uzfV5IFxDsQqfrfz6w' LIMIT 1[0m
+ [1m[35mSQL (0.7ms)[0m 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, 09 Oct 2014 06:40:30 UTC +00:00], ["target_id", 852], ["target_type", "User"], ["token", "iOY_8bQkGtgAvzFebKucrgQnq2uzfV5IFxDsQqfrfz6w"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:30 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+
+Sent mail to user@example.com (5.7ms)
+Date: Thu, 09 Oct 2014 17:40:31 +1100
+From: please-change-me-at-config-initializers-notify-user@example.com
+To: user@example.com
+Message-ID: <54362ddf81c_1d473ff13d865bf068262@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=3DiOY_8bQkGtgAvzFebKucrgQnq2uzfV5IFxDsQqfrfz6w&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>=
+
+ [1m[35m (0.4ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:31 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:31 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 853 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:31 UTC +00:00], ["state", "pending"], ["target_id", 853], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:31 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::BaseNotification Load (0.5ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1[0m [["id", 876]]
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 853]]
+ [1m[36mNotifyUser::BaseNotification Load (0.5ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 853 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 853]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 853 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.9ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 876[0m [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 06:40:31 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::BaseNotification Load (0.7ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 876 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 853]]
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 853 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:31 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:31 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 854 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:31 UTC +00:00], ["state", "pending"], ["target_id", 854], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:31 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.7ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 854 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 854 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 854 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.9ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 877[0m [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 06:40:31 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNewPostNotification Load (0.7ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 877 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 854]]
+ [1m[36m (0.7ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 854 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 854 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:40:31 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:31 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.4ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Exists (0.5ms)[0m [1mSELECT 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" = 855) LIMIT 1[0m
+ [1m[35mSQL (0.5ms)[0m 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, 09 Oct 2014 06:40:31 UTC +00:00], ["target_id", 855], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:31 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.7ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 855 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 855 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 855 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:40:31 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:31 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Exists (0.4ms)[0m [1mSELECT 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" = 856) LIMIT 1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 856 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:31 UTC +00:00], ["state", "pending"], ["target_id", 856], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:31 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 856 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 856 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 856 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (1.1ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 878[0m [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 06:40:31 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNewPostNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 878 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 856]]
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 856 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.7ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:31 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:31 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.7ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 857 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:31 UTC +00:00], ["state", "pending"], ["target_id", 857], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:31 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Load (0.7ms)[0m [1mSELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 857 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[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Exists (0.5ms)[0m [1mSELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'ltdneD7heACt0dOg0nV-LAoVtJ7iZYneFSN_SzV_4txg' LIMIT 1[0m
+ [1m[35mSQL (0.6ms)[0m 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, 09 Oct 2014 06:40:31 UTC +00:00], ["target_id", 857], ["target_type", "User"], ["token", "ltdneD7heACt0dOg0nV-LAoVtJ7iZYneFSN_SzV_4txg"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:31 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:31 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:31 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 858 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:31 UTC +00:00], ["state", "pending"], ["target_id", 858], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:31 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Load (0.6ms)[0m [1mSELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 858 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[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Exists (0.4ms)[0m [1mSELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '-TzD5uLOUIPWqGGIv-lnHQkfkoX9oXJnZbaYli4SLhow' LIMIT 1[0m
+ [1m[35mSQL (0.5ms)[0m 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, 09 Oct 2014 06:40:31 UTC +00:00], ["target_id", 858], ["target_type", "User"], ["token", "-TzD5uLOUIPWqGGIv-lnHQkfkoX9oXJnZbaYli4SLhow"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:31 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Load (0.6ms)[0m SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 858 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
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:40:31 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:31 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.8ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 859 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "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, 09 Oct 2014 06:40:31 UTC +00:00], ["state", "pending"], ["target_id", 859], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:31 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Load (0.7ms)[0m SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 859 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
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Exists (0.4ms)[0m SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'AuULGqjyHuj9dyzYESu1-wqAUJgUAx_Q0uZP5Wtl5OUA' LIMIT 1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:31 UTC +00:00], ["target_id", 859], ["target_type", "User"], ["token", "AuULGqjyHuj9dyzYESu1-wqAUJgUAx_Q0uZP5Wtl5OUA"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:31 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.9ms)[0m UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 240 [["active", false], ["updated_at", Thu, 09 Oct 2014 06:40:31 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Load (0.6ms)[0m SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 859 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
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Exists (0.4ms)[0m SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'GL4ZqfpCJao6q6HScfIMoAUHyAeJOrjtFqz5_lK5GLjg' LIMIT 1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:31 UTC +00:00], ["target_id", 859], ["target_type", "User"], ["token", "GL4ZqfpCJao6q6HScfIMoAUHyAeJOrjtFqz5_lK5GLjg"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:31 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:40:31 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:31 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Exists (0.6ms)[0m [1mSELECT 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" = 860) LIMIT 1[0m
+ [1m[35mSQL (0.5ms)[0m 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, 09 Oct 2014 06:40:31 UTC +00:00], ["target_id", 860], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:31 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Exists (0.6ms)[0m [1mSELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 198 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 860) LIMIT 1[0m
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 860 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:31 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:31 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.5ms)[0m 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" = 861) LIMIT 1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:31 UTC +00:00], ["target_id", 861], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:31 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.5ms)[0m SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 199 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 861) LIMIT 1
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 861 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.3ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:40:31 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:31 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Exists (0.6ms)[0m [1mSELECT 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" = 862) LIMIT 1[0m
+ [1m[35mSQL (0.5ms)[0m 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, 09 Oct 2014 06:40:31 UTC +00:00], ["target_id", 862], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:31 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Exists (0.5ms)[0m [1mSELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 200 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 862) LIMIT 1[0m
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.5ms)[0m SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'UnsubscribableNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 862) LIMIT 1
+ [1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Load (0.5ms)[0m SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" ORDER BY "notify_user_unsubscribes"."id" DESC LIMIT 1
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.7ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:40:31 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:31 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Exists (0.6ms)[0m [1mSELECT 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" = 863) LIMIT 1[0m
+ [1m[35mSQL (0.5ms)[0m 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, 09 Oct 2014 06:40:31 UTC +00:00], ["target_id", 863], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:31 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Exists (0.6ms)[0m [1mSELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 201 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 863) LIMIT 1[0m
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.6ms)[0m 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" = 863) LIMIT 1
+ [1m[36m (0.3ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 863 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mNotifyUser::Unsubscribe Load (0.4ms)[0m [1mSELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 863 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.4ms)[0m [1mDELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1[0m [["id", 201]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Load (0.5ms)[0m [1mSELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 863 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:31 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:31 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 864 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.8ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 06:40:31 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 864], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:31 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:40:31 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:31 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Exists (0.5ms)[0m [1mSELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'NkmhTAzE7DzCRk1KPviLsgUsFOK3pCtd-o2oDP6yL99Q' LIMIT 1[0m
+ [1m[35mSQL (0.5ms)[0m 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, 09 Oct 2014 06:40:31 UTC +00:00], ["target_id", 865], ["target_type", "User"], ["token", "NkmhTAzE7DzCRk1KPviLsgUsFOK3pCtd-o2oDP6yL99Q"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:31 UTC +00:00]]
+ [1m[36m (0.4ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Exists (0.6ms)[0m SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'NkmhTAzE7DzCRk1KPviLsgUsFOK3pCtd-o2oDP6yL99Q' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.3ms)[0m BEGIN
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:40:31 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:31 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Exists (0.6ms)[0m [1mSELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'HiowgXEyfE_smcSshsXF5grJLQAwT79L1d1byXn9847w' LIMIT 1[0m
+ [1m[35mSQL (0.5ms)[0m 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, 09 Oct 2014 06:40:31 UTC +00:00], ["target_id", 866], ["target_type", "User"], ["token", "HiowgXEyfE_smcSshsXF5grJLQAwT79L1d1byXn9847w"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:31 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.8ms)[0m [1mUPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 243[0m [["active", false], ["updated_at", Thu, 09 Oct 2014 06:40:31 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Exists (0.5ms)[0m [1mSELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'HiowgXEyfE_smcSshsXF5grJLQAwT79L1d1byXn9847w' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.7ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:31 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:31 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Exists (0.5ms)[0m SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'hwiqMWolcr13Ca_7evAPLw4t20whqmEWZ9cT-5b_mtGA' LIMIT 1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:31 UTC +00:00], ["target_id", 867], ["target_type", "User"], ["token", "hwiqMWolcr13Ca_7evAPLw4t20whqmEWZ9cT-5b_mtGA"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:31 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.9ms)[0m UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 244 [["active", false], ["updated_at", Thu, 09 Oct 2014 06:40:31 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:31 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:31 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Exists (0.5ms)[0m SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '25losQJvggtgbaBl_1I06AnOES4PglwGJX7ZOmjwYhpg' LIMIT 1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:31 UTC +00:00], ["target_id", 868], ["target_type", "User"], ["token", "25losQJvggtgbaBl_1I06AnOES4PglwGJX7ZOmjwYhpg"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:31 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (6.2ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[35m (0.3ms)[0m 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 18ms (Views: 15.0ms | ActiveRecord: 0.0ms)
+ [1m[36m (0.4ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (2.1ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 870 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (1.3ms)[0m 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, 09 Oct 2014 06:40:44 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 870], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+Processing by NotifyUser::NotificationsController#index as JSON
+ [1m[35m (0.7ms)[0m SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 870 AND "notify_user_notifications"."target_type" = 'User'
+ [1m[36mNotifyUser::BaseNotification Load (1.4ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 870 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0[0m
+Completed 200 OK in 20ms (Views: 11.6ms | ActiveRecord: 2.2ms)
+ [1m[35m (0.4ms)[0m ROLLBACK
+ [1m[36m (0.3ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.7ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 871 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 871], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 871 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 871], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 871 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 871], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+Processing by NotifyUser::NotificationsController#index as HTML
+ [1m[36mNotifyUser::BaseNotification Load (1.0ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 871 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0[0m
+Completed 200 OK in 50ms (Views: 48.0ms | ActiveRecord: 1.0ms)
+ [1m[35m (0.4ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 872 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.7ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 872], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 872 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 872], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 872 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 872], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+Processing by NotifyUser::NotificationsController#read as HTML
+ Parameters: {"id"=>"887"}
+ [1m[36mNotifyUser::BaseNotification Load (0.9ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 872 AND "notify_user_notifications"."target_type" = 'User' AND (id = '887') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mUser Load (0.9ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 872]]
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 872 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (1.3ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 887[0m [["state", "read"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+Completed 200 OK in 22ms (Views: 1.8ms | ActiveRecord: 4.2ms)
+ [1m[36mNotifyUser::BaseNotification Load (1.0ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 887 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 873 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 873], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 873 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 873], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 873 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.5ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 873], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+Processing by NotifyUser::NotificationsController#read as HTML
+ Parameters: {"id"=>"890"}
+ [1m[36mNotifyUser::BaseNotification Load (0.7ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 873 AND "notify_user_notifications"."target_type" = 'User' AND (id = '890') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mUser Load (0.5ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 873]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 873 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.9ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 890[0m [["state", "read"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+Completed 200 OK in 8ms (Views: 0.4ms | ActiveRecord: 3.0ms)
+Processing by NotifyUser::NotificationsController#read as HTML
+ Parameters: {"id"=>"890"}
+ [1m[36mNotifyUser::BaseNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 873 AND "notify_user_notifications"."target_type" = 'User' AND (id = '890') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 3.6ms)
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.7ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 874 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 874], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 874 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 874], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 874 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 874], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+Processing by NotifyUser::NotificationsController#mark_all as HTML
+ [1m[36mSQL (1.2ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 874 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('pending','sent'))[0m
+Redirected to http://test.host/notify_user/notifications
+Completed 302 Found in 3ms (ActiveRecord: 1.2ms)
+ [1m[35mNotifyUser::BaseNotification Load (0.7ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 874 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('["pending","sent"]'))
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 875 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.6ms)[0m 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, 09 Oct 2014 06:40:44 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 875], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+Processing by NotifyUser::NotificationsController#mark_read as HTML
+ Parameters: {"ids"=>["896"]}
+ [1m[35mSQL (0.6ms)[0m UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 875 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('896'))
+ [1m[36mNotifyUser::BaseNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 875 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('896'))[0m
+Completed 200 OK in 4ms (Views: 1.9ms | ActiveRecord: 1.2ms)
+ [1m[35mNewPostNotification Load (1.1ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 896]]
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 876 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.8ms)[0m 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, 09 Oct 2014 06:40:44 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 876], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+Processing by NotifyUser::NotificationsController#mark_read as HTML
+ Parameters: {"ids"=>["897"]}
+ [1m[35mSQL (0.6ms)[0m UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 876 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('897'))
+ [1m[36mNotifyUser::BaseNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 876 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('897'))[0m
+Completed 200 OK in 6ms (Views: 3.4ms | ActiveRecord: 1.2ms)
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.8ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 877 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.7ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 877], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Load (0.5ms)[0m [1mSELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 877 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+Processing by NotifyUser::NotificationsController#subscriptions as HTML
+ Parameters: {"types"=>[{"type"=>"NewPostNotification", "status"=>"0"}]}
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 877 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.6ms)[0m 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" = 877) LIMIT 1
+ [1m[36mSQL (1.1ms)[0m [1mINSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00], ["target_id", 877], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 877 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+Completed 200 OK in 18ms (Views: 0.3ms | ActiveRecord: 3.2ms)
+ [1m[35mNotifyUser::Unsubscribe Load (0.6ms)[0m SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 877 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36m (0.4ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 878 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.5ms)[0m 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, 09 Oct 2014 06:40:44 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 878], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Load (0.6ms)[0m SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 878 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"}]}
+ [1m[36mNotifyUser::Unsubscribe Load (0.6ms)[0m [1mSELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 878 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 878 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 1.1ms)
+ [1m[36mNotifyUser::Unsubscribe Load (0.4ms)[0m [1mSELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 878 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 879 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 879], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+Processing by NotifyUser::NotificationsController#unsubscribe as HTML
+ Parameters: {"type"=>"NewPostNotification"}
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.5ms)[0m 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" = 879) LIMIT 1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00], ["target_id", 879], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+Redirected to http://test.host/notify_user/notifications/unsubscribe
+ [1m[36m (0.7ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 879 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+Completed 302 Found in 7ms (ActiveRecord: 2.3ms)
+ [1m[35mNotifyUser::Unsubscribe Load (0.5ms)[0m SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" ORDER BY "notify_user_unsubscribes"."id" DESC LIMIT 1
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.9ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 880 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.6ms)[0m 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, 09 Oct 2014 06:40:44 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 880], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Exists (0.5ms)[0m [1mSELECT 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" = 880) LIMIT 1[0m
+ [1m[35mSQL (0.5ms)[0m 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, 09 Oct 2014 06:40:44 UTC +00:00], ["target_id", 880], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+Processing by NotifyUser::NotificationsController#subscribe as HTML
+ Parameters: {"type"=>"NewPostNotification"}
+ [1m[35mNotifyUser::Unsubscribe Load (0.6ms)[0m SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 880 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.7ms)[0m DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 204]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+Redirected to http://test.host/notify_user/notifications/unsubscribe
+Completed 302 Found in 4ms (ActiveRecord: 1.7ms)
+ [1m[35mNotifyUser::Unsubscribe Load (0.4ms)[0m SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes"
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.3ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 881 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.6ms)[0m 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, 09 Oct 2014 06:40:44 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 881], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Load (0.9ms)[0m SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 881 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
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Exists (0.6ms)[0m SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'tLGlTeGGZzpcQBSsrXg65QujZCitFPDoUktNgz5mIhoQ' LIMIT 1
+ [1m[36mSQL (1.1ms)[0m [1mINSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00], ["target_id", 881], ["target_type", "User"], ["token", "tLGlTeGGZzpcQBSsrXg65QujZCitFPDoUktNgz5mIhoQ"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+Processing by NotifyUser::NotificationsController#unauth_unsubscribe as HTML
+ Parameters: {"type"=>"NewPostNotification", "token"=>"tLGlTeGGZzpcQBSsrXg65QujZCitFPDoUktNgz5mIhoQ"}
+ [1m[36mNotifyUser::UserHash Exists (0.5ms)[0m [1mSELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'tLGlTeGGZzpcQBSsrXg65QujZCitFPDoUktNgz5mIhoQ' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1[0m
+ [1m[35mNotifyUser::UserHash Load (0.6ms)[0m SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'tLGlTeGGZzpcQBSsrXg65QujZCitFPDoUktNgz5mIhoQ' AND "notify_user_user_hashes"."type" = 'NewPostNotification' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
+ [1m[36mUser Load (0.5ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 881]]
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Exists (0.5ms)[0m [1mSELECT 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" = 881) LIMIT 1[0m
+ [1m[35mSQL (0.5ms)[0m 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, 09 Oct 2014 06:40:44 UTC +00:00], ["target_id", 881], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.8ms)[0m [1mUPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 246[0m [["active", false], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+Completed 200 OK in 12ms (Views: 0.4ms | ActiveRecord: 4.2ms)
+ [1m[36mNotifyUser::UserHash Load (0.5ms)[0m [1mSELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" ORDER BY "notify_user_user_hashes"."id" DESC LIMIT 1[0m
+ [1m[35m (0.4ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35mNotifyUser::UserHash Load (0.8ms)[0m 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
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Load (0.7ms)[0m [1mSELECT "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[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35mNotifyUser::UserHash Load (0.7ms)[0m 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
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Load (0.8ms)[0m [1mSELECT "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[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35mNotifyUser::UserHash Load (0.7ms)[0m 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
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Load (0.6ms)[0m [1mSELECT "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[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 882 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.9ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00], ["state", "pending"], ["target_id", 882], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 882 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('sent','pending'))[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 883 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00], ["state", "pending"], ["target_id", 883], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 884 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "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, 09 Oct 2014 06:40:44 UTC +00:00], ["state", "pending"], ["target_id", 884], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 885 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.7ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00], ["state", "pending"], ["target_id", 885], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 885 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (1.0ms)[0m [1mUPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 906[0m [["params", {"listing_id"=>1}], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNewPostNotification Load (0.9ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 886 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00], ["state", "pending"], ["target_id", 886], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 886 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.9ms)[0m [1mUPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 907[0m [["params", {"listing_id"=>1}], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNewPostNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 887 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00], ["state", "pending"], ["target_id", 887], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 887 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (1.0ms)[0m [1mUPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 908[0m [["params", {:listing_id=>1}], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNewPostNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.7ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 888 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00], ["state", "pending"], ["target_id", 888], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.7ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 888 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (1.0ms)[0m [1mUPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 909[0m [["params", {:listing_id=>1}], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNewPostNotification Load (0.5ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 889 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00], ["state", "pending"], ["target_id", 889], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 890 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "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, 09 Oct 2014 06:40:44 UTC +00:00], ["state", "pending"], ["target_id", 890], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 890 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.8ms)[0m [1mSELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 890 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 911)[0m
+ [1m[35mNotifyUser::BaseNotification Load (1.0ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 911]]
+ [1m[36mUser Load (0.5ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 890]]
+ [1m[35mNotifyUser::BaseNotification Load (0.5ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 890 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mUser Load (0.5ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 890]]
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 890 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.9ms)[0m UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 911 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::BaseNotification Load (9.6ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 911 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
+ [1m[36mUser Load (0.6ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 890]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 890 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
+ [1m[36mNewPostNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 911 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 890]]
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 890 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 891 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00], ["state", "pending"], ["target_id", 891], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 891 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m 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" = 891 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 912)
+ [1m[36mNotifyUser::BaseNotification Load (1.2ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1[0m [["id", 912]]
+ [1m[35mUser Load (0.7ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 891]]
+ [1m[36mNotifyUser::BaseNotification Load (0.8ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 891 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mUser Load (0.5ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 891]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 891 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.9ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 912[0m [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::BaseNotification Load (0.5ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 912 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 891]]
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 891 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'[0m
+ [1m[35mNewPostNotification Load (0.6ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 912 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 891]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 891 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 892 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "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, 09 Oct 2014 06:40:44 UTC +00:00], ["state", "pending"], ["target_id", 892], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 892 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 892 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 913)[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 892 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "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, 09 Oct 2014 06:40:44 UTC +00:00], ["state", "pending"], ["target_id", 892], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m 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" = 892 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 914)
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 893 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "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, 09 Oct 2014 06:40:44 UTC +00:00], ["state", "pending"], ["target_id", 893], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 893 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "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, 09 Oct 2014 06:40:44 UTC +00:00], ["state", "pending"], ["target_id", 893], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNewPostNotification Load (0.7ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 916]]
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 893]]
+ [1m[35mNewPostNotification Load (0.7ms)[0m 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" = 893 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 893]]
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 893 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (1.0ms)[0m UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 915 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 893]]
+ [1m[35m (0.7ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 893 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.9ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 916[0m [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 893 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'[0m
+ [1m[35mNotifyUser::UserHash Load (0.8ms)[0m SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 893 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
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Exists (0.4ms)[0m SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'Tu2LCWAYqsTPvrsqkCkwYwvh0GefZHP2U8MUsO2ZKpxA' LIMIT 1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00], ["target_id", 893], ["target_type", "User"], ["token", "Tu2LCWAYqsTPvrsqkCkwYwvh0GefZHP2U8MUsO2ZKpxA"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+
+Sent mail to user@example.com (8.2ms)
+Date: Thu, 09 Oct 2014 17:40:44 +1100
+From: please-change-me-at-config-initializers-notify-user@example.com
+To: user@example.com
+Message-ID: <54362decd56ac_1d523ffe4cc65be4320ea@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=3DTu2LCWAYqsTPvrsqkCkwYwvh0GefZHP2U8MUsO2ZKpxA&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>=
+
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 894 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "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, 09 Oct 2014 06:40:44 UTC +00:00], ["state", "pending"], ["target_id", 894], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNewPostNotification Load (0.6ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 917]]
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 894]]
+ [1m[35mNewPostNotification Load (0.6ms)[0m 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" = 894 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 894]]
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 894 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (1.0ms)[0m UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 917 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNewPostNotification Load (0.6ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 917 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 894]]
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 894 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
+ [1m[36mNotifyUser::UserHash Load (0.7ms)[0m [1mSELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 894 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[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Exists (0.5ms)[0m [1mSELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'jfrMUtd7GFetAUomJ00TsANuDfrguBjI5fafVxhcSp1A' LIMIT 1[0m
+ [1m[35mSQL (0.6ms)[0m 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, 09 Oct 2014 06:40:44 UTC +00:00], ["target_id", 894], ["target_type", "User"], ["token", "jfrMUtd7GFetAUomJ00TsANuDfrguBjI5fafVxhcSp1A"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+
+Sent mail to user@example.com (6.4ms)
+Date: Thu, 09 Oct 2014 17:40:44 +1100
+From: please-change-me-at-config-initializers-notify-user@example.com
+To: user@example.com
+Message-ID: <54362dece0a2c_1d523ffe4cc65be43211a@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=3DjfrMUtd7GFetAUomJ00TsANuDfrguBjI5fafVxhcSp1A&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>=
+
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 894 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Exists (0.5ms)[0m [1mSELECT 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" = 895) LIMIT 1[0m
+ [1m[35mSQL (0.5ms)[0m 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, 09 Oct 2014 06:40:44 UTC +00:00], ["target_id", 895], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 895 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36mNotifyUser::BaseNotification Load (0.5ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" IS NULL ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 896 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00], ["state", "pending"], ["target_id", 896], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::BaseNotification Load (0.5ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 918 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 896]]
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 896 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 897 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00], ["state", "pending"], ["target_id", 897], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 897 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00], ["state", "pending"], ["target_id", 897], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNewPostNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1[0m [["id", 920]]
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 897]]
+ [1m[36mNewPostNotification Load (0.8ms)[0m [1mSELECT "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" = 897 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 897]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 897 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (1.0ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 919[0m [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mUser Load (0.5ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 897]]
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 897 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.8ms)[0m UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 920 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 897 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
+ [1m[36mNotifyUser::UserHash Load (0.7ms)[0m [1mSELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 897 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[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Exists (0.5ms)[0m [1mSELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'nTz3_CyNHsO50GqlJ0MQggJDC-TtEOQpTBciR7KtfljA' LIMIT 1[0m
+ [1m[35mSQL (0.5ms)[0m 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, 09 Oct 2014 06:40:44 UTC +00:00], ["target_id", 897], ["target_type", "User"], ["token", "nTz3_CyNHsO50GqlJ0MQggJDC-TtEOQpTBciR7KtfljA"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:44 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+
+Sent mail to user@example.com (5.8ms)
+Date: Thu, 09 Oct 2014 17:40:44 +1100
+From: please-change-me-at-config-initializers-notify-user@example.com
+To: user@example.com
+Message-ID: <54362decf36f8_1d523ffe4cc65be4322fe@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=3DnTz3_CyNHsO50GqlJ0MQggJDC-TtEOQpTBciR7KtfljA&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>=
+
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.3ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:45 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:45 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 898 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:45 UTC +00:00], ["state", "pending"], ["target_id", 898], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:45 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNewPostNotification Load (0.5ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1[0m [["id", 921]]
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 898]]
+ [1m[36mNewPostNotification Load (0.6ms)[0m [1mSELECT "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" = 898 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 898]]
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 898 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (1.0ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 921[0m [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 06:40:45 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNewPostNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 921 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 898]]
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 898 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'[0m
+ [1m[35mNotifyUser::UserHash Load (0.7ms)[0m SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 898 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
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Exists (0.4ms)[0m SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'D-hu_i20aN6HJkjoOZ7ooQbUKHyKy7TO-oZB4LuSRyaA' LIMIT 1
+ [1m[36mSQL (0.7ms)[0m [1mINSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:45 UTC +00:00], ["target_id", 898], ["target_type", "User"], ["token", "D-hu_i20aN6HJkjoOZ7ooQbUKHyKy7TO-oZB4LuSRyaA"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:45 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+
+Sent mail to user@example.com (6.6ms)
+Date: Thu, 09 Oct 2014 17:40:45 +1100
+From: please-change-me-at-config-initializers-notify-user@example.com
+To: user@example.com
+Message-ID: <54362ded9e28_1d523ffe4cc65be432385@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=3DD-hu_i20aN6HJkjoOZ7ooQbUKHyKy7TO-oZB4LuSRyaA&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>=
+
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:40:45 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:45 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 899 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "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, 09 Oct 2014 06:40:45 UTC +00:00], ["state", "pending"], ["target_id", 899], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:45 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 899 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 899 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 899 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.9ms)[0m UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 922 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 06:40:45 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNewPostNotification Load (0.7ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 922 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 899]]
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 899 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 899 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:45 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:45 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.5ms)[0m 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" = 900) LIMIT 1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:45 UTC +00:00], ["target_id", 900], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:45 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 900 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.3ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 900 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 900 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:45 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:45 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.6ms)[0m 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" = 901) LIMIT 1
+ [1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 901 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "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, 09 Oct 2014 06:40:45 UTC +00:00], ["state", "pending"], ["target_id", 901], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:45 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 901 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 901 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 901 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.9ms)[0m UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 923 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 06:40:45 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNewPostNotification Load (0.7ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 923 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 901]]
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 901 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:40:45 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:45 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 902 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "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, 09 Oct 2014 06:40:45 UTC +00:00], ["state", "pending"], ["target_id", 902], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:45 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Load (1.0ms)[0m SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 902 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
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Exists (0.4ms)[0m SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'm85qI0bvbfKHhsUgTaW7WgAHNFAQhRW_F3DDudzjqo-g' LIMIT 1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:45 UTC +00:00], ["target_id", 902], ["target_type", "User"], ["token", "m85qI0bvbfKHhsUgTaW7WgAHNFAQhRW_F3DDudzjqo-g"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:45 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:40:45 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:45 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 903 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "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, 09 Oct 2014 06:40:45 UTC +00:00], ["state", "pending"], ["target_id", 903], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:45 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Load (0.7ms)[0m SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 903 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
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Exists (0.4ms)[0m SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '61SnEAK3vNwXM9s6fuJqbAz3OchF4D1B3-o_wBXZ4Z_A' LIMIT 1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:45 UTC +00:00], ["target_id", 903], ["target_type", "User"], ["token", "61SnEAK3vNwXM9s6fuJqbAz3OchF4D1B3-o_wBXZ4Z_A"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:45 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Load (0.6ms)[0m [1mSELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 903 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[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:45 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:45 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 904 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:45 UTC +00:00], ["state", "pending"], ["target_id", 904], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:45 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Load (0.6ms)[0m [1mSELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 904 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[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Exists (0.4ms)[0m [1mSELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '7oXcn9_Ss7jks-tmEzS-kAbc4dloWen8iAXdDv37RmMA' LIMIT 1[0m
+ [1m[35mSQL (0.5ms)[0m 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, 09 Oct 2014 06:40:45 UTC +00:00], ["target_id", 904], ["target_type", "User"], ["token", "7oXcn9_Ss7jks-tmEzS-kAbc4dloWen8iAXdDv37RmMA"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:45 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (1.0ms)[0m [1mUPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 253[0m [["active", false], ["updated_at", Thu, 09 Oct 2014 06:40:45 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Load (0.6ms)[0m [1mSELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 904 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[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Exists (0.6ms)[0m [1mSELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'PIDxvTDGPWumINaboRWoWwHgFVLP65Fei-QKCxRi97UA' LIMIT 1[0m
+ [1m[35mSQL (0.5ms)[0m 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, 09 Oct 2014 06:40:45 UTC +00:00], ["target_id", 904], ["target_type", "User"], ["token", "PIDxvTDGPWumINaboRWoWwHgFVLP65Fei-QKCxRi97UA"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:45 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:45 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:45 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.6ms)[0m 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" = 905) LIMIT 1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:45 UTC +00:00], ["target_id", 905], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:45 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.7ms)[0m SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 208 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 905) LIMIT 1
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 905 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:40:45 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:45 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Exists (0.5ms)[0m [1mSELECT 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" = 906) LIMIT 1[0m
+ [1m[35mSQL (0.5ms)[0m 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, 09 Oct 2014 06:40:45 UTC +00:00], ["target_id", 906], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:45 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Exists (0.5ms)[0m [1mSELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 209 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 906) LIMIT 1[0m
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 906 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.3ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:45 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:45 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.7ms)[0m 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" = 907) LIMIT 1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:45 UTC +00:00], ["target_id", 907], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:45 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.7ms)[0m SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 210 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 907) LIMIT 1
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Exists (0.6ms)[0m [1mSELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'UnsubscribableNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 907) LIMIT 1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Load (0.5ms)[0m [1mSELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" ORDER BY "notify_user_unsubscribes"."id" DESC LIMIT 1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:45 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:45 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.6ms)[0m 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" = 908) LIMIT 1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:45 UTC +00:00], ["target_id", 908], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:45 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.5ms)[0m SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 211 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 908) LIMIT 1
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Exists (0.5ms)[0m [1mSELECT 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" = 908) LIMIT 1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 908 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mNotifyUser::Unsubscribe Load (0.5ms)[0m SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 908 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 211]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Load (0.5ms)[0m SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 908 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:40:45 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:45 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 909 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.6ms)[0m 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, 09 Oct 2014 06:40:45 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 909], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:45 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:45 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:45 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Exists (0.5ms)[0m SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '2m0WGrvKkMmxiuCF-WKYZwx7ObGcX91YmDpx3I7ayQYQ' LIMIT 1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:45 UTC +00:00], ["target_id", 910], ["target_type", "User"], ["token", "2m0WGrvKkMmxiuCF-WKYZwx7ObGcX91YmDpx3I7ayQYQ"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:45 UTC +00:00]]
+ [1m[35m (0.4ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Exists (0.5ms)[0m [1mSELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '2m0WGrvKkMmxiuCF-WKYZwx7ObGcX91YmDpx3I7ayQYQ' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:45 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:45 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Exists (0.4ms)[0m SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'yXhajMC1tj5GfvkyrlOMgQpCeZgU-DZpXwuM7XX2u0ug' LIMIT 1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:40:45 UTC +00:00], ["target_id", 911], ["target_type", "User"], ["token", "yXhajMC1tj5GfvkyrlOMgQpCeZgU-DZpXwuM7XX2u0ug"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:45 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.8ms)[0m UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 256 [["active", false], ["updated_at", Thu, 09 Oct 2014 06:40:45 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Exists (0.4ms)[0m SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'yXhajMC1tj5GfvkyrlOMgQpCeZgU-DZpXwuM7XX2u0ug' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:40:45 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:45 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Exists (0.4ms)[0m [1mSELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'jWU9rA1vkey3th_3Tjb-OQ8OaiaKxhv_sve5KLOb0Clg' LIMIT 1[0m
+ [1m[35mSQL (0.5ms)[0m 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, 09 Oct 2014 06:40:45 UTC +00:00], ["target_id", 912], ["target_type", "User"], ["token", "jWU9rA1vkey3th_3Tjb-OQ8OaiaKxhv_sve5KLOb0Clg"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:45 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.8ms)[0m [1mUPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 257[0m [["active", false], ["updated_at", Thu, 09 Oct 2014 06:40:45 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:40:45 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:40:45 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Exists (0.5ms)[0m [1mSELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'jUJu9BBYeX3Wkjal_CBj6AEbBar7sLYkHm-SawcFVsAg' LIMIT 1[0m
+ [1m[35mSQL (0.5ms)[0m 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, 09 Oct 2014 06:40:45 UTC +00:00], ["target_id", 913], ["target_type", "User"], ["token", "jUJu9BBYeX3Wkjal_CBj6AEbBar7sLYkHm-SawcFVsAg"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:40:45 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35m (0.1ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35m (0.1ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35m (0.1ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35m (0.1ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35m (0.1ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.4ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (5.9ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:41:45 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:41:45 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (1.6ms)[0m 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" = 914) LIMIT 1
+ [1m[36m (0.3ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.7ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 914 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (1.2ms)[0m INSERT INTO "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, 09 Oct 2014 06:41:45 UTC +00:00], ["state", "pending"], ["target_id", 914], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:41:45 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 914 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 914 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 914 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (1.2ms)[0m UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 928 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 06:41:45 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNewPostNotification Load (0.8ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 928 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
+ [1m[36mUser Load (1.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 914]]
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 914 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'
+ [1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 914 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.4ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (5.9ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:42:39 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:42:39 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (1.5ms)[0m 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" = 915) LIMIT 1
+ [1m[36m (0.3ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.4ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 915 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (1.2ms)[0m INSERT INTO "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, 09 Oct 2014 06:42:39 UTC +00:00], ["state", "pending"], ["target_id", 915], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:42:39 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 915 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 915 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 915 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 915 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (1.5ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 929[0m [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 06:42:39 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNewPostNotification Load (0.9ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 929 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+ [1m[35mUser Load (1.0ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 915]]
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 915 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'[0m
+ [1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 915 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.4ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (5.2ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:43:09 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:43:09 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (2.2ms)[0m 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" = 916) LIMIT 1
+ [1m[36m (0.4ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 916 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (1.1ms)[0m INSERT INTO "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, 09 Oct 2014 06:43:09 UTC +00:00], ["state", "pending"], ["target_id", 916], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:43:09 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 916 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 916 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.4ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (5.2ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:43:43 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:43:43 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (1.5ms)[0m 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" = 917) LIMIT 1
+ [1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 917 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (1.1ms)[0m INSERT INTO "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, 09 Oct 2014 06:43:43 UTC +00:00], ["state", "pending"], ["target_id", 917], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:43:43 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 917 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 917 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 917 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (1.3ms)[0m UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 931 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 06:43:43 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNewPostNotification Load (1.0ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 931 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (5.7ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:43:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:43:52 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (1.5ms)[0m 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" = 918) LIMIT 1
+ [1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 918 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (1.2ms)[0m INSERT INTO "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, 09 Oct 2014 06:43:52 UTC +00:00], ["state", "pending"], ["target_id", 918], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:43:52 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 918 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 918 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 918 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (1.3ms)[0m UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 932 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 06:43:52 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNewPostNotification Load (0.9ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 932 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
+ [1m[36mUser Load (1.0ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 918]]
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 918 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 918 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (5.0ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:44:11 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:44:11 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (1.4ms)[0m 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" = 919) LIMIT 1
+ [1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 919 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (1.1ms)[0m INSERT INTO "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, 09 Oct 2014 06:44:11 UTC +00:00], ["state", "pending"], ["target_id", 919], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:44:11 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 919 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 919 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 919 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (1.4ms)[0m UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 933 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 06:44:11 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNewPostNotification Load (1.0ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 933 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
+ [1m[36m (0.4ms)[0m [1mROLLBACK[0m
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (4.8ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:44:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:44:20 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (1.7ms)[0m 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" = 920) LIMIT 1
+ [1m[36m (0.3ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 920 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (1.2ms)[0m INSERT INTO "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, 09 Oct 2014 06:44:20 UTC +00:00], ["state", "pending"], ["target_id", 920], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:44:20 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 920 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 920 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 920 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (1.0ms)[0m UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 934 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 06:44:20 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNewPostNotification Load (0.8ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 934 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
+ [1m[36mUser Load (1.0ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 920]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 920 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 920 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.4ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (6.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:44:51 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:44:51 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (1.6ms)[0m 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" = 921) LIMIT 1
+ [1m[36m (0.3ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 921 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (1.0ms)[0m INSERT INTO "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, 09 Oct 2014 06:44:51 UTC +00:00], ["state", "pending"], ["target_id", 921], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:44:51 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 921 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 921 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 921 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (1.5ms)[0m UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 935 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 06:44:51 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNewPostNotification Load (0.9ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 935 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
+ [1m[36mUser Load (0.9ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 921]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 921 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 921 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'[0m
+ [1m[35m (0.4ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.4ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (6.2ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:45:15 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:45:15 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (1.6ms)[0m 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" = 922) LIMIT 1
+ [1m[36m (0.3ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.7ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 922 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (1.1ms)[0m INSERT INTO "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, 09 Oct 2014 06:45:15 UTC +00:00], ["state", "pending"], ["target_id", 922], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:45:15 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 922 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 922 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 922 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (1.3ms)[0m UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 936 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 06:45:15 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNewPostNotification Load (1.5ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 936 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
+ [1m[36mUser Load (1.0ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 922]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 922 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 922 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'[0m
+ [1m[35m (0.4ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.5ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (6.2ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:45:33 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:45:33 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (1.4ms)[0m 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" = 923) LIMIT 1
+ [1m[36m (0.3ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 923 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (1.2ms)[0m INSERT INTO "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, 09 Oct 2014 06:45:33 UTC +00:00], ["state", "pending"], ["target_id", 923], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:45:33 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 923 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 923 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 923 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (1.4ms)[0m UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 937 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 06:45:33 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNewPostNotification Load (0.8ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 937 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
+ [1m[36mUser Load (1.8ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 923]]
+ [1m[35m (0.8ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 923 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'
+ [1m[36m (0.8ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 923 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (6.1ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:45:44 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:45:44 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (1.5ms)[0m 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" = 924) LIMIT 1
+ [1m[36m (0.3ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.7ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 924 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (1.2ms)[0m INSERT INTO "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, 09 Oct 2014 06:45:44 UTC +00:00], ["state", "pending"], ["target_id", 924], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:45:44 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 924 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 924 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 924 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (1.2ms)[0m UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 938 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 06:45:44 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNewPostNotification Load (1.2ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 938 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
+ [1m[36mUser Load (1.0ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 924]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 924 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'
+ [1m[36m (1.0ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 924 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'[0m
+ [1m[35m (0.6ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (5.9ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:45:53 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:45:53 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.4ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (1.5ms)[0m 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" = 925) LIMIT 1
+ [1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.7ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 925 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (1.5ms)[0m INSERT INTO "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, 09 Oct 2014 06:45:53 UTC +00:00], ["state", "pending"], ["target_id", 925], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:45:53 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 925 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 925 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 925 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (1.5ms)[0m UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 939 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 06:45:53 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNewPostNotification Load (1.0ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 939 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
+ [1m[36mUser Load (1.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 925]]
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 925 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 925 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (5.8ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:46:07 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:46:07 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (1.3ms)[0m 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" = 926) LIMIT 1
+ [1m[36m (0.3ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Exists (0.4ms)[0m [1mSELECT 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" = 926) LIMIT 1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.5ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (6.2ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:47:11 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:47:11 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (1.5ms)[0m 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" = 927) LIMIT 1
+ [1m[36m (0.3ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Exists (0.5ms)[0m [1mSELECT 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" = 927) LIMIT 1[0m
+ [1m[35m (0.4ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36m (0.4ms)[0m [1mROLLBACK[0m
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (5.3ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:48:21 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:48:21 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (1.6ms)[0m 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" = 928) LIMIT 1
+ [1m[36mSQL (1.7ms)[0m [1mINSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:48:21 UTC +00:00], ["target_id", 928], ["target_type", "User"], ["type", "action_mailer"], ["updated_at", Thu, 09 Oct 2014 06:48:21 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.7ms)[0m SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'action_mailer' AND "notify_user_unsubscribes"."id" != 212 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 928) LIMIT 1
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.7ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 928 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (2.0ms)[0m INSERT INTO "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, 09 Oct 2014 06:48:21 UTC +00:00], ["state", "pending"], ["target_id", 928], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:48:21 UTC +00:00]]
+ [1m[36m (1.5ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.8ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.8ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 928 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 928 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 928 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (1.4ms)[0m UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 940 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 06:48:21 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNewPostNotification Load (1.0ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 940 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
+ [1m[36mUser Load (0.9ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 928]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 928 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 928 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.3ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (6.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:48:32 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:48:32 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (1.6ms)[0m 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" = 929) LIMIT 1
+ [1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Exists (0.5ms)[0m [1mSELECT 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" = 929) LIMIT 1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (7.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:49:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:49:13 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.4ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (1.5ms)[0m 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" = 930) LIMIT 1
+ [1m[36m (0.3ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Exists (0.5ms)[0m [1mSELECT 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" = 930) LIMIT 1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (6.8ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:49:32 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:49:32 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[36m (0.3ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (7.1ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:49:40 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:49:40 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (7.7ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:50:03 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:50:03 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mROLLBACK[0m
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (6.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:50:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:50:13 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (4.8ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:50:43 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:50:43 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (1.5ms)[0m 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" = 935) LIMIT 1
+ [1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Exists (0.5ms)[0m [1mSELECT 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" = 935) LIMIT 1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (6.4ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:51:07 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:51:07 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.4ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (4.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:51:16 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:51:16 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (1.3ms)[0m 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" = 937) LIMIT 1
+ [1m[36mSQL (1.2ms)[0m [1mINSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:51:16 UTC +00:00], ["target_id", 937], ["target_type", "User"], ["type", "action_mailer"], ["updated_at", Thu, 09 Oct 2014 06:51:16 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.8ms)[0m SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'action_mailer' AND "notify_user_unsubscribes"."id" != 213 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 937) LIMIT 1
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 937 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (1.2ms)[0m INSERT INTO "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, 09 Oct 2014 06:51:16 UTC +00:00], ["state", "pending"], ["target_id", 937], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:51:16 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 937 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 937 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 937 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (1.4ms)[0m UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 941 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 06:51:16 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNewPostNotification Load (1.1ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 941 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
+ [1m[36mUser Load (0.9ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 937]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 937 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 937 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (5.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:51:27 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:51:27 UTC +00:00]]
+ [1m[35m (0.3ms)[0m 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.6ms)
+Completed 200 OK in 17ms (Views: 14.7ms | ActiveRecord: 0.0ms)
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:51:27 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:51:27 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (1.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 939 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (1.6ms)[0m 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, 09 Oct 2014 06:51:27 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 939], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:51:27 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+Processing by NotifyUser::NotificationsController#index as JSON
+ [1m[35m (0.7ms)[0m SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 939 AND "notify_user_notifications"."target_type" = 'User'
+ [1m[36mNotifyUser::BaseNotification Load (1.2ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 939 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0[0m
+Completed 200 OK in 21ms (Views: 12.7ms | ActiveRecord: 1.9ms)
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.8ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:51:27 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:51:27 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 940 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.7ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 06:51:27 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 940], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:51:27 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 940 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 06:51:27 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 940], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:51:27 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 940 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 06:51:27 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 940], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:51:27 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+Processing by NotifyUser::NotificationsController#index as HTML
+ [1m[36mNotifyUser::BaseNotification Load (0.8ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 940 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0[0m
+Completed 200 OK in 43ms (Views: 40.3ms | ActiveRecord: 0.8ms)
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:51:27 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:51:27 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 941 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.7ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 06:51:27 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 941], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:51:27 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 941 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 06:51:27 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 941], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:51:27 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 941 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 06:51:27 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 941], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:51:27 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+Processing by NotifyUser::NotificationsController#read as HTML
+ Parameters: {"id"=>"946"}
+ [1m[36mNotifyUser::BaseNotification Load (1.1ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 941 AND "notify_user_notifications"."target_type" = 'User' AND (id = '946') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mUser Load (1.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 941]]
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 941 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (1.2ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 946[0m [["state", "read"], ["updated_at", Thu, 09 Oct 2014 06:51:27 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+Completed 200 OK in 21ms (Views: 2.2ms | ActiveRecord: 4.6ms)
+ [1m[36mNotifyUser::BaseNotification Load (0.7ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 946 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:51:27 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:51:27 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 942 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 06:51:27 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 942], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:51:27 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 942 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 06:51:27 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 942], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:51:27 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 942 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.7ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 06:51:27 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 942], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:51:27 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+Processing by NotifyUser::NotificationsController#read as HTML
+ Parameters: {"id"=>"949"}
+ [1m[36mNotifyUser::BaseNotification Load (0.7ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 942 AND "notify_user_notifications"."target_type" = 'User' AND (id = '949') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mUser Load (0.5ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 942]]
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 942 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (1.0ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 949[0m [["state", "read"], ["updated_at", Thu, 09 Oct 2014 06:51:27 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+Completed 200 OK in 10ms (Views: 0.5ms | ActiveRecord: 3.2ms)
+Processing by NotifyUser::NotificationsController#read as HTML
+ Parameters: {"id"=>"949"}
+ [1m[36mNotifyUser::BaseNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 942 AND "notify_user_notifications"."target_type" = 'User' AND (id = '949') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+Completed 200 OK in 2ms (Views: 0.3ms | ActiveRecord: 3.8ms)
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 943 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.8ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 943], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 943 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 943], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 943 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 943], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+Processing by NotifyUser::NotificationsController#mark_all as HTML
+ [1m[36mSQL (1.0ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 943 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('pending','sent'))[0m
+Redirected to http://test.host/notify_user/notifications
+Completed 302 Found in 3ms (ActiveRecord: 1.0ms)
+ [1m[35mNotifyUser::BaseNotification Load (0.5ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 943 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('["pending","sent"]'))
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.4ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 944 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.6ms)[0m 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, 09 Oct 2014 06:51:28 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 944], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+Processing by NotifyUser::NotificationsController#mark_read as HTML
+ Parameters: {"ids"=>["955"]}
+ [1m[35mSQL (0.6ms)[0m UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 944 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('955'))
+ [1m[36mNotifyUser::BaseNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 944 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('955'))[0m
+Completed 200 OK in 5ms (Views: 2.3ms | ActiveRecord: 1.3ms)
+ [1m[35mNewPostNotification Load (0.9ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 955]]
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.3ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 945 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.6ms)[0m 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, 09 Oct 2014 06:51:28 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 945], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+Processing by NotifyUser::NotificationsController#mark_read as HTML
+ Parameters: {"ids"=>["956"]}
+ [1m[35mSQL (0.7ms)[0m UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 945 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('956'))
+ [1m[36mNotifyUser::BaseNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 945 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('956'))[0m
+Completed 200 OK in 5ms (Views: 2.4ms | ActiveRecord: 1.3ms)
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 946 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 946], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Load (0.5ms)[0m [1mSELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 946 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+Processing by NotifyUser::NotificationsController#subscriptions as HTML
+ Parameters: {"types"=>[{"type"=>"NewPostNotification", "status"=>"0"}]}
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 946 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.8ms)[0m 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" = 946) LIMIT 1
+ [1m[36mSQL (1.0ms)[0m [1mINSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00], ["target_id", 946], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 946 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+Completed 200 OK in 21ms (Views: 0.3ms | ActiveRecord: 3.5ms)
+ [1m[35mNotifyUser::Unsubscribe Load (0.5ms)[0m SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 946 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.3ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 947 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.6ms)[0m 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, 09 Oct 2014 06:51:28 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 947], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Load (0.5ms)[0m SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 947 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"}]}
+ [1m[36mNotifyUser::Unsubscribe Load (0.5ms)[0m [1mSELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 947 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 947 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+Completed 200 OK in 4ms (Views: 0.4ms | ActiveRecord: 1.1ms)
+ [1m[36mNotifyUser::Unsubscribe Load (0.5ms)[0m [1mSELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 947 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 948 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 948], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+Processing by NotifyUser::NotificationsController#unsubscribe as HTML
+ Parameters: {"type"=>"NewPostNotification"}
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.6ms)[0m 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" = 948) LIMIT 1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00], ["target_id", 948], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+Redirected to http://test.host/notify_user/notifications/unsubscribe
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 948 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+Completed 302 Found in 7ms (ActiveRecord: 2.3ms)
+ [1m[35mNotifyUser::Unsubscribe Load (0.5ms)[0m SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" ORDER BY "notify_user_unsubscribes"."id" DESC LIMIT 1
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.7ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 949 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.7ms)[0m 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, 09 Oct 2014 06:51:28 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 949], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Exists (0.6ms)[0m [1mSELECT 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" = 949) LIMIT 1[0m
+ [1m[35mSQL (0.6ms)[0m 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, 09 Oct 2014 06:51:28 UTC +00:00], ["target_id", 949], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+Processing by NotifyUser::NotificationsController#subscribe as HTML
+ Parameters: {"type"=>"NewPostNotification"}
+ [1m[35mNotifyUser::Unsubscribe Load (0.6ms)[0m SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 949 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.7ms)[0m DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 216]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+Redirected to http://test.host/notify_user/notifications/unsubscribe
+Completed 302 Found in 4ms (ActiveRecord: 1.6ms)
+ [1m[35mNotifyUser::Unsubscribe Load (0.5ms)[0m SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes"
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 950 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.6ms)[0m 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, 09 Oct 2014 06:51:28 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 950], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Load (1.1ms)[0m SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 950 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
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Exists (0.5ms)[0m SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'l7LAcF1a_AxJ8fjGmUVJAQgi72LlfGeD3uOJX4at9oXw' LIMIT 1
+ [1m[36mSQL (1.1ms)[0m [1mINSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00], ["target_id", 950], ["target_type", "User"], ["token", "l7LAcF1a_AxJ8fjGmUVJAQgi72LlfGeD3uOJX4at9oXw"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+Processing by NotifyUser::NotificationsController#unauth_unsubscribe as HTML
+ Parameters: {"type"=>"NewPostNotification", "token"=>"l7LAcF1a_AxJ8fjGmUVJAQgi72LlfGeD3uOJX4at9oXw"}
+ [1m[36mNotifyUser::UserHash Exists (0.6ms)[0m [1mSELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'l7LAcF1a_AxJ8fjGmUVJAQgi72LlfGeD3uOJX4at9oXw' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1[0m
+ [1m[35mNotifyUser::UserHash Load (0.6ms)[0m SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'l7LAcF1a_AxJ8fjGmUVJAQgi72LlfGeD3uOJX4at9oXw' AND "notify_user_user_hashes"."type" = 'NewPostNotification' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
+ [1m[36mUser Load (0.5ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 950]]
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Exists (0.5ms)[0m [1mSELECT 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" = 950) LIMIT 1[0m
+ [1m[35mSQL (0.5ms)[0m 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, 09 Oct 2014 06:51:28 UTC +00:00], ["target_id", 950], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.8ms)[0m [1mUPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 259[0m [["active", false], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+Completed 200 OK in 12ms (Views: 0.3ms | ActiveRecord: 4.4ms)
+ [1m[36mNotifyUser::UserHash Load (0.5ms)[0m [1mSELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" ORDER BY "notify_user_user_hashes"."id" DESC LIMIT 1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35mNotifyUser::UserHash Load (1.0ms)[0m 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
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Load (0.7ms)[0m [1mSELECT "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[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35mNotifyUser::UserHash Load (0.8ms)[0m 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
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Load (0.8ms)[0m [1mSELECT "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[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35mNotifyUser::UserHash Load (0.8ms)[0m 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
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Load (0.7ms)[0m [1mSELECT "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[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 951 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (1.1ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00], ["state", "pending"], ["target_id", 951], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 951 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('sent','pending'))[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 952 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00], ["state", "pending"], ["target_id", 952], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 953 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "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, 09 Oct 2014 06:51:28 UTC +00:00], ["state", "pending"], ["target_id", 953], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 954 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00], ["state", "pending"], ["target_id", 954], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 954 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (1.0ms)[0m [1mUPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 965[0m [["params", {"listing_id"=>1}], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNewPostNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1[0m
+ [1m[35m (0.4ms)[0m ROLLBACK
+ [1m[36m (0.3ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 955 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00], ["state", "pending"], ["target_id", 955], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 955 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (1.1ms)[0m [1mUPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 966[0m [["params", {"listing_id"=>1}], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNewPostNotification Load (0.5ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 956 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00], ["state", "pending"], ["target_id", 956], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 956 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (1.1ms)[0m [1mUPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 967[0m [["params", {:listing_id=>1}], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNewPostNotification Load (0.7ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 957 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00], ["state", "pending"], ["target_id", 957], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 957 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.8ms)[0m [1mUPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 968[0m [["params", {:listing_id=>1}], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNewPostNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 958 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00], ["state", "pending"], ["target_id", 958], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.3ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 959 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "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, 09 Oct 2014 06:51:28 UTC +00:00], ["state", "pending"], ["target_id", 959], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 959 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.7ms)[0m [1mSELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 959 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 970)[0m
+ [1m[35mNotifyUser::BaseNotification Load (0.9ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 970]]
+ [1m[36mUser Load (0.5ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 959]]
+ [1m[35mNotifyUser::BaseNotification Load (0.6ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 959 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 959]]
+ [1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 959 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (1.6ms)[0m UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 970 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[36m (0.6ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::BaseNotification Load (0.9ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 970 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
+ [1m[36mUser Load (0.6ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 959]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 959 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
+ [1m[36mNewPostNotification Load (0.9ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 970 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 959]]
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 959 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 960 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00], ["state", "pending"], ["target_id", 960], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 960 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m 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" = 960 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 971)
+ [1m[36mNotifyUser::BaseNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1[0m [["id", 971]]
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 960]]
+ [1m[36mNotifyUser::BaseNotification Load (0.5ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 960 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 960]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 960 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.9ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 971[0m [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::BaseNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 971 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 960]]
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 960 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'[0m
+ [1m[35mNewPostNotification Load (0.6ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 971 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 960]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 960 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 961 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "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, 09 Oct 2014 06:51:28 UTC +00:00], ["state", "pending"], ["target_id", 961], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.9ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 961 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.7ms)[0m [1mSELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 961 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 972)[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 961 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "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, 09 Oct 2014 06:51:28 UTC +00:00], ["state", "pending"], ["target_id", 961], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m 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" = 961 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 973)
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 962 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "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, 09 Oct 2014 06:51:28 UTC +00:00], ["state", "pending"], ["target_id", 962], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 962 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "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, 09 Oct 2014 06:51:28 UTC +00:00], ["state", "pending"], ["target_id", 962], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNewPostNotification Load (0.6ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 975]]
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 962]]
+ [1m[35mNewPostNotification Load (0.6ms)[0m 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" = 962 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 962]]
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 962 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.9ms)[0m UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 974 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 962]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 962 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.9ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 975[0m [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 962 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'[0m
+ [1m[35mNotifyUser::UserHash Load (0.7ms)[0m SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 962 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
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Exists (0.4ms)[0m SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'rIBZo-J1IpZabcUISK-t-Q-CnRZSpfr0wH84MxPjp0aA' LIMIT 1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00], ["target_id", 962], ["target_type", "User"], ["token", "rIBZo-J1IpZabcUISK-t-Q-CnRZSpfr0wH84MxPjp0aA"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+
+Sent mail to user@example.com (8.9ms)
+Date: Thu, 09 Oct 2014 17:51:28 +1100
+From: please-change-me-at-config-initializers-notify-user@example.com
+To: user@example.com
+Message-ID: <5436307093939_27a23fe63e065be44336f@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=3DrIBZo-J1IpZabcUISK-t-Q-CnRZSpfr0wH84MxPjp0aA&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>=
+
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 963 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "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, 09 Oct 2014 06:51:28 UTC +00:00], ["state", "pending"], ["target_id", 963], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNewPostNotification Load (0.5ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 976]]
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 963]]
+ [1m[35mNewPostNotification Load (0.5ms)[0m 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" = 963 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 963]]
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 963 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.8ms)[0m UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 976 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNewPostNotification Load (0.5ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 976 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 963]]
+ [1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 963 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
+ [1m[36mNotifyUser::UserHash Load (0.8ms)[0m [1mSELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 963 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[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Exists (0.6ms)[0m [1mSELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '3p0lbhUzIwb0SmeG6pKlIA9uVvuwzHgWFEsTxydPbpjA' LIMIT 1[0m
+ [1m[35mSQL (0.6ms)[0m 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, 09 Oct 2014 06:51:28 UTC +00:00], ["target_id", 963], ["target_type", "User"], ["token", "3p0lbhUzIwb0SmeG6pKlIA9uVvuwzHgWFEsTxydPbpjA"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+
+Sent mail to user@example.com (9.6ms)
+Date: Thu, 09 Oct 2014 17:51:28 +1100
+From: please-change-me-at-config-initializers-notify-user@example.com
+To: user@example.com
+Message-ID: <543630709f427_27a23fe63e065be443412@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=3D3p0lbhUzIwb0SmeG6pKlIA9uVvuwzHgWFEsTxydPbpjA&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>=
+
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 963 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Exists (0.4ms)[0m [1mSELECT 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" = 964) LIMIT 1[0m
+ [1m[35mSQL (0.5ms)[0m 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, 09 Oct 2014 06:51:28 UTC +00:00], ["target_id", 964], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 964 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.1ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36mNotifyUser::BaseNotification Load (0.4ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" IS NULL ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 965 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00], ["state", "pending"], ["target_id", 965], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::BaseNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 977 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 965]]
+ [1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 965 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 966 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00], ["state", "pending"], ["target_id", 966], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 966 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00], ["state", "pending"], ["target_id", 966], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNewPostNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1[0m [["id", 979]]
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 966]]
+ [1m[36mNewPostNotification Load (0.5ms)[0m [1mSELECT "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" = 966 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 966]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 966 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.9ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 978[0m [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 966]]
+ [1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 966 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.7ms)[0m UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 979 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 966 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
+ [1m[36mNotifyUser::UserHash Load (0.6ms)[0m [1mSELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 966 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[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Exists (0.4ms)[0m [1mSELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'Xdpgg5HTruZnPGmfTNNWxgFMeBHMRqtxMoLnmUu8zE-A' LIMIT 1[0m
+ [1m[35mSQL (0.5ms)[0m 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, 09 Oct 2014 06:51:28 UTC +00:00], ["target_id", 966], ["target_type", "User"], ["token", "Xdpgg5HTruZnPGmfTNNWxgFMeBHMRqtxMoLnmUu8zE-A"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+
+Sent mail to user@example.com (6.6ms)
+Date: Thu, 09 Oct 2014 17:51:28 +1100
+From: please-change-me-at-config-initializers-notify-user@example.com
+To: user@example.com
+Message-ID: <54363070b1d0f_27a23fe63e065be443510@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=3DXdpgg5HTruZnPGmfTNNWxgFMeBHMRqtxMoLnmUu8zE-A&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>=
+
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 967 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00], ["state", "pending"], ["target_id", 967], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNewPostNotification Load (0.4ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1[0m [["id", 980]]
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 967]]
+ [1m[36mNewPostNotification Load (0.6ms)[0m [1mSELECT "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" = 967 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 967]]
+ [1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 967 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.7ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 980[0m [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNewPostNotification Load (0.5ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 980 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 967]]
+ [1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 967 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'[0m
+ [1m[35mNotifyUser::UserHash Load (0.7ms)[0m SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 967 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
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Exists (0.6ms)[0m SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'KYCd1QfSCxjNfHWZnLN9xgGtItZ8Msx86jPsYSOfn9hQ' LIMIT 1
+ [1m[36mSQL (0.7ms)[0m [1mINSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00], ["target_id", 967], ["target_type", "User"], ["token", "KYCd1QfSCxjNfHWZnLN9xgGtItZ8Msx86jPsYSOfn9hQ"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+
+Sent mail to user@example.com (7.8ms)
+Date: Thu, 09 Oct 2014 17:51:28 +1100
+From: please-change-me-at-config-initializers-notify-user@example.com
+To: user@example.com
+Message-ID: <54363070bb74b_27a23fe63e065be4436bd@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=3DKYCd1QfSCxjNfHWZnLN9xgGtItZ8Msx86jPsYSOfn9hQ&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>=
+
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 968 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "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, 09 Oct 2014 06:51:28 UTC +00:00], ["state", "pending"], ["target_id", 968], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 968 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 968 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 968 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.8ms)[0m UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 981 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNewPostNotification Load (0.6ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 981 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 968]]
+ [1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 968 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
+ [1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 968 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.4ms)[0m 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" = 969) LIMIT 1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00], ["target_id", 969], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 969 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 969 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 969 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.4ms)[0m 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" = 970) LIMIT 1
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00], ["target_id", 970], ["target_type", "User"], ["type", "action_mailer"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.4ms)[0m SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'action_mailer' AND "notify_user_unsubscribes"."id" != 220 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 970) LIMIT 1
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 970 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "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, 09 Oct 2014 06:51:28 UTC +00:00], ["state", "pending"], ["target_id", 970], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 970 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 970 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 970 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.7ms)[0m UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 982 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNewPostNotification Load (0.5ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 982 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 970]]
+ [1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 970 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
+ [1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 970 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 971 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.7ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00], ["state", "pending"], ["target_id", 971], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Load (0.6ms)[0m [1mSELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 971 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[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Exists (0.4ms)[0m [1mSELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'hOzZT4MDZQHGmVWhR5121QF9rQfT8wsfYpZw0fTXTPsQ' LIMIT 1[0m
+ [1m[35mSQL (0.6ms)[0m 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, 09 Oct 2014 06:51:28 UTC +00:00], ["target_id", 971], ["target_type", "User"], ["token", "hOzZT4MDZQHGmVWhR5121QF9rQfT8wsfYpZw0fTXTPsQ"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.8ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 972 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00], ["state", "pending"], ["target_id", 972], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Load (0.6ms)[0m [1mSELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 972 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[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Exists (0.5ms)[0m [1mSELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'GwIavVgecywgyGmn0zDE9weyRTv5no3yRGQ_IrnnN15Q' LIMIT 1[0m
+ [1m[35mSQL (0.5ms)[0m 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, 09 Oct 2014 06:51:28 UTC +00:00], ["target_id", 972], ["target_type", "User"], ["token", "GwIavVgecywgyGmn0zDE9weyRTv5no3yRGQ_IrnnN15Q"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Load (0.6ms)[0m SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 972 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
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 973 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "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, 09 Oct 2014 06:51:28 UTC +00:00], ["state", "pending"], ["target_id", 973], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Load (0.6ms)[0m SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 973 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
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Exists (0.6ms)[0m SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'IPykpY3hHwypVT2CtXpH7wK8uRTPo5jexBHTtuUNYyGA' LIMIT 1
+ [1m[36mSQL (8.8ms)[0m [1mINSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00], ["target_id", 973], ["target_type", "User"], ["token", "IPykpY3hHwypVT2CtXpH7wK8uRTPo5jexBHTtuUNYyGA"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[35m (0.4ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.9ms)[0m UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 266 [["active", false], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Load (0.7ms)[0m SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 973 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
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Exists (0.5ms)[0m SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'DF8b4w_T8u7dG91_o6SxOw5lDjcJ5v88KrdHu54ns98w' LIMIT 1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00], ["target_id", 973], ["target_type", "User"], ["token", "DF8b4w_T8u7dG91_o6SxOw5lDjcJ5v88KrdHu54ns98w"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Exists (0.6ms)[0m [1mSELECT 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" = 974) LIMIT 1[0m
+ [1m[35mSQL (0.5ms)[0m 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, 09 Oct 2014 06:51:28 UTC +00:00], ["target_id", 974], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Exists (0.5ms)[0m [1mSELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 221 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 974) LIMIT 1[0m
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 974 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.3ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.5ms)[0m 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" = 975) LIMIT 1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00], ["target_id", 975], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.6ms)[0m SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 222 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 975) LIMIT 1
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 975 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Exists (0.5ms)[0m [1mSELECT 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" = 976) LIMIT 1[0m
+ [1m[35mSQL (0.5ms)[0m 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, 09 Oct 2014 06:51:28 UTC +00:00], ["target_id", 976], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Exists (0.6ms)[0m [1mSELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 223 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 976) LIMIT 1[0m
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.6ms)[0m SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'UnsubscribableNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 976) LIMIT 1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00], ["target_id", 976], ["target_type", "User"], ["type", "UnsubscribableNotification"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Load (0.4ms)[0m [1mSELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" ORDER BY "notify_user_unsubscribes"."id" DESC LIMIT 1[0m
+ [1m[35m (0.5ms)[0m ROLLBACK
+ [1m[36m (0.3ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.5ms)[0m 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" = 977) LIMIT 1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00], ["target_id", 977], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.5ms)[0m SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 225 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 977) LIMIT 1
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Exists (0.5ms)[0m [1mSELECT 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" = 977) LIMIT 1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 977 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mNotifyUser::Unsubscribe Load (0.4ms)[0m SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 977 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.4ms)[0m DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 225]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Load (0.5ms)[0m SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 977 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 978 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.6ms)[0m 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, 09 Oct 2014 06:51:28 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 978], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Exists (0.6ms)[0m SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '61xlFhBJ2lPqkP88FrI__AmUnAhqaZMBjnIYZYNWSsLw' LIMIT 1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00], ["target_id", 979], ["target_type", "User"], ["token", "61xlFhBJ2lPqkP88FrI__AmUnAhqaZMBjnIYZYNWSsLw"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Exists (0.5ms)[0m [1mSELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '61xlFhBJ2lPqkP88FrI__AmUnAhqaZMBjnIYZYNWSsLw' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Exists (0.5ms)[0m SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'oWs1TYIOe_DK9PdUtvltmg5M-91wcGVhItNPZSnq893w' LIMIT 1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00], ["target_id", 980], ["target_type", "User"], ["token", "oWs1TYIOe_DK9PdUtvltmg5M-91wcGVhItNPZSnq893w"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.8ms)[0m UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 269 [["active", false], ["updated_at", Thu, 09 Oct 2014 06:51:28 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Exists (0.6ms)[0m SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'oWs1TYIOe_DK9PdUtvltmg5M-91wcGVhItNPZSnq893w' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:51:29 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:51:29 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Exists (0.5ms)[0m [1mSELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'Zrbl5fMuhmpzLoGyflsytgYHBv1Fee8zboagKAeXRqbg' LIMIT 1[0m
+ [1m[35mSQL (0.5ms)[0m 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, 09 Oct 2014 06:51:29 UTC +00:00], ["target_id", 981], ["target_type", "User"], ["token", "Zrbl5fMuhmpzLoGyflsytgYHBv1Fee8zboagKAeXRqbg"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:51:29 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.8ms)[0m [1mUPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 270[0m [["active", false], ["updated_at", Thu, 09 Oct 2014 06:51:29 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:51:29 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:51:29 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Exists (0.5ms)[0m [1mSELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '2xnlqWVvJ11Fmyr1k5SHGQzXVEHWf0UevDsOJtDcG_dg' LIMIT 1[0m
+ [1m[35mSQL (0.5ms)[0m 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, 09 Oct 2014 06:51:29 UTC +00:00], ["target_id", 982], ["target_type", "User"], ["token", "2xnlqWVvJ11Fmyr1k5SHGQzXVEHWf0UevDsOJtDcG_dg"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:51:29 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.4ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.3ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (4.7ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:52:00 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:52:00 UTC +00:00]]
+ [1m[35m (0.3ms)[0m 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 12ms (Views: 8.4ms | ActiveRecord: 0.0ms)
+ [1m[36m (0.4ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:52:00 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:52:00 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (1.0ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 984 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (1.2ms)[0m 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, 09 Oct 2014 06:52:00 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 984], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:52:00 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+Processing by NotifyUser::NotificationsController#index as JSON
+ [1m[35m (0.8ms)[0m SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 984 AND "notify_user_notifications"."target_type" = 'User'
+ [1m[36mNotifyUser::BaseNotification Load (1.1ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 984 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0[0m
+Completed 200 OK in 15ms (Views: 8.3ms | ActiveRecord: 1.9ms)
+ [1m[35m (0.4ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:52:00 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:52:00 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 985 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.8ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 06:52:00 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 985], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:52:00 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 985 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 06:52:00 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 985], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:52:00 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 985 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.7ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 06:52:00 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 985], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:52:00 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+Processing by NotifyUser::NotificationsController#index as HTML
+ [1m[36mNotifyUser::BaseNotification Load (0.7ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 985 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0[0m
+Completed 200 OK in 25ms (Views: 23.6ms | ActiveRecord: 0.7ms)
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.3ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:52:00 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:52:00 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 986 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.7ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 06:52:00 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 986], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:52:00 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 986 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 06:52:00 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 986], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:52:00 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 986 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.5ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 06:52:00 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 986], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:52:00 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+Processing by NotifyUser::NotificationsController#read as HTML
+ Parameters: {"id"=>"991"}
+ [1m[36mNotifyUser::BaseNotification Load (1.1ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 986 AND "notify_user_notifications"."target_type" = 'User' AND (id = '991') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mUser Load (0.9ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 986]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 986 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (1.2ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 991[0m [["state", "read"], ["updated_at", Thu, 09 Oct 2014 06:52:00 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+Completed 200 OK in 17ms (Views: 1.3ms | ActiveRecord: 4.3ms)
+ [1m[36mNotifyUser::BaseNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 991 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.3ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:52:00 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:52:00 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 987 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 06:52:00 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 987], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:52:00 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 987 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 06:52:00 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 987], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:52:00 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 987 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 06:52:00 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 987], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:52:00 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+Processing by NotifyUser::NotificationsController#read as HTML
+ Parameters: {"id"=>"994"}
+ [1m[36mNotifyUser::BaseNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 987 AND "notify_user_notifications"."target_type" = 'User' AND (id = '994') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mUser Load (0.5ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 987]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 987 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.8ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 994[0m [["state", "read"], ["updated_at", Thu, 09 Oct 2014 06:52:00 UTC +00:00]]
+ [1m[35m (0.2ms)[0m 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"=>"994"}
+ [1m[36mNotifyUser::BaseNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 987 AND "notify_user_notifications"."target_type" = 'User' AND (id = '994') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 3.5ms)
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:52:00 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:52:00 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.4ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 988 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.8ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 06:52:00 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 988], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:52:00 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 988 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 06:52:00 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 988], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:52:00 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 988 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.5ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 06:52:00 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 988], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:52:00 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+Processing by NotifyUser::NotificationsController#mark_all as HTML
+ [1m[36mSQL (1.3ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 988 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('pending','sent'))[0m
+Redirected to http://test.host/notify_user/notifications
+Completed 302 Found in 4ms (ActiveRecord: 1.3ms)
+ [1m[35mNotifyUser::BaseNotification Load (0.5ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 988 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('["pending","sent"]'))
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.7ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:52:00 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:52:00 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 989 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.6ms)[0m 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, 09 Oct 2014 06:52:00 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 989], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:52:00 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+Processing by NotifyUser::NotificationsController#mark_read as HTML
+ Parameters: {"ids"=>["1000"]}
+ [1m[35mSQL (0.6ms)[0m UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 989 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1000'))
+ [1m[36mNotifyUser::BaseNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 989 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1000'))[0m
+Completed 200 OK in 5ms (Views: 2.2ms | ActiveRecord: 1.3ms)
+ [1m[35mNewPostNotification Load (0.9ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1000]]
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.3ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:52:00 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:52:00 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 990 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.7ms)[0m 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, 09 Oct 2014 06:52:00 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 990], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:52:00 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+Processing by NotifyUser::NotificationsController#mark_read as HTML
+ Parameters: {"ids"=>["1001"]}
+ [1m[35mSQL (0.8ms)[0m UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 990 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1001'))
+ [1m[36mNotifyUser::BaseNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 990 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1001'))[0m
+Completed 200 OK in 5ms (Views: 2.4ms | ActiveRecord: 1.5ms)
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:52:00 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:52:00 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 991 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.7ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 06:52:00 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 991], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:52:00 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Load (0.5ms)[0m [1mSELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 991 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+Processing by NotifyUser::NotificationsController#subscriptions as HTML
+ Parameters: {"types"=>[{"type"=>"NewPostNotification", "status"=>"0"}]}
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 991 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.6ms)[0m 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" = 991) LIMIT 1
+ [1m[36mSQL (1.0ms)[0m [1mINSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:52:00 UTC +00:00], ["target_id", 991], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:52:00 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 991 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+Completed 200 OK in 16ms (Views: 0.3ms | ActiveRecord: 3.1ms)
+ [1m[35mNotifyUser::Unsubscribe Load (0.5ms)[0m SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 991 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:52:00 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:52:00 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 992 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.6ms)[0m 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, 09 Oct 2014 06:52:00 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 992], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:52:00 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Load (0.6ms)[0m SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 992 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"}]}
+ [1m[36mNotifyUser::Unsubscribe Load (0.7ms)[0m [1mSELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 992 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 992 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 1.3ms)
+ [1m[36mNotifyUser::Unsubscribe Load (0.5ms)[0m [1mSELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 992 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:52:00 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:52:00 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 993 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.7ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 993], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+Processing by NotifyUser::NotificationsController#unsubscribe as HTML
+ Parameters: {"type"=>"NewPostNotification"}
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.7ms)[0m 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" = 993) LIMIT 1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00], ["target_id", 993], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+Redirected to http://test.host/notify_user/notifications/unsubscribe
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 993 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+Completed 302 Found in 7ms (ActiveRecord: 2.4ms)
+ [1m[35mNotifyUser::Unsubscribe Load (0.5ms)[0m SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" ORDER BY "notify_user_unsubscribes"."id" DESC LIMIT 1
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 994 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.6ms)[0m 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, 09 Oct 2014 06:52:01 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 994], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Exists (0.6ms)[0m [1mSELECT 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" = 994) LIMIT 1[0m
+ [1m[35mSQL (0.5ms)[0m 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, 09 Oct 2014 06:52:01 UTC +00:00], ["target_id", 994], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+Processing by NotifyUser::NotificationsController#subscribe as HTML
+ Parameters: {"type"=>"NewPostNotification"}
+ [1m[35mNotifyUser::Unsubscribe Load (0.6ms)[0m SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 994 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.7ms)[0m DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 228]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+Redirected to http://test.host/notify_user/notifications/unsubscribe
+Completed 302 Found in 5ms (ActiveRecord: 1.6ms)
+ [1m[35mNotifyUser::Unsubscribe Load (0.4ms)[0m SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes"
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 995 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.6ms)[0m 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, 09 Oct 2014 06:52:01 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 995], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Load (0.8ms)[0m SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 995 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
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Exists (0.5ms)[0m SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'jwEL1eA3tZjGN5iDobNvtwTOfig4U586uZrHMwYdqvRw' LIMIT 1
+ [1m[36mSQL (1.0ms)[0m [1mINSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00], ["target_id", 995], ["target_type", "User"], ["token", "jwEL1eA3tZjGN5iDobNvtwTOfig4U586uZrHMwYdqvRw"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+Processing by NotifyUser::NotificationsController#unauth_unsubscribe as HTML
+ Parameters: {"type"=>"NewPostNotification", "token"=>"jwEL1eA3tZjGN5iDobNvtwTOfig4U586uZrHMwYdqvRw"}
+ [1m[36mNotifyUser::UserHash Exists (0.5ms)[0m [1mSELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'jwEL1eA3tZjGN5iDobNvtwTOfig4U586uZrHMwYdqvRw' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1[0m
+ [1m[35mNotifyUser::UserHash Load (0.7ms)[0m SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'jwEL1eA3tZjGN5iDobNvtwTOfig4U586uZrHMwYdqvRw' AND "notify_user_user_hashes"."type" = 'NewPostNotification' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
+ [1m[36mUser Load (0.5ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 995]]
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Exists (0.4ms)[0m [1mSELECT 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" = 995) LIMIT 1[0m
+ [1m[35mSQL (0.6ms)[0m 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, 09 Oct 2014 06:52:01 UTC +00:00], ["target_id", 995], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.9ms)[0m [1mUPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 272[0m [["active", false], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+Completed 200 OK in 12ms (Views: 0.5ms | ActiveRecord: 4.5ms)
+ [1m[36mNotifyUser::UserHash Load (0.6ms)[0m [1mSELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" ORDER BY "notify_user_user_hashes"."id" DESC LIMIT 1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35mNotifyUser::UserHash Load (0.7ms)[0m 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
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Load (0.7ms)[0m [1mSELECT "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[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.4ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35mNotifyUser::UserHash Load (0.7ms)[0m 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
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Load (0.8ms)[0m [1mSELECT "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[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.3ms)[0m [1mBEGIN[0m
+ [1m[35mNotifyUser::UserHash Load (0.7ms)[0m 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
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Load (0.7ms)[0m [1mSELECT "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[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.7ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 996 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.9ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00], ["state", "pending"], ["target_id", 996], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 996 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('sent','pending'))[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 997 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00], ["state", "pending"], ["target_id", 997], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 998 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "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, 09 Oct 2014 06:52:01 UTC +00:00], ["state", "pending"], ["target_id", 998], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 999 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00], ["state", "pending"], ["target_id", 999], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 999 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (1.0ms)[0m [1mUPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1010[0m [["params", {"listing_id"=>1}], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNewPostNotification Load (0.5ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.3ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1000 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00], ["state", "pending"], ["target_id", 1000], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1000 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (1.0ms)[0m [1mUPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1011[0m [["params", {"listing_id"=>1}], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNewPostNotification Load (0.8ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1[0m
+ [1m[35m (0.4ms)[0m ROLLBACK
+ [1m[36m (0.3ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1001 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00], ["state", "pending"], ["target_id", 1001], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1001 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.9ms)[0m [1mUPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1012[0m [["params", {:listing_id=>1}], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNewPostNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.8ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1002 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00], ["state", "pending"], ["target_id", 1002], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1002 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (1.0ms)[0m [1mUPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1013[0m [["params", {:listing_id=>1}], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNewPostNotification Load (0.7ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1003 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00], ["state", "pending"], ["target_id", 1003], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1004 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "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, 09 Oct 2014 06:52:01 UTC +00:00], ["state", "pending"], ["target_id", 1004], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1004 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.7ms)[0m [1mSELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1004 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1015)[0m
+ [1m[35mNotifyUser::BaseNotification Load (0.9ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1015]]
+ [1m[36mUser Load (0.5ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 1004]]
+ [1m[35mNotifyUser::BaseNotification Load (0.6ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1004 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mUser Load (0.6ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1004]]
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1004 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (1.3ms)[0m UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1015 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::BaseNotification Load (0.9ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 1015 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
+ [1m[36mUser Load (0.6ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 1004]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1004 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
+ [1m[36mNewPostNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1015 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1004]]
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1004 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1005 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.7ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00], ["state", "pending"], ["target_id", 1005], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1005 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m 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" = 1005 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1016)
+ [1m[36mNotifyUser::BaseNotification Load (0.5ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1[0m [["id", 1016]]
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1005]]
+ [1m[36mNotifyUser::BaseNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1005 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 1005]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1005 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.9ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1016[0m [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::BaseNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 1016 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1005]]
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1005 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'[0m
+ [1m[35mNewPostNotification Load (0.6ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1016 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 1005]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1005 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1006 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "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, 09 Oct 2014 06:52:01 UTC +00:00], ["state", "pending"], ["target_id", 1006], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1006 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.8ms)[0m [1mSELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1006 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1017)[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1006 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "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, 09 Oct 2014 06:52:01 UTC +00:00], ["state", "pending"], ["target_id", 1006], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m 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" = 1006 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1018)
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1007 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "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, 09 Oct 2014 06:52:01 UTC +00:00], ["state", "pending"], ["target_id", 1007], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1007 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "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, 09 Oct 2014 06:52:01 UTC +00:00], ["state", "pending"], ["target_id", 1007], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNewPostNotification Load (0.6ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1020]]
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 1007]]
+ [1m[35mNewPostNotification Load (0.6ms)[0m 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" = 1007 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1007]]
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1007 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.9ms)[0m UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1019 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 1007]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1007 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.8ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1020[0m [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1007 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'[0m
+ [1m[35mNotifyUser::UserHash Load (0.7ms)[0m SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1007 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
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Exists (0.4ms)[0m SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '_hqIs26saBvURAQC0VBCEA4v2iXnjcyZS7UZpGMagarA' LIMIT 1
+ [1m[36mSQL (0.7ms)[0m [1mINSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00], ["target_id", 1007], ["target_type", "User"], ["token", "_hqIs26saBvURAQC0VBCEA4v2iXnjcyZS7UZpGMagarA"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+
+Sent mail to user@example.com (7.1ms)
+Date: Thu, 09 Oct 2014 17:52:01 +1100
+From: please-change-me-at-config-initializers-notify-user@example.com
+To: user@example.com
+Message-ID: <543630916cac7_27ae3ff8dd465be88504e@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=3D_hqIs26saBvURAQC0VBCEA4v2iXnjcyZS7UZpGMagarA&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>=
+
+ [1m[36m (0.4ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.3ms)[0m BEGIN
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1008 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "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, 09 Oct 2014 06:52:01 UTC +00:00], ["state", "pending"], ["target_id", 1008], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNewPostNotification Load (0.7ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1021]]
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 1008]]
+ [1m[35mNewPostNotification Load (0.6ms)[0m 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" = 1008 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1008]]
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1008 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.9ms)[0m UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1021 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNewPostNotification Load (0.6ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1021 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 1008]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1008 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
+ [1m[36mNotifyUser::UserHash Load (0.7ms)[0m [1mSELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1008 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[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Exists (0.5ms)[0m [1mSELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'snIzBBODQIT0JTZ1d2mHWgN5pYJYJ69ixM33YhpGjMrQ' LIMIT 1[0m
+ [1m[35mSQL (0.5ms)[0m 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, 09 Oct 2014 06:52:01 UTC +00:00], ["target_id", 1008], ["target_type", "User"], ["token", "snIzBBODQIT0JTZ1d2mHWgN5pYJYJ69ixM33YhpGjMrQ"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+
+Sent mail to user@example.com (7.2ms)
+Date: Thu, 09 Oct 2014 17:52:01 +1100
+From: please-change-me-at-config-initializers-notify-user@example.com
+To: user@example.com
+Message-ID: <5436309177914_27ae3ff8dd465be885157@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=3DsnIzBBODQIT0JTZ1d2mHWgN5pYJYJ69ixM33YhpGjMrQ&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>=
+
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1008 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Exists (0.5ms)[0m [1mSELECT 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" = 1009) LIMIT 1[0m
+ [1m[35mSQL (0.5ms)[0m 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, 09 Oct 2014 06:52:01 UTC +00:00], ["target_id", 1009], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1009 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36mNotifyUser::BaseNotification Load (0.5ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" IS NULL ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1010 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00], ["state", "pending"], ["target_id", 1010], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::BaseNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 1022 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1010]]
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1010 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1011 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00], ["state", "pending"], ["target_id", 1011], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[35m (0.4ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1011 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00], ["state", "pending"], ["target_id", 1011], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNewPostNotification Load (0.8ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1[0m [["id", 1024]]
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1011]]
+ [1m[36mNewPostNotification Load (0.7ms)[0m [1mSELECT "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" = 1011 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 1011]]
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1011 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (1.0ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1023[0m [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1011]]
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1011 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.9ms)[0m UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1024 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1011 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
+ [1m[36mNotifyUser::UserHash Load (0.7ms)[0m [1mSELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1011 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[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Exists (0.5ms)[0m [1mSELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'PgGT0ayBQs81NlmdZ570Jw0t_ciPPEOM393Nz64ZCzCw' LIMIT 1[0m
+ [1m[35mSQL (0.5ms)[0m 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, 09 Oct 2014 06:52:01 UTC +00:00], ["target_id", 1011], ["target_type", "User"], ["token", "PgGT0ayBQs81NlmdZ570Jw0t_ciPPEOM393Nz64ZCzCw"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+
+Sent mail to user@example.com (6.3ms)
+Date: Thu, 09 Oct 2014 17:52:01 +1100
+From: please-change-me-at-config-initializers-notify-user@example.com
+To: user@example.com
+Message-ID: <543630918bc51_27ae3ff8dd465be8852ad@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=3DPgGT0ayBQs81NlmdZ570Jw0t_ciPPEOM393Nz64ZCzCw&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>=
+
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1012 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00], ["state", "pending"], ["target_id", 1012], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNewPostNotification Load (0.4ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1[0m [["id", 1025]]
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1012]]
+ [1m[36mNewPostNotification Load (0.5ms)[0m [1mSELECT "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" = 1012 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 1012]]
+ [1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1012 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.7ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1025[0m [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNewPostNotification Load (0.5ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1025 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1012]]
+ [1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1012 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'[0m
+ [1m[35mNotifyUser::UserHash Load (0.6ms)[0m SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1012 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
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Exists (0.3ms)[0m SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'DSF0fl0dA3xPqSQFboVItgzHIhUSt1v0GIa55wMPccow' LIMIT 1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00], ["target_id", 1012], ["target_type", "User"], ["token", "DSF0fl0dA3xPqSQFboVItgzHIhUSt1v0GIa55wMPccow"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+
+Sent mail to user@example.com (8.7ms)
+Date: Thu, 09 Oct 2014 17:52:01 +1100
+From: please-change-me-at-config-initializers-notify-user@example.com
+To: user@example.com
+Message-ID: <54363091954e7_27ae3ff8dd465be8853c@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=3DDSF0fl0dA3xPqSQFboVItgzHIhUSt1v0GIa55wMPccow&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>=
+
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1013 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "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, 09 Oct 2014 06:52:01 UTC +00:00], ["state", "pending"], ["target_id", 1013], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1013 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1013 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1013 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.7ms)[0m UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1026 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNewPostNotification Load (0.4ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1026 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 1013]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1013 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1013 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.6ms)[0m 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" = 1014) LIMIT 1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00], ["target_id", 1014], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1014 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1014 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1014 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.4ms)[0m 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" = 1015) LIMIT 1
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00], ["target_id", 1015], ["target_type", "User"], ["type", "action_mailer"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.6ms)[0m SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'action_mailer' AND "notify_user_unsubscribes"."id" != 232 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1015) LIMIT 1
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1015 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.7ms)[0m INSERT INTO "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, 09 Oct 2014 06:52:01 UTC +00:00], ["state", "pending"], ["target_id", 1015], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1015 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1015 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1015 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.7ms)[0m UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1027 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNewPostNotification Load (0.5ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1027 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 1015]]
+ [1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1015 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
+ [1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1015 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.7ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1016 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00], ["state", "pending"], ["target_id", 1016], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Load (0.5ms)[0m [1mSELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1016 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[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Exists (0.4ms)[0m [1mSELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'i6v_LYH3duv5dAgQpebwoglvxQCaJdzXvOVUn1ei-5jQ' LIMIT 1[0m
+ [1m[35mSQL (0.6ms)[0m 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, 09 Oct 2014 06:52:01 UTC +00:00], ["target_id", 1016], ["target_type", "User"], ["token", "i6v_LYH3duv5dAgQpebwoglvxQCaJdzXvOVUn1ei-5jQ"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1017 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00], ["state", "pending"], ["target_id", 1017], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Load (0.5ms)[0m [1mSELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1017 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[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Exists (0.4ms)[0m [1mSELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'sq1qOT6uTvjiee6DOCNJfAH707JWfdauDxLy4fNKlPsw' LIMIT 1[0m
+ [1m[35mSQL (0.4ms)[0m 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, 09 Oct 2014 06:52:01 UTC +00:00], ["target_id", 1017], ["target_type", "User"], ["token", "sq1qOT6uTvjiee6DOCNJfAH707JWfdauDxLy4fNKlPsw"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Load (0.5ms)[0m SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1017 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
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1018 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "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, 09 Oct 2014 06:52:01 UTC +00:00], ["state", "pending"], ["target_id", 1018], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Load (0.5ms)[0m SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1018 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
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Exists (0.3ms)[0m SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'M3ZZhVqoWbxc7a47olX43QBnN3LgXRz5Krp-mko-kv9w' LIMIT 1
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00], ["target_id", 1018], ["target_type", "User"], ["token", "M3ZZhVqoWbxc7a47olX43QBnN3LgXRz5Krp-mko-kv9w"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.7ms)[0m UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 279 [["active", false], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Load (0.6ms)[0m SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1018 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
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Exists (0.3ms)[0m SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'XPMBfLKp_2DP168vp_pgVwnmv7Qyps42LVG5MUHNcs3w' LIMIT 1
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00], ["target_id", 1018], ["target_type", "User"], ["token", "XPMBfLKp_2DP168vp_pgVwnmv7Qyps42LVG5MUHNcs3w"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Exists (0.5ms)[0m [1mSELECT 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" = 1019) LIMIT 1[0m
+ [1m[35mSQL (0.5ms)[0m 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, 09 Oct 2014 06:52:01 UTC +00:00], ["target_id", 1019], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Exists (0.6ms)[0m [1mSELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 233 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1019) LIMIT 1[0m
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1019 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.4ms)[0m 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" = 1020) LIMIT 1
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00], ["target_id", 1020], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.5ms)[0m SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 234 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1020) LIMIT 1
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1020 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Exists (0.4ms)[0m [1mSELECT 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" = 1021) LIMIT 1[0m
+ [1m[35mSQL (0.5ms)[0m 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, 09 Oct 2014 06:52:01 UTC +00:00], ["target_id", 1021], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Exists (0.5ms)[0m [1mSELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 235 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1021) LIMIT 1[0m
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.4ms)[0m 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" = 1021) LIMIT 1
+ [1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1021 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mNotifyUser::Unsubscribe Load (0.7ms)[0m [1mSELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1021 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.3ms)[0m [1mDELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1[0m [["id", 235]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Load (0.3ms)[0m [1mSELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1021 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1022 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT 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"[0m [["created_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1022], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.1ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Exists (0.4ms)[0m [1mSELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '1ioA7rGNsuIpJ00oNw4cIQINxjn4hJZWg6yxGwRtFSzQ' LIMIT 1[0m
+ [1m[35mSQL (0.5ms)[0m 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, 09 Oct 2014 06:52:01 UTC +00:00], ["target_id", 1023], ["target_type", "User"], ["token", "1ioA7rGNsuIpJ00oNw4cIQINxjn4hJZWg6yxGwRtFSzQ"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Exists (0.5ms)[0m SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '1ioA7rGNsuIpJ00oNw4cIQINxjn4hJZWg6yxGwRtFSzQ' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1
+ [1m[36m (0.1ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Exists (0.4ms)[0m [1mSELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'uCcmpAQNojjOawTK7sbC1QYZGbdb3pjPhwnaPZaejbHg' LIMIT 1[0m
+ [1m[35mSQL (0.5ms)[0m 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, 09 Oct 2014 06:52:01 UTC +00:00], ["target_id", 1024], ["target_type", "User"], ["token", "uCcmpAQNojjOawTK7sbC1QYZGbdb3pjPhwnaPZaejbHg"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mUPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 282[0m [["active", false], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Exists (0.4ms)[0m [1mSELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'uCcmpAQNojjOawTK7sbC1QYZGbdb3pjPhwnaPZaejbHg' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Exists (0.4ms)[0m SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'flNLfvm-DueWReBlPGxb7QCxDBSDmXBgyakq25Zj-4mg' LIMIT 1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00], ["target_id", 1025], ["target_type", "User"], ["token", "flNLfvm-DueWReBlPGxb7QCxDBSDmXBgyakq25Zj-4mg"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 283 [["active", false], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Exists (0.5ms)[0m SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'DoGkQbbgBzbYWLNFrfeOEAGEzNvZjrOt8PiQuwlFxSRA' LIMIT 1
+ [1m[36mSQL (0.8ms)[0m [1mINSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00], ["target_id", 1026], ["target_type", "User"], ["token", "DoGkQbbgBzbYWLNFrfeOEAGEzNvZjrOt8PiQuwlFxSRA"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 06:52:01 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.3ms)[0m BEGIN
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (11.1ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Fri, 10 Oct 2014 00:28:12 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 10 Oct 2014 00:28:12 UTC +00:00]]
+ [1m[35m (0.2ms)[0m 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 16ms (Views: 12.5ms | ActiveRecord: 0.0ms)
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Fri, 10 Oct 2014 00:28:12 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 10 Oct 2014 00:28:12 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (2.1ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1028 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (2.2ms)[0m 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", Fri, 10 Oct 2014 00:28:12 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1028], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 10 Oct 2014 00:28:12 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+Processing by NotifyUser::NotificationsController#index as JSON
+ [1m[35m (1.3ms)[0m SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1028 AND "notify_user_notifications"."target_type" = 'User'
+ [1m[36mNotifyUser::BaseNotification Load (1.3ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1028 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0[0m
+Completed 200 OK in 21ms (Views: 12.9ms | ActiveRecord: 2.6ms)
+ [1m[35m (0.4ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Fri, 10 Oct 2014 00:28:12 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 10 Oct 2014 00:28:12 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1029 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT 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"[0m [["created_at", Fri, 10 Oct 2014 00:28:12 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1029], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 10 Oct 2014 00:28:12 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1029 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT 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"[0m [["created_at", Fri, 10 Oct 2014 00:28:12 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1029], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 10 Oct 2014 00:28:12 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1029 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT 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"[0m [["created_at", Fri, 10 Oct 2014 00:28:12 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1029], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 10 Oct 2014 00:28:12 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+Processing by NotifyUser::NotificationsController#index as HTML
+ [1m[36mNotifyUser::BaseNotification Load (0.7ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1029 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0[0m
+Completed 200 OK in 51ms (Views: 49.4ms | ActiveRecord: 0.7ms)
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.7ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Fri, 10 Oct 2014 00:28:12 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 10 Oct 2014 00:28:12 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.7ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1030 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.9ms)[0m [1mINSERT 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"[0m [["created_at", Fri, 10 Oct 2014 00:28:12 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1030], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 10 Oct 2014 00:28:12 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1030 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.5ms)[0m [1mINSERT 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"[0m [["created_at", Fri, 10 Oct 2014 00:28:12 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1030], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 10 Oct 2014 00:28:12 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1030 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.5ms)[0m [1mINSERT 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"[0m [["created_at", Fri, 10 Oct 2014 00:28:12 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1030], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 10 Oct 2014 00:28:12 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+Processing by NotifyUser::NotificationsController#read as HTML
+ Parameters: {"id"=>"1036"}
+ [1m[36mNotifyUser::BaseNotification Load (0.9ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1030 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1036') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mUser Load (1.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 1030]]
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1030 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (1.2ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1036[0m [["state", "read"], ["updated_at", Fri, 10 Oct 2014 00:28:12 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+Completed 200 OK in 52ms (Views: 1.7ms | ActiveRecord: 4.3ms)
+ [1m[36mNotifyUser::BaseNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 1036 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Fri, 10 Oct 2014 00:28:12 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 10 Oct 2014 00:28:12 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1031 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT 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"[0m [["created_at", Fri, 10 Oct 2014 00:28:12 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1031], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 10 Oct 2014 00:28:12 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1031 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.5ms)[0m [1mINSERT 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"[0m [["created_at", Fri, 10 Oct 2014 00:28:12 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1031], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 10 Oct 2014 00:28:12 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1031 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT 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"[0m [["created_at", Fri, 10 Oct 2014 00:28:12 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1031], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 10 Oct 2014 00:28:12 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+Processing by NotifyUser::NotificationsController#read as HTML
+ Parameters: {"id"=>"1039"}
+ [1m[36mNotifyUser::BaseNotification Load (0.7ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1031 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1039') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mUser Load (0.5ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 1031]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1031 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.9ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1039[0m [["state", "read"], ["updated_at", Fri, 10 Oct 2014 00:28:12 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+Completed 200 OK in 8ms (Views: 0.3ms | ActiveRecord: 2.9ms)
+Processing by NotifyUser::NotificationsController#read as HTML
+ Parameters: {"id"=>"1039"}
+ [1m[36mNotifyUser::BaseNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1031 AND "notify_user_notifications"."target_type" = 'User' AND (id = '1039') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 3.5ms)
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Fri, 10 Oct 2014 00:28:12 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 10 Oct 2014 00:28:12 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1032 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT 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"[0m [["created_at", Fri, 10 Oct 2014 00:28:12 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1032], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 10 Oct 2014 00:28:12 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1032 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT 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"[0m [["created_at", Fri, 10 Oct 2014 00:28:12 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 1032], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 10 Oct 2014 00:28:12 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1032 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT 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"[0m [["created_at", Fri, 10 Oct 2014 00:28:12 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 1032], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 10 Oct 2014 00:28:12 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+Processing by NotifyUser::NotificationsController#mark_all as HTML
+ [1m[36mSQL (1.1ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1032 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('pending','sent'))[0m
+Redirected to http://test.host/notify_user/notifications
+Completed 302 Found in 3ms (ActiveRecord: 1.1ms)
+ [1m[35mNotifyUser::BaseNotification Load (0.5ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1032 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('["pending","sent"]'))
+ [1m[36m (0.4ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Fri, 10 Oct 2014 00:28:12 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 10 Oct 2014 00:28:12 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1033 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.7ms)[0m 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", Fri, 10 Oct 2014 00:28:12 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1033], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 10 Oct 2014 00:28:12 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+Processing by NotifyUser::NotificationsController#mark_read as HTML
+ Parameters: {"ids"=>["1045"]}
+ [1m[35mSQL (0.6ms)[0m UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1033 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1045'))
+ [1m[36mNotifyUser::BaseNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1033 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1045'))[0m
+Completed 200 OK in 5ms (Views: 2.1ms | ActiveRecord: 1.2ms)
+ [1m[35mNewPostNotification Load (1.0ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1045]]
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Fri, 10 Oct 2014 00:28:12 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 10 Oct 2014 00:28:12 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1034 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.6ms)[0m 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", Fri, 10 Oct 2014 00:28:12 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1034], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 10 Oct 2014 00:28:12 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+Processing by NotifyUser::NotificationsController#mark_read as HTML
+ Parameters: {"ids"=>["1046"]}
+ [1m[35mSQL (0.7ms)[0m UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 1034 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1046'))
+ [1m[36mNotifyUser::BaseNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1034 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('1046'))[0m
+Completed 200 OK in 5ms (Views: 2.1ms | ActiveRecord: 1.2ms)
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1035 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.5ms)[0m [1mINSERT 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"[0m [["created_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1035], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Load (0.4ms)[0m [1mSELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1035 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+Processing by NotifyUser::NotificationsController#subscriptions as HTML
+ Parameters: {"types"=>[{"type"=>"NewPostNotification", "status"=>"0"}]}
+ [1m[35m (0.7ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1035 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.4ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.6ms)[0m 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" = 1035) LIMIT 1
+ [1m[36mSQL (1.2ms)[0m [1mINSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["target_id", 1035], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.8ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1035 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+Completed 200 OK in 25ms (Views: 0.4ms | ActiveRecord: 4.0ms)
+ [1m[35mNotifyUser::Unsubscribe Load (0.7ms)[0m SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1035 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.3ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1036 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.6ms)[0m 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", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1036], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Load (0.6ms)[0m SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1036 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"}]}
+ [1m[36mNotifyUser::Unsubscribe Load (0.6ms)[0m [1mSELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1036 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1036 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 1.2ms)
+ [1m[36mNotifyUser::Unsubscribe Load (0.6ms)[0m [1mSELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1036 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.3ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1037 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.9ms)[0m [1mINSERT 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"[0m [["created_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1037], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+Processing by NotifyUser::NotificationsController#unsubscribe as HTML
+ Parameters: {"type"=>"NewPostNotification"}
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.5ms)[0m 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" = 1037) LIMIT 1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["target_id", 1037], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+Redirected to http://test.host/notify_user/notifications/unsubscribe
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1037 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+Completed 302 Found in 7ms (ActiveRecord: 2.2ms)
+ [1m[35mNotifyUser::Unsubscribe Load (0.5ms)[0m SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" ORDER BY "notify_user_unsubscribes"."id" DESC LIMIT 1
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.4ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1038 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.6ms)[0m 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", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1038], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Exists (0.5ms)[0m [1mSELECT 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" = 1038) LIMIT 1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["target_id", 1038], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+Processing by NotifyUser::NotificationsController#subscribe as HTML
+ Parameters: {"type"=>"NewPostNotification"}
+ [1m[35mNotifyUser::Unsubscribe Load (0.7ms)[0m SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1038 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.7ms)[0m DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 238]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+Redirected to http://test.host/notify_user/notifications/unsubscribe
+Completed 302 Found in 5ms (ActiveRecord: 1.8ms)
+ [1m[35mNotifyUser::Unsubscribe Load (0.4ms)[0m SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes"
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1039 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.8ms)[0m 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", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1039], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Load (1.3ms)[0m SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1039 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
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Exists (0.8ms)[0m SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'LpJewKcrCoITWYsRVobifQ8mWBQfF2wmI-NDSOfBJSZA' LIMIT 1
+ [1m[36mSQL (1.2ms)[0m [1mINSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["target_id", 1039], ["target_type", "User"], ["token", "LpJewKcrCoITWYsRVobifQ8mWBQfF2wmI-NDSOfBJSZA"], ["type", "NewPostNotification"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+Processing by NotifyUser::NotificationsController#unauth_unsubscribe as HTML
+ Parameters: {"type"=>"NewPostNotification", "token"=>"LpJewKcrCoITWYsRVobifQ8mWBQfF2wmI-NDSOfBJSZA"}
+ [1m[36mNotifyUser::UserHash Exists (0.5ms)[0m [1mSELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'LpJewKcrCoITWYsRVobifQ8mWBQfF2wmI-NDSOfBJSZA' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1[0m
+ [1m[35mNotifyUser::UserHash Load (0.6ms)[0m SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'LpJewKcrCoITWYsRVobifQ8mWBQfF2wmI-NDSOfBJSZA' AND "notify_user_user_hashes"."type" = 'NewPostNotification' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
+ [1m[36mUser Load (0.5ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 1039]]
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Exists (0.5ms)[0m [1mSELECT 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" = 1039) LIMIT 1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["target_id", 1039], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.8ms)[0m [1mUPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 285[0m [["active", false], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+Completed 200 OK in 13ms (Views: 0.6ms | ActiveRecord: 4.6ms)
+ [1m[36mNotifyUser::UserHash Load (0.5ms)[0m [1mSELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" ORDER BY "notify_user_user_hashes"."id" DESC LIMIT 1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35mNotifyUser::UserHash Load (0.9ms)[0m 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
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Load (0.8ms)[0m [1mSELECT "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[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35mNotifyUser::UserHash Load (0.8ms)[0m 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
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Load (0.8ms)[0m [1mSELECT "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[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35mNotifyUser::UserHash Load (0.8ms)[0m 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
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Load (0.7ms)[0m [1mSELECT "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[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1040 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.9ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["state", "pending"], ["target_id", 1040], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 1040 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('sent','pending'))[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1041 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["state", "pending"], ["target_id", 1041], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1042 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["state", "pending"], ["target_id", 1042], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.3ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1043 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["state", "pending"], ["target_id", 1043], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1043 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (1.0ms)[0m [1mUPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1055[0m [["params", {"listing_id"=>1}], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNewPostNotification Load (0.7ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1044 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["state", "pending"], ["target_id", 1044], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1044 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (1.1ms)[0m [1mUPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1056[0m [["params", {"listing_id"=>1}], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNewPostNotification Load (0.8ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1045 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.7ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["state", "pending"], ["target_id", 1045], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1045 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (1.0ms)[0m [1mUPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1057[0m [["params", {:listing_id=>1}], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNewPostNotification Load (0.8ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1046 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.7ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["state", "pending"], ["target_id", 1046], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.7ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1046 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.9ms)[0m [1mUPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1058[0m [["params", {:listing_id=>1}], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNewPostNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1047 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.7ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["state", "pending"], ["target_id", 1047], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1048 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["state", "pending"], ["target_id", 1048], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.7ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1048 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.7ms)[0m [1mSELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1048 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1060)[0m
+ [1m[35mNotifyUser::BaseNotification Load (1.1ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1060]]
+ [1m[36mUser Load (0.5ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 1048]]
+ [1m[35mNotifyUser::BaseNotification Load (0.5ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1048 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mUser Load (0.6ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1048]]
+ [1m[36m (0.7ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1048 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (1.0ms)[0m UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1060 [["state", "sent"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::BaseNotification Load (0.5ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 1060 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
+ [1m[36mUser Load (0.6ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 1048]]
+ [1m[35m (0.7ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1048 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
+ [1m[36mNewPostNotification Load (0.7ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1060 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1048]]
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1048 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'[0m
+ [1m[35m (0.4ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.9ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1049 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["state", "pending"], ["target_id", 1049], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1049 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.7ms)[0m 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" = 1049 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1061)
+ [1m[36mNotifyUser::BaseNotification Load (0.5ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1[0m [["id", 1061]]
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1049]]
+ [1m[36mNotifyUser::BaseNotification Load (0.5ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1049 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 1049]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1049 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.8ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1061[0m [["state", "sent"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::BaseNotification Load (0.5ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 1061 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1049]]
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1049 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'[0m
+ [1m[35mNewPostNotification Load (0.6ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1061 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 1049]]
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1049 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1050 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["state", "pending"], ["target_id", 1050], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1050 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 1050 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1062)[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1050 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["state", "pending"], ["target_id", 1050], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.7ms)[0m 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" = 1050 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 1063)
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1051 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["state", "pending"], ["target_id", 1051], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1051 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["state", "pending"], ["target_id", 1051], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNewPostNotification Load (0.6ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1065]]
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 1051]]
+ [1m[35mNewPostNotification Load (0.6ms)[0m 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" = 1051 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1051]]
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1051 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.9ms)[0m UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1064 [["state", "sent"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 1051]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1051 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.8ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1065[0m [["state", "sent"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1051 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'[0m
+ [1m[35mNotifyUser::UserHash Load (1.2ms)[0m SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1051 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
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Exists (0.4ms)[0m SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'WmeMZbXLasGqxwkW3hSFvAWIucOjRDCSXxZX-DVtFr9A' LIMIT 1
+ [1m[36mSQL (2.1ms)[0m [1mINSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["target_id", 1051], ["target_type", "User"], ["token", "WmeMZbXLasGqxwkW3hSFvAWIucOjRDCSXxZX-DVtFr9A"], ["type", "NewPostNotification"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+
+Sent mail to user@example.com (10.1ms)
+Date: Fri, 10 Oct 2014 11:28:13 +1100
+From: please-change-me-at-config-initializers-notify-user@example.com
+To: user@example.com
+Message-ID: <5437281d89b84_3dbc3fe58cc65be0576fc@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=3DWmeMZbXLasGqxwkW3hSFvAWIucOjRDCSXxZX-DVtFr9A&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>=
+
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1052 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["state", "pending"], ["target_id", 1052], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNewPostNotification Load (0.6ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 1066]]
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 1052]]
+ [1m[35mNewPostNotification Load (0.8ms)[0m 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" = 1052 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1052]]
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1052 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (1.0ms)[0m UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1066 [["state", "sent"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNewPostNotification Load (0.7ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1066 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 1052]]
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1052 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
+ [1m[36mNotifyUser::UserHash Load (0.8ms)[0m [1mSELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1052 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[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Exists (0.6ms)[0m [1mSELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'GLFGZq4ygpaj7dB3zKI_6AttFGlgSknYzaJj3StKp6Dw' LIMIT 1[0m
+ [1m[35mSQL (0.6ms)[0m 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", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["target_id", 1052], ["target_type", "User"], ["token", "GLFGZq4ygpaj7dB3zKI_6AttFGlgSknYzaJj3StKp6Dw"], ["type", "NewPostNotification"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+
+Sent mail to user@example.com (5.6ms)
+Date: Fri, 10 Oct 2014 11:28:13 +1100
+From: please-change-me-at-config-initializers-notify-user@example.com
+To: user@example.com
+Message-ID: <5437281d95998_3dbc3fe58cc65be0577d4@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=3DGLFGZq4ygpaj7dB3zKI_6AttFGlgSknYzaJj3StKp6Dw&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>=
+
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1052 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'
+ [1m[36m (0.4ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Exists (0.6ms)[0m [1mSELECT 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" = 1053) LIMIT 1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["target_id", 1053], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1053 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36mNotifyUser::BaseNotification Load (0.4ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" IS NULL ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1054 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["state", "pending"], ["target_id", 1054], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::BaseNotification Load (0.5ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 1067 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1054]]
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1054 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1055 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["state", "pending"], ["target_id", 1055], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1055 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["state", "pending"], ["target_id", 1055], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNewPostNotification Load (0.5ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1[0m [["id", 1069]]
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1055]]
+ [1m[36mNewPostNotification Load (0.6ms)[0m [1mSELECT "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" = 1055 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 1055]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1055 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.9ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1068[0m [["state", "sent"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1055]]
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1055 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.9ms)[0m UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1069 [["state", "sent"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1055 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
+ [1m[36mNotifyUser::UserHash Load (0.8ms)[0m [1mSELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1055 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[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Exists (0.4ms)[0m [1mSELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'pnQ79kJLpiHLC_4olq-_VQaV6xa1PGcljp6ULFeAhU3A' LIMIT 1[0m
+ [1m[35mSQL (0.6ms)[0m 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", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["target_id", 1055], ["target_type", "User"], ["token", "pnQ79kJLpiHLC_4olq-_VQaV6xa1PGcljp6ULFeAhU3A"], ["type", "NewPostNotification"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+
+Sent mail to user@example.com (5.6ms)
+Date: Fri, 10 Oct 2014 11:28:13 +1100
+From: please-change-me-at-config-initializers-notify-user@example.com
+To: user@example.com
+Message-ID: <5437281da840d_3dbc3fe58cc65be057812@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=3DpnQ79kJLpiHLC_4olq-_VQaV6xa1PGcljp6ULFeAhU3A&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>=
+
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1056 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["state", "pending"], ["target_id", 1056], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNewPostNotification Load (0.5ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1[0m [["id", 1070]]
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1056]]
+ [1m[36mNewPostNotification Load (0.5ms)[0m [1mSELECT "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" = 1056 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 1056]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1056 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.9ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1070[0m [["state", "sent"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNewPostNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1070 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 1056]]
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1056 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'[0m
+ [1m[35mNotifyUser::UserHash Load (0.7ms)[0m SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1056 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
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Exists (0.5ms)[0m SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'PioDBZAHAAOqTASLLDjJbQvXCyt2eSyTgYNDP4Wr4O8g' LIMIT 1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["target_id", 1056], ["target_type", "User"], ["token", "PioDBZAHAAOqTASLLDjJbQvXCyt2eSyTgYNDP4Wr4O8g"], ["type", "NewPostNotification"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+
+Sent mail to user@example.com (5.8ms)
+Date: Fri, 10 Oct 2014 11:28:13 +1100
+From: please-change-me-at-config-initializers-notify-user@example.com
+To: user@example.com
+Message-ID: <5437281db2972_3dbc3fe58cc65be0579d4@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=3DPioDBZAHAAOqTASLLDjJbQvXCyt2eSyTgYNDP4Wr4O8g&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>=
+
+ [1m[36m (0.4ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.7ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1057 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["state", "pending"], ["target_id", 1057], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1057 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1057 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1057 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.8ms)[0m UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1071 [["state", "sent"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNewPostNotification Load (0.6ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1071 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 1057]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1057 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1057 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.5ms)[0m 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" = 1058) LIMIT 1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["target_id", 1058], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1058 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.3ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1058 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1058 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.7ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.5ms)[0m 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" = 1059) LIMIT 1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["target_id", 1059], ["target_type", "User"], ["type", "action_mailer"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.6ms)[0m SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'action_mailer' AND "notify_user_unsubscribes"."id" != 242 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1059) LIMIT 1
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1059 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["state", "pending"], ["target_id", 1059], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1059 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1059 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1059 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.8ms)[0m UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1072 [["state", "sent"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNewPostNotification Load (0.5ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 1072 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 1059]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1059 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1059 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1060 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["state", "pending"], ["target_id", 1060], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Load (0.6ms)[0m [1mSELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1060 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[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Exists (0.4ms)[0m [1mSELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'k8eUBsVaMX3KfhfMFzE0hA2ViCksobBc7mtOMSiapy3w' LIMIT 1[0m
+ [1m[35mSQL (0.6ms)[0m 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", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["target_id", 1060], ["target_type", "User"], ["token", "k8eUBsVaMX3KfhfMFzE0hA2ViCksobBc7mtOMSiapy3w"], ["type", "NewPostNotification"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1061 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["state", "pending"], ["target_id", 1061], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Load (0.6ms)[0m [1mSELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1061 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[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Exists (0.4ms)[0m [1mSELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '9qk9EC9-2pKtybFPURr-HQ34n1zwo-N9wpft4Shy_xhQ' LIMIT 1[0m
+ [1m[35mSQL (0.5ms)[0m 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", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["target_id", 1061], ["target_type", "User"], ["token", "9qk9EC9-2pKtybFPURr-HQ34n1zwo-N9wpft4Shy_xhQ"], ["type", "NewPostNotification"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Load (0.7ms)[0m SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1061 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
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1062 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["state", "pending"], ["target_id", 1062], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Load (0.6ms)[0m SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1062 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
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Exists (0.4ms)[0m SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'JA4psYzqIDWTzfST5kutoggELMrs2T0X35Irzll7eR9A' LIMIT 1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["target_id", 1062], ["target_type", "User"], ["token", "JA4psYzqIDWTzfST5kutoggELMrs2T0X35Irzll7eR9A"], ["type", "NewPostNotification"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.8ms)[0m UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 292 [["active", false], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Load (0.7ms)[0m SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 1062 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
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Exists (0.5ms)[0m SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'v6UZD1uPLhC2x-Cy3aXcSQvh8MknMzUZbwh9U0w2S-7A' LIMIT 1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["target_id", 1062], ["target_type", "User"], ["token", "v6UZD1uPLhC2x-Cy3aXcSQvh8MknMzUZbwh9U0w2S-7A"], ["type", "NewPostNotification"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Exists (0.6ms)[0m [1mSELECT 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" = 1063) LIMIT 1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["target_id", 1063], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Exists (0.5ms)[0m [1mSELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 243 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1063) LIMIT 1[0m
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1063 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.5ms)[0m 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" = 1064) LIMIT 1
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["target_id", 1064], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.5ms)[0m SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 244 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1064) LIMIT 1
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1064 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Exists (0.5ms)[0m [1mSELECT 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" = 1065) LIMIT 1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["target_id", 1065], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Exists (0.5ms)[0m [1mSELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 245 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 1065) LIMIT 1[0m
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.5ms)[0m 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" = 1065) LIMIT 1
+ [1m[36m (0.3ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1065 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mNotifyUser::Unsubscribe Load (0.5ms)[0m [1mSELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1065 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mDELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1[0m [["id", 245]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Load (0.4ms)[0m [1mSELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1065 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.7ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 1066 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.7ms)[0m [1mINSERT 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"[0m [["created_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 1066], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Exists (0.5ms)[0m [1mSELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'vHkH1R7s9fvPv3JlSBgDrwnqWXGWBSRgEWag81knQD_A' LIMIT 1[0m
+ [1m[35mSQL (0.4ms)[0m 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", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["target_id", 1067], ["target_type", "User"], ["token", "vHkH1R7s9fvPv3JlSBgDrwnqWXGWBSRgEWag81knQD_A"], ["type", "NewPostNotification"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Exists (0.5ms)[0m SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'vHkH1R7s9fvPv3JlSBgDrwnqWXGWBSRgEWag81knQD_A' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Exists (0.4ms)[0m [1mSELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'ic9rRFMJdRkO5YQbv1AhRwbxAtumif7DaI8GUWMSSb9Q' LIMIT 1[0m
+ [1m[35mSQL (0.5ms)[0m 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", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["target_id", 1068], ["target_type", "User"], ["token", "ic9rRFMJdRkO5YQbv1AhRwbxAtumif7DaI8GUWMSSb9Q"], ["type", "NewPostNotification"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.7ms)[0m [1mUPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 295[0m [["active", false], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Exists (0.6ms)[0m [1mSELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'ic9rRFMJdRkO5YQbv1AhRwbxAtumif7DaI8GUWMSSb9Q' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Exists (0.5ms)[0m SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'fTnvK8mwRB-WCKnkrXbDXAONZei0UsjS4vp0IkDVtr4A' LIMIT 1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["target_id", 1069], ["target_type", "User"], ["token", "fTnvK8mwRB-WCKnkrXbDXAONZei0UsjS4vp0IkDVtr4A"], ["type", "NewPostNotification"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (1.1ms)[0m UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 296 [["active", false], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[36m (0.5ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.7ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Exists (0.5ms)[0m SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'IeyhdN139dbbYDiZTqTUzAu49noO9fqv9BkIIOVlwXyA' LIMIT 1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00], ["target_id", 1070], ["target_type", "User"], ["token", "IeyhdN139dbbYDiZTqTUzAu49noO9fqv9BkIIOVlwXyA"], ["type", "NewPostNotification"], ["updated_at", Fri, 10 Oct 2014 00:28:13 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.1ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36m (0.1ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m