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