spec/dummy/rails-4.0.4/log/test.log in notify_user-0.0.19 vs spec/dummy/rails-4.0.4/log/test.log in notify_user-0.0.20
- old
+ new
@@ -15804,5 +15804,2191 @@
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
[1m[35m (0.1ms)[0m BEGIN
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
[1m[35m (0.2ms)[0m BEGIN
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[36m (1.2ms)[0m [1mBEGIN[0m
+ [1m[35m (1.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (15.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:45:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:19 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.4ms)
+Completed 200 OK in 17ms (Views: 13.1ms | ActiveRecord: 0.0ms)
+ [1m[36m (0.5ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.3ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.7ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:19 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 (5.0ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 633 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (3.6ms)[0m INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:19 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 633], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:19 UTC +00:00]]
+ [1m[36m (0.4ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+Processing by NotifyUser::NotificationsController#index as JSON
+ [1m[35m (0.7ms)[0m SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 633 AND "notify_user_notifications"."target_type" = 'User'
+ [1m[36mNotifyUser::BaseNotification Load (3.0ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 633 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0[0m
+Completed 200 OK in 20ms (Views: 10.7ms | ActiveRecord: 3.7ms)
+ [1m[35m (0.4ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.8ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:45:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:19 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" = 634 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:45:19 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 634], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:19 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" = 634 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:45:19 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 634], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:19 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" = 634 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:45:19 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 634], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:19 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+Processing by NotifyUser::NotificationsController#index as HTML
+ [1m[36mNotifyUser::BaseNotification Load (0.7ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 634 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0[0m
+Completed 200 OK in 34ms (Views: 32.5ms | ActiveRecord: 0.7ms)
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:45:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:19 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" = 635 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.9ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:45:19 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 635], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:19 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" = 635 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.7ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:45:19 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 635], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:19 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" = 635 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:45:19 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 635], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:19 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+Processing by NotifyUser::NotificationsController#read as HTML
+ Parameters: {"id"=>"638"}
+ [1m[36mNotifyUser::BaseNotification Load (0.9ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 635 AND "notify_user_notifications"."target_type" = 'User' AND (id = '638') 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", 635]]
+ [1m[35m (0.7ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 635 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (1.9ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 638[0m [["state", "read"], ["updated_at", Thu, 09 Oct 2014 02:45:19 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+Completed 200 OK in 24ms (Views: 1.8ms | ActiveRecord: 4.9ms)
+ [1m[36mNotifyUser::BaseNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 638 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:45:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:19 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" = 636 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:45:19 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 636], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:19 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" = 636 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:45:19 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 636], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:19 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" = 636 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:45:19 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 636], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:19 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+Processing by NotifyUser::NotificationsController#read as HTML
+ Parameters: {"id"=>"641"}
+ [1m[36mNotifyUser::BaseNotification Load (0.7ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 636 AND "notify_user_notifications"."target_type" = 'User' AND (id = '641') ORDER BY "notify_user_notifications"."id" ASC LIMIT 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", 636]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 636 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" = 641[0m [["state", "read"], ["updated_at", Thu, 09 Oct 2014 02:45:19 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+Completed 200 OK in 9ms (Views: 0.5ms | ActiveRecord: 3.1ms)
+Processing by NotifyUser::NotificationsController#read as HTML
+ Parameters: {"id"=>"641"}
+ [1m[36mNotifyUser::BaseNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 636 AND "notify_user_notifications"."target_type" = 'User' AND (id = '641') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 3.7ms)
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.8ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:45:19 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:19 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" = 637 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:45:19 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 637], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:19 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" = 637 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (11.3ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:45:19 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 637], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:19 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" = 637 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:45:19 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 637], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:19 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+Processing by NotifyUser::NotificationsController#mark_all as HTML
+ [1m[36mSQL (1.2ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 637 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('pending','sent'))[0m
+Redirected to http://test.host/notify_user/notifications
+Completed 302 Found in 3ms (ActiveRecord: 1.2ms)
+ [1m[35mNotifyUser::BaseNotification Load (0.5ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 637 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('["pending","sent"]'))
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 638 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 638], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+Processing by NotifyUser::NotificationsController#mark_read as HTML
+ Parameters: {"ids"=>["647"]}
+ [1m[35mSQL (0.6ms)[0m UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 638 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('647'))
+ [1m[36mNotifyUser::BaseNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 638 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('647'))[0m
+Completed 200 OK in 5ms (Views: 2.1ms | ActiveRecord: 1.3ms)
+ [1m[35mNewPostNotification Load (0.9ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 647]]
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 639 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 639], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+Processing by NotifyUser::NotificationsController#mark_read as HTML
+ Parameters: {"ids"=>["648"]}
+ [1m[35mSQL (0.7ms)[0m UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 639 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('648'))
+ [1m[36mNotifyUser::BaseNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 639 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('648'))[0m
+Completed 200 OK in 5ms (Views: 2.6ms | ActiveRecord: 1.3ms)
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 640 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 640], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 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" = 640 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.8ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 640 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.8ms)[0m SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 640) LIMIT 1
+ [1m[36mSQL (2.4ms)[0m [1mINSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["target_id", 640], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 640 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" = 640 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+Completed 200 OK in 25ms (Views: 0.4ms | ActiveRecord: 5.5ms)
+ [1m[36mNotifyUser::Unsubscribe Load (0.5ms)[0m [1mSELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 640 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:20 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.9ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 641 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 641], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
+ [1m[35m (0.2ms)[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" = 641 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.6ms)[0m SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 641 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 641 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" = 641 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+Completed 200 OK in 5ms (Views: 0.4ms | ActiveRecord: 1.7ms)
+ [1m[36mNotifyUser::Unsubscribe Load (0.5ms)[0m [1mSELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 641 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.7ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 642 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 642], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+Processing by NotifyUser::NotificationsController#unsubscribe as HTML
+ Parameters: {"type"=>"NewPostNotification"}
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.5ms)[0m SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 642) LIMIT 1
+ [1m[36mSQL (0.7ms)[0m [1mINSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["target_id", 642], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
+ [1m[35m (0.4ms)[0m RELEASE SAVEPOINT active_record_1
+Redirected to http://test.host/notify_user/notifications/unsubscribe
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 642 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" = 642 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+Completed 302 Found in 9ms (ActiveRecord: 2.7ms)
+ [1m[36mNotifyUser::Unsubscribe Load (0.5ms)[0m [1mSELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" ORDER BY "notify_user_unsubscribes"."id" DESC LIMIT 1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:20 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" = 643 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 643], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (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" = 643) LIMIT 1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["target_id", 643], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 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" = 643 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.8ms)[0m [1mDELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1[0m [["id", 152]]
+ [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.9ms)
+ [1m[36mNotifyUser::Unsubscribe Load (0.4ms)[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.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 644 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 644], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Load (2.3ms)[0m [1mSELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 644 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1[0m
+ [1m[35m (0.4ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Exists (0.5ms)[0m [1mSELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'mk3iqEpHYbd-YO5EMtz_-QVMbX46-TPQSFlChvi1UZIw' LIMIT 1[0m
+ [1m[35mSQL (2.4ms)[0m INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["target_id", 644], ["target_type", "User"], ["token", "mk3iqEpHYbd-YO5EMtz_-QVMbX46-TPQSFlChvi1UZIw"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 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"=>"mk3iqEpHYbd-YO5EMtz_-QVMbX46-TPQSFlChvi1UZIw"}
+ [1m[35mNotifyUser::UserHash Exists (0.5ms)[0m SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'mk3iqEpHYbd-YO5EMtz_-QVMbX46-TPQSFlChvi1UZIw' 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" = 'mk3iqEpHYbd-YO5EMtz_-QVMbX46-TPQSFlChvi1UZIw' 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", 644]]
+ [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" = 644) LIMIT 1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["target_id", 644], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 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" = 186 [["active", false], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+Completed 200 OK in 13ms (Views: 0.5ms | ActiveRecord: 4.5ms)
+ [1m[35mNotifyUser::UserHash Load (0.5ms)[0m SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" ORDER BY "notify_user_user_hashes"."id" DESC LIMIT 1
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[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[36mNotifyUser::UserHash Load (0.8ms)[0m [1mSELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Load (0.9ms)[0m SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.3ms)[0m BEGIN
+ [1m[36mNotifyUser::UserHash Load (1.0ms)[0m [1mSELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Load (0.8ms)[0m SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" 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.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 645 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.8ms)[0m INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["state", "pending"], ["target_id", 645], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 645 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.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:20 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" = 646 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["state", "pending"], ["target_id", 646], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:20 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" = 647 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["state", "pending"], ["target_id", 647], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:20 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" = 648 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["state", "pending"], ["target_id", 648], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 648 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (1.1ms)[0m UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 657 [["params", {"listing_id"=>1}], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNewPostNotification Load (0.6ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') 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.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 649 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["state", "pending"], ["target_id", 649], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 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" = 649 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" = 658 [["params", {"listing_id"=>1}], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNewPostNotification Load (0.8ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') 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.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:20 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" = 650 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["state", "pending"], ["target_id", 650], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 650 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" = 659 [["params", {:listing_id=>1}], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNewPostNotification Load (0.6ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') ORDER BY "notify_user_notifications"."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.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:20 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" = 651 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["state", "pending"], ["target_id", 651], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 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" = 651 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" = 660 [["params", {:listing_id=>1}], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNewPostNotification Load (0.6ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.7ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:20 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.7ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 652 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["state", "pending"], ["target_id", 652], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.4ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.4ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 653 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["state", "pending"], ["target_id", 653], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.7ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 653 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.8ms)[0m SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 653 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 662)
+ [1m[36mNotifyUser::BaseNotification Load (1.0ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1[0m [["id", 662]]
+ [1m[35mUser Load (0.5ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 653]]
+ [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" = 653 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mUser Load (0.5ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 653]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 653 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" = 662[0m [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 02:45:20 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" = 662 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+ [1m[35mUser Load (0.5ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 653]]
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 653 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'[0m
+ [1m[35mNewPostNotification Load (0.6ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 662 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", 653]]
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 653 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 654 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["state", "pending"], ["target_id", 654], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 654 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.7ms)[0m [1mSELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 654 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 663)[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", 663]]
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 654]]
+ [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" = 654 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 654]]
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 654 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" = 663 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 02:45:20 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" = 663 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", 654]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 654 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
+ [1m[36mNewPostNotification Load (1.0ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 663 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+ [1m[35mUser Load (0.6ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 654]]
+ [1m[36m (0.8ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 654 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'[0m
+ [1m[35m (0.5ms)[0m ROLLBACK
+ [1m[36m (0.3ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.7ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:20 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" = 655 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.7ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["state", "pending"], ["target_id", 655], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 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" = 655 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 655 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 664)
+ [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" = 655 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["state", "pending"], ["target_id", 655], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 655 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 665)[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.3ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 656 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["state", "pending"], ["target_id", 656], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 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" = 656 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["state", "pending"], ["target_id", 656], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
+ [1m[35m (0.3ms)[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", 667]]
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 656]]
+ [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" = 656 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mUser Load (0.5ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 656]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 656 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" = 666[0m [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 656]]
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 656 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.8ms)[0m UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 667 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 656 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" = 656 AND "notify_user_user_hashes"."target_type" = 'User' 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" = 'f5pWZTHtFQ2aMsKJ-v_s7w-c-lSgqXJL-jzg5LHYj5TQ' LIMIT 1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["target_id", 656], ["target_type", "User"], ["token", "f5pWZTHtFQ2aMsKJ-v_s7w-c-lSgqXJL-jzg5LHYj5TQ"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+
+Sent mail to user@example.com (19.0ms)
+Date: Thu, 09 Oct 2014 13:45:20 +1100
+From: please-change-me-at-config-initializers-notify-user@example.com
+To: user@example.com
+Message-ID: <5435f6c08d7f1_7dd3ff86c865bec479c4@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=3Df5pWZTHtFQ2aMsKJ-v_s7w-c-lSgqXJL-jzg5LHYj5TQ&typ=
+e=3DNewPostNotification">Unsubscribe</a>
+ </p>
+ <p style=3D"text-align: center;">
+ This is the default generated layout. A privacy declaration could g=
+o here.
+ </p>
+ <p style=3D"text-align: center; margin-bottom: 0px;">
+ =C2=A9 MyCompany Pty Ltd
+ </p>
+ <p style=3D"text-align: center; margin-top: 0px; padding-top: 0px;">
+ ABN 123 456 789
+ </p>
+ </div>
+</div>
+</body>
+</html>=
+
+ [1m[35m (0.4ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 657 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["state", "pending"], ["target_id", 657], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::BaseNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1[0m [["id", 668]]
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 657]]
+ [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" = 657 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 657]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 657 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" = 668[0m [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 02:45:20 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" = 668 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", 657]]
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 657 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" = 657 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Exists (0.4ms)[0m SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'mGlK9tOKpYzvBl8XU0ZtKguldot5lWij00hM_dAeqaQQ' LIMIT 1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["target_id", 657], ["target_type", "User"], ["token", "mGlK9tOKpYzvBl8XU0ZtKguldot5lWij00hM_dAeqaQQ"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+
+Sent mail to user@example.com (5.7ms)
+Date: Thu, 09 Oct 2014 13:45:20 +1100
+From: please-change-me-at-config-initializers-notify-user@example.com
+To: user@example.com
+Message-ID: <5435f6c098e85_7dd3ff86c865bec48014@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=3DmGlK9tOKpYzvBl8XU0ZtKguldot5lWij00hM_dAeqaQQ&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.9ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 657 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.1ms)[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" = 658) LIMIT 1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["target_id", 658], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 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" = 658 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.3ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::BaseNotification Load (0.8ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" IS NULL ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 659 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["state", "pending"], ["target_id", 659], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 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" = 669 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", 659]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 659 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.3ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 660 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["state", "pending"], ["target_id", 660], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 660 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["state", "pending"], ["target_id", 660], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::BaseNotification Load (0.6ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 671]]
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 660]]
+ [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" = 660 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 660]]
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 660 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (1.3ms)[0m UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 670 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
+ [1m[36m (0.4ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 660]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 660 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" = 671[0m [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 660 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" = 660 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Exists (0.4ms)[0m SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'Js6uPX6J6cvDUfaOf_5-WgDE-PNy214qpyyGhuW0jZqA' LIMIT 1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["target_id", 660], ["target_type", "User"], ["token", "Js6uPX6J6cvDUfaOf_5-WgDE-PNy214qpyyGhuW0jZqA"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+
+Sent mail to user@example.com (5.3ms)
+Date: Thu, 09 Oct 2014 13:45:20 +1100
+From: please-change-me-at-config-initializers-notify-user@example.com
+To: user@example.com
+Message-ID: <5435f6c0ac385_7dd3ff86c865bec481b8@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=3DJs6uPX6J6cvDUfaOf_5-WgDE-PNy214qpyyGhuW0jZqA&typ=
+e=3DNewPostNotification">Unsubscribe</a>
+ </p>
+ <p style=3D"text-align: center;">
+ This is the default generated layout. A privacy declaration could g=
+o here.
+ </p>
+ <p style=3D"text-align: center; margin-bottom: 0px;">
+ =C2=A9 MyCompany Pty Ltd
+ </p>
+ <p style=3D"text-align: center; margin-top: 0px; padding-top: 0px;">
+ ABN 123 456 789
+ </p>
+ </div>
+</div>
+</body>
+</html>=
+
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:20 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" = 661 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["state", "pending"], ["target_id", 661], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::BaseNotification Load (0.5ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 672]]
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 661]]
+ [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" = 661 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 661]]
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 661 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.8ms)[0m UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 672 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 02:45:20 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" = 672 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", 661]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 661 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
+ [1m[36mNotifyUser::UserHash Load (0.8ms)[0m [1mSELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 661 AND "notify_user_user_hashes"."target_type" = 'User' 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" = 'gR2PDnEqXmqsynA0OJ6MPAVVvJT2xrTbkKL-iTarCabQ' LIMIT 1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["target_id", 661], ["target_type", "User"], ["token", "gR2PDnEqXmqsynA0OJ6MPAVVvJT2xrTbkKL-iTarCabQ"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+
+Sent mail to user@example.com (7.2ms)
+Date: Thu, 09 Oct 2014 13:45:20 +1100
+From: please-change-me-at-config-initializers-notify-user@example.com
+To: user@example.com
+Message-ID: <5435f6c0b5e31_7dd3ff86c865bec48254@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=3DgR2PDnEqXmqsynA0OJ6MPAVVvJT2xrTbkKL-iTarCabQ&typ=
+e=3DNewPostNotification">Unsubscribe</a>
+ </p>
+ <p style=3D"text-align: center;">
+ This is the default generated layout. A privacy declaration could g=
+o here.
+ </p>
+ <p style=3D"text-align: center; margin-bottom: 0px;">
+ =C2=A9 MyCompany Pty Ltd
+ </p>
+ <p style=3D"text-align: center; margin-top: 0px; padding-top: 0px;">
+ ABN 123 456 789
+ </p>
+ </div>
+</div>
+</body>
+</html>=
+
+ [1m[35m (0.5ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.7ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 662 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["state", "pending"], ["target_id", 662], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 662 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" = 662 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 662 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" = 673[0m [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNewPostNotification Load (0.7ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 673 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", 662]]
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 662 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" = 662 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:20 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" = 663) LIMIT 1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["target_id", 663], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 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" = 663 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 663 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 663 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:20 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 (1.2ms)[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" = 664) LIMIT 1[0m
+ [1m[35mSQL (0.9ms)[0m INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["target_id", 664], ["target_type", "User"], ["type", "action_mailer"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 664 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["state", "pending"], ["target_id", 664], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 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" = 664 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" = 664 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 664 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (1.2ms)[0m UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 674 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNewPostNotification Load (0.9ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 674 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", 664]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 664 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" = 664 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.7ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 665 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.7ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["state", "pending"], ["target_id", 665], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Load (0.6ms)[0m [1mSELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 665 AND "notify_user_user_hashes"."target_type" = 'User' 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" = 'vLgMBRSKz-15ScaoKRtOVQZHvUBwdo9aiWIZJ6w59HEA' LIMIT 1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["target_id", 665], ["target_type", "User"], ["token", "vLgMBRSKz-15ScaoKRtOVQZHvUBwdo9aiWIZJ6w59HEA"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 666 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["state", "pending"], ["target_id", 666], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Load (0.6ms)[0m [1mSELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 666 AND "notify_user_user_hashes"."target_type" = 'User' 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" = 'GqnQWRF1i8zem3bIAmRpWAKbpPbjTjdOVF_TpdEDI8Yw' LIMIT 1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["target_id", 666], ["target_type", "User"], ["token", "GqnQWRF1i8zem3bIAmRpWAKbpPbjTjdOVF_TpdEDI8Yw"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Load (0.8ms)[0m SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 666 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.3ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:20 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" = 667 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["state", "pending"], ["target_id", 667], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 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" = 667 AND "notify_user_user_hashes"."target_type" = 'User' 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" = 'Eu_iBzaQ6lk5YwKZ-xMSVgmHE4pysyORaEFO-647GMDg' LIMIT 1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["target_id", 667], ["target_type", "User"], ["token", "Eu_iBzaQ6lk5YwKZ-xMSVgmHE4pysyORaEFO-647GMDg"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (1.0ms)[0m UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 193 [["active", false], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Load (0.8ms)[0m SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 667 AND "notify_user_user_hashes"."target_type" = 'User' 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" = '8BiXYl_9mquRt5YNLPoTCw_x6aOQdDOJKp9RAngUfmfw' LIMIT 1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["target_id", 667], ["target_type", "User"], ["token", "8BiXYl_9mquRt5YNLPoTCw_x6aOQdDOJKp9RAngUfmfw"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:20 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.4ms)[0m [1mSELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 668) LIMIT 1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["target_id", 668], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Exists (0.6ms)[0m [1mSELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 157 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 668) LIMIT 1[0m
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 668 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.3ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (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" = 669) LIMIT 1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["target_id", 669], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 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"."id" != 158 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 669) LIMIT 1
+ [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" = 669 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Exists (0.4ms)[0m [1mSELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 670) LIMIT 1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["target_id", 670], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[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" != 159 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 670) LIMIT 1[0m
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (1.1ms)[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" = 670) LIMIT 1
+ [1m[36m (0.3ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Load (0.6ms)[0m SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" ORDER BY "notify_user_unsubscribes"."id" DESC LIMIT 1
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[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" = 671) LIMIT 1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["target_id", 671], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Exists (0.6ms)[0m [1mSELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 160 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 671) LIMIT 1[0m
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.5ms)[0m SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 671) LIMIT 1
+ [1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 671 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mNotifyUser::Unsubscribe Load (0.5ms)[0m [1mSELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 671 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mDELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1[0m [["id", 160]]
+ [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" = 671 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.8ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:20 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" = 672 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 672], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Exists (0.4ms)[0m [1mSELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'WHDH408QKbIGTfi9QGPwdAxvAoK_Go4ZkiIbo3Ztco4Q' LIMIT 1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["target_id", 673], ["target_type", "User"], ["token", "WHDH408QKbIGTfi9QGPwdAxvAoK_Go4ZkiIbo3Ztco4Q"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Exists (0.5ms)[0m SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'WHDH408QKbIGTfi9QGPwdAxvAoK_Go4ZkiIbo3Ztco4Q' 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.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Exists (0.7ms)[0m [1mSELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'OvF3GDjSYj2s4v6cpEvzQw4wISrizYwgasisxpmTBIeA' LIMIT 1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["target_id", 674], ["target_type", "User"], ["token", "OvF3GDjSYj2s4v6cpEvzQw4wISrizYwgasisxpmTBIeA"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.9ms)[0m [1mUPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 196[0m [["active", false], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Exists (0.5ms)[0m [1mSELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'OvF3GDjSYj2s4v6cpEvzQw4wISrizYwgasisxpmTBIeA' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.3ms)[0m [1mBEGIN[0m
+ [1m[35m (0.4ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Exists (0.5ms)[0m SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'rkQCo9-XpUa1QTS_SKWyrAhbeIIlgUxF8GSj56vIlaow' LIMIT 1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00], ["target_id", 675], ["target_type", "User"], ["token", "rkQCo9-XpUa1QTS_SKWyrAhbeIIlgUxF8GSj56vIlaow"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:20 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m 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" = 197 [["active", false], ["updated_at", Thu, 09 Oct 2014 02:45:21 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:45:21 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:45:21 UTC +00:00]]
+ [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Exists (0.5ms)[0m SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '_ucfRwO103DOCesXk1Tu_wIXCMOIZ_pkakYD6Zw2LvLw' LIMIT 1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:45:21 UTC +00:00], ["target_id", 676], ["target_type", "User"], ["token", "_ucfRwO103DOCesXk1Tu_wIXCMOIZ_pkakYD6Zw2LvLw"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:45:21 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.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [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.3ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[36m (0.3ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (7.3ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:52:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:13 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+Processing by NotifyUser::NotificationsController#index as HTML
+ Rendered /Users/william/Papercloud/notify_user/app/views/notify_user/base_notifications/index.html.erb within layouts/application (0.3ms)
+Completed 200 OK in 14ms (Views: 11.6ms | ActiveRecord: 0.0ms)
+ [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.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:13 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (1.3ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 678 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (1.5ms)[0m INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:13 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 678], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:13 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+Processing by NotifyUser::NotificationsController#index as JSON
+ [1m[35m (1.0ms)[0m SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 678 AND "notify_user_notifications"."target_type" = 'User'
+ [1m[36mNotifyUser::BaseNotification Load (1.3ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 678 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0[0m
+Completed 200 OK in 21ms (Views: 12.2ms | ActiveRecord: 2.3ms)
+ [1m[35m (0.5ms)[0m ROLLBACK
+ [1m[36m (0.3ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.7ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:52:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:13 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 679 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", Thu, 09 Oct 2014 02:52:13 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 679], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:13 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 679 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:52:13 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 679], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:13 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 679 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", Thu, 09 Oct 2014 02:52:13 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 679], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:13 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+Processing by NotifyUser::NotificationsController#index as HTML
+ [1m[36mNotifyUser::BaseNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 679 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0[0m
+Completed 200 OK in 47ms (Views: 45.4ms | ActiveRecord: 0.6ms)
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:52:13 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:13 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" = 680 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:52:13 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 680], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:13 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" = 680 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:52:13 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 680], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:13 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" = 680 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:52:13 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 680], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:13 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+Processing by NotifyUser::NotificationsController#read as HTML
+ Parameters: {"id"=>"683"}
+ [1m[36mNotifyUser::BaseNotification Load (0.8ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 680 AND "notify_user_notifications"."target_type" = 'User' AND (id = '683') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mUser Load (0.7ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 680]]
+ [1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 680 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" = 683[0m [["state", "read"], ["updated_at", Thu, 09 Oct 2014 02:52:13 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+Completed 200 OK in 19ms (Views: 1.8ms | ActiveRecord: 3.2ms)
+ [1m[36mNotifyUser::BaseNotification Load (0.7ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 683 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+ [1m[35m (0.6ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:14 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" = 681 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 681], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 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" = 681 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 681], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 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" = 681 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 681], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+Processing by NotifyUser::NotificationsController#read as HTML
+ Parameters: {"id"=>"686"}
+ [1m[36mNotifyUser::BaseNotification Load (0.8ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 681 AND "notify_user_notifications"."target_type" = 'User' AND (id = '686') ORDER BY "notify_user_notifications"."id" ASC LIMIT 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", 681]]
+ [1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 681 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" = 686[0m [["state", "read"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+Completed 200 OK in 9ms (Views: 0.6ms | ActiveRecord: 2.8ms)
+Processing by NotifyUser::NotificationsController#read as HTML
+ Parameters: {"id"=>"686"}
+ [1m[36mNotifyUser::BaseNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 681 AND "notify_user_notifications"."target_type" = 'User' AND (id = '686') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 3.4ms)
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:14 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" = 682 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.7ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 682], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 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" = 682 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", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 682], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 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" = 682 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 682], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 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" = 682 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('pending','sent'))[0m
+Redirected to http://test.host/notify_user/notifications
+Completed 302 Found in 3ms (ActiveRecord: 1.1ms)
+ [1m[35mNotifyUser::BaseNotification Load (0.6ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 682 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('["pending","sent"]'))
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 683 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.7ms)[0m INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 683], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+Processing by NotifyUser::NotificationsController#mark_read as HTML
+ Parameters: {"ids"=>["692"]}
+ [1m[35mSQL (0.7ms)[0m UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 683 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('692'))
+ [1m[36mNotifyUser::BaseNotification Load (0.5ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 683 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('692'))[0m
+Completed 200 OK in 4ms (Views: 1.7ms | ActiveRecord: 1.1ms)
+ [1m[35mNewPostNotification Load (0.8ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 692]]
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 684 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 684], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+Processing by NotifyUser::NotificationsController#mark_read as HTML
+ Parameters: {"ids"=>["693"]}
+ [1m[35mSQL (0.6ms)[0m UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 684 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('693'))
+ [1m[36mNotifyUser::BaseNotification Load (0.7ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 684 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('693'))[0m
+Completed 200 OK in 4ms (Views: 1.8ms | ActiveRecord: 1.3ms)
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:14 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" = 685 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 685], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Load (0.5ms)[0m [1mSELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 685 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+Processing by NotifyUser::NotificationsController#subscriptions as HTML
+ Parameters: {"types"=>[{"type"=>"NewPostNotification", "status"=>"0"}]}
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 685 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.4ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.8ms)[0m SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 685) LIMIT 1
+ [1m[36mSQL (1.8ms)[0m [1mINSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["target_id", 685], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 685 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" = 685 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+Completed 200 OK in 37ms (Views: 0.5ms | ActiveRecord: 5.0ms)
+ [1m[36mNotifyUser::Unsubscribe Load (0.5ms)[0m [1mSELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 685 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.7ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:14 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" = 686 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 686], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Load (0.5ms)[0m [1mSELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 686 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.6ms)[0m SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 686 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" = 686 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" = 686 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+Completed 200 OK in 5ms (Views: 0.4ms | ActiveRecord: 1.5ms)
+ [1m[36mNotifyUser::Unsubscribe Load (0.8ms)[0m [1mSELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 686 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:14 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" = 687 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 687], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 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" = 687) LIMIT 1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["target_id", 687], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+Redirected to http://test.host/notify_user/notifications/unsubscribe
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 687 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" = 687 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+Completed 302 Found in 8ms (ActiveRecord: 2.7ms)
+ [1m[36mNotifyUser::Unsubscribe Load (0.6ms)[0m [1mSELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" ORDER BY "notify_user_unsubscribes"."id" DESC LIMIT 1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:14 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" = 688 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.7ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 688], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 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" = 688) LIMIT 1
+ [1m[36mSQL (0.7ms)[0m [1mINSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["target_id", 688], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 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" = 688 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.7ms)[0m [1mDELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1[0m [["id", 163]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+Redirected to http://test.host/notify_user/notifications/unsubscribe
+Completed 302 Found in 5ms (ActiveRecord: 1.7ms)
+ [1m[36mNotifyUser::Unsubscribe Load (0.4ms)[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.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:14 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" = 689 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.8ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 689], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Load (0.8ms)[0m [1mSELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 689 AND "notify_user_user_hashes"."target_type" = 'User' 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" = 'q_JopiTRTFuUm3RroaB_PglxdfflO2Q4KBEOz39MO0YA' LIMIT 1[0m
+ [1m[35mSQL (1.6ms)[0m INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["target_id", 689], ["target_type", "User"], ["token", "q_JopiTRTFuUm3RroaB_PglxdfflO2Q4KBEOz39MO0YA"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 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"=>"q_JopiTRTFuUm3RroaB_PglxdfflO2Q4KBEOz39MO0YA"}
+ [1m[35mNotifyUser::UserHash Exists (0.5ms)[0m SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'q_JopiTRTFuUm3RroaB_PglxdfflO2Q4KBEOz39MO0YA' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1
+ [1m[36mNotifyUser::UserHash Load (0.5ms)[0m [1mSELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'q_JopiTRTFuUm3RroaB_PglxdfflO2Q4KBEOz39MO0YA' AND "notify_user_user_hashes"."type" = 'NewPostNotification' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1[0m
+ [1m[35mUser Load (0.7ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 689]]
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.6ms)[0m SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 689) LIMIT 1
+ [1m[36mSQL (0.7ms)[0m [1mINSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["target_id", 689], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
+ [1m[35m (0.4ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[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" = 199 [["active", false], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+Completed 200 OK in 14ms (Views: 0.5ms | ActiveRecord: 5.2ms)
+ [1m[35mNotifyUser::UserHash Load (0.5ms)[0m SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" ORDER BY "notify_user_user_hashes"."id" DESC LIMIT 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.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.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[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[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.8ms)[0m SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:14 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" = 690 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", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["state", "pending"], ["target_id", 690], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.7ms)[0m SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 690 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", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:14 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" = 691 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["state", "pending"], ["target_id", 691], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:14 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" = 692 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.7ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["state", "pending"], ["target_id", 692], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:14 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" = 693 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["state", "pending"], ["target_id", 693], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 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" = 693 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" = 702 [["params", {"listing_id"=>1}], ["updated_at", Thu, 09 Oct 2014 02:52:14 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.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:14 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" = 694 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.7ms)[0m INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["state", "pending"], ["target_id", 694], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 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" = 694 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" = 703 [["params", {"listing_id"=>1}], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
+ [1m[36m (0.3ms)[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.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:14 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" = 695 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["state", "pending"], ["target_id", 695], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 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" = 695 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" = 704 [["params", {:listing_id=>1}], ["updated_at", Thu, 09 Oct 2014 02:52:14 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", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:14 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" = 696 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["state", "pending"], ["target_id", 696], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 696 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" = 705 [["params", {:listing_id=>1}], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNewPostNotification Load (0.6ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') 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", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:14 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" = 697 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["state", "pending"], ["target_id", 697], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:14 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" = 698 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["state", "pending"], ["target_id", 698], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 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" = 698 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" = 698 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 707)
+ [1m[36mNotifyUser::BaseNotification Load (0.9ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1[0m [["id", 707]]
+ [1m[35mUser Load (0.6ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 698]]
+ [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" = 698 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mUser Load (0.6ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 698]]
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 698 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" = 707[0m [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::BaseNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 707 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", 698]]
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 698 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'[0m
+ [1m[35mNewPostNotification Load (0.6ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 707 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", 698]]
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 698 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:14 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" = 699 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["state", "pending"], ["target_id", 699], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 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" = 699 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 699 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 708)[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", 708]]
+ [1m[36mUser Load (0.5ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 699]]
+ [1m[35mNotifyUser::BaseNotification Load (0.7ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 699 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 699]]
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 699 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" = 708 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::BaseNotification Load (0.8ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 708 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", 699]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 699 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
+ [1m[36mNewPostNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 708 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+ [1m[35mUser Load (0.5ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 699]]
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 699 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:14 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" = 700 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["state", "pending"], ["target_id", 700], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 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" = 700 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" = 700 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 709)
+ [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" = 700 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["state", "pending"], ["target_id", 700], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.7ms)[0m [1mSELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 700 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 710)[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:14 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" = 701 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["state", "pending"], ["target_id", 701], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 701 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["state", "pending"], ["target_id", 701], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 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", 712]]
+ [1m[35mUser Load (0.5ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 701]]
+ [1m[36mNotifyUser::BaseNotification Load (0.7ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 701 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 701]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 701 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" = 711[0m [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 02:52:14 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", 701]]
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 701 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" = 712 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 701 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" = 701 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Exists (0.4ms)[0m [1mSELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'mNrLW9-94Z5vvZ9fMV0VcAZJ4NVb7EAtPSr9-yYOcNlw' LIMIT 1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["target_id", 701], ["target_type", "User"], ["token", "mNrLW9-94Z5vvZ9fMV0VcAZJ4NVb7EAtPSr9-yYOcNlw"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+
+Sent mail to user@example.com (9.9ms)
+Date: Thu, 09 Oct 2014 13:52:14 +1100
+From: please-change-me-at-config-initializers-notify-user@example.com
+To: user@example.com
+Message-ID: <5435f85e9bc1f_83a3fd47d865bf0709b6@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=3DmNrLW9-94Z5vvZ9fMV0VcAZJ4NVb7EAtPSr9-yYOcNlw&typ=
+e=3DNewPostNotification">Unsubscribe</a>
+ </p>
+ <p style=3D"text-align: center;">
+ This is the default generated layout. A privacy declaration could g=
+o here.
+ </p>
+ <p style=3D"text-align: center; margin-bottom: 0px;">
+ =C2=A9 MyCompany Pty Ltd
+ </p>
+ <p style=3D"text-align: center; margin-top: 0px; padding-top: 0px;">
+ ABN 123 456 789
+ </p>
+ </div>
+</div>
+</body>
+</html>=
+
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:14 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" = 702 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["state", "pending"], ["target_id", 702], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 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", 713]]
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 702]]
+ [1m[36mNotifyUser::BaseNotification Load (0.7ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 702 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 702]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 702 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" = 713[0m [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::BaseNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 713 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", 702]]
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 702 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" = 702 AND "notify_user_user_hashes"."target_type" = 'User' 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" = 'yhhGdzmuD5lmBl098WG4Rwl850q7ItiqH38q0U-zk54g' LIMIT 1
+ [1m[36mSQL (0.7ms)[0m [1mINSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["target_id", 702], ["target_type", "User"], ["token", "yhhGdzmuD5lmBl098WG4Rwl850q7ItiqH38q0U-zk54g"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+
+Sent mail to user@example.com (5.6ms)
+Date: Thu, 09 Oct 2014 13:52:14 +1100
+From: please-change-me-at-config-initializers-notify-user@example.com
+To: user@example.com
+Message-ID: <5435f85ea787b_83a3fd47d865bf0710a6@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=3DyhhGdzmuD5lmBl098WG4Rwl850q7ItiqH38q0U-zk54g&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" = 702 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:14 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" = 703) LIMIT 1
+ [1m[36mSQL (0.7ms)[0m [1mINSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["target_id", 703], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 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" = 703 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.3ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::BaseNotification Load (0.6ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" IS NULL ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 704 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["state", "pending"], ["target_id", 704], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 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" = 714 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", 704]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 704 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:14 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" = 705 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["state", "pending"], ["target_id", 705], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 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" = 705 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["state", "pending"], ["target_id", 705], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 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", 716]]
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 705]]
+ [1m[35mNotifyUser::BaseNotification Load (0.8ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 705 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 705]]
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 705 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" = 715 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 705]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 705 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" = 716[0m [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 02:52:14 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" = 705 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" = 705 AND "notify_user_user_hashes"."target_type" = 'User' 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" = 'Cb_K8FalA7rdLB0a8MHjSwAU64LhgRaHOXAPlJay6TfA' LIMIT 1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["target_id", 705], ["target_type", "User"], ["token", "Cb_K8FalA7rdLB0a8MHjSwAU64LhgRaHOXAPlJay6TfA"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+
+Sent mail to user@example.com (5.6ms)
+Date: Thu, 09 Oct 2014 13:52:14 +1100
+From: please-change-me-at-config-initializers-notify-user@example.com
+To: user@example.com
+Message-ID: <5435f85ebbb37_83a3fd47d865bf07116@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=3DCb_K8FalA7rdLB0a8MHjSwAU64LhgRaHOXAPlJay6TfA&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.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:14 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" = 706 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.7ms)[0m INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["state", "pending"], ["target_id", 706], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::BaseNotification Load (0.6ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 717]]
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 706]]
+ [1m[35mNotifyUser::BaseNotification Load (0.7ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 706 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 706]]
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 706 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" = 717 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::BaseNotification Load (0.8ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 717 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", 706]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 706 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" = 706 AND "notify_user_user_hashes"."target_type" = 'User' 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" = 'iEjctGhyhtQukm4lAKhJowErALgaBRoGrAEbUku7TP-w' LIMIT 1[0m
+ [1m[35mSQL (0.7ms)[0m INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["target_id", 706], ["target_type", "User"], ["token", "iEjctGhyhtQukm4lAKhJowErALgaBRoGrAEbUku7TP-w"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+
+Sent mail to user@example.com (6.1ms)
+Date: Thu, 09 Oct 2014 13:52:14 +1100
+From: please-change-me-at-config-initializers-notify-user@example.com
+To: user@example.com
+Message-ID: <5435f85ec6524_83a3fd47d865bf0712ad@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=3DiEjctGhyhtQukm4lAKhJowErALgaBRoGrAEbUku7TP-w&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.8ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:14 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" = 707 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["state", "pending"], ["target_id", 707], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 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" = 707 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 707 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 707 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" = 718[0m [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNewPostNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 718 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 707]]
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 707 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" = 707 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:14 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" = 708) LIMIT 1[0m
+ [1m[35mSQL (0.7ms)[0m INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["target_id", 708], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 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" = 708 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 [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 708 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 708 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:14 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" = 'action_mailer' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 709) LIMIT 1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["target_id", 709], ["target_type", "User"], ["type", "action_mailer"], ["updated_at", Thu, 09 Oct 2014 02:52:14 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" = 709 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["state", "pending"], ["target_id", 709], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 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" = 709 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" = 709 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 709 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" = 719 [["state", "sent"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNewPostNotification Load (0.4ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 719 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", 709]]
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 709 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" = 709 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:14 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" = 710 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["state", "pending"], ["target_id", 710], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 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" = 710 AND "notify_user_user_hashes"."target_type" = 'User' 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" = 'UiYSjcdz8ohqPnR8an8HmAcI3dJ2mtC8rEEn1iiAz2aw' LIMIT 1[0m
+ [1m[35mSQL (0.7ms)[0m INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["target_id", 710], ["target_type", "User"], ["token", "UiYSjcdz8ohqPnR8an8HmAcI3dJ2mtC8rEEn1iiAz2aw"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
+ [1m[36m (0.4ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:14 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" = 711 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["state", "pending"], ["target_id", 711], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 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" = 711 AND "notify_user_user_hashes"."target_type" = 'User' 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" = 'k5ZirhYOjP1G91PQGeUnuwrFy-nuLnFu2Z4QR7ENo8TA' LIMIT 1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["target_id", 711], ["target_type", "User"], ["token", "k5ZirhYOjP1G91PQGeUnuwrFy-nuLnFu2Z4QR7ENo8TA"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 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" = 711 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 712 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["state", "pending"], ["target_id", 712], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 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" = 712 AND "notify_user_user_hashes"."target_type" = 'User' 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" = 'F1wJFaWYjLXyHGZDtmYznAqyBTx3Max3Q5u0ho22Mz0w' LIMIT 1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["target_id", 712], ["target_type", "User"], ["token", "F1wJFaWYjLXyHGZDtmYznAqyBTx3Max3Q5u0ho22Mz0w"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.8ms)[0m UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 206 [["active", false], ["updated_at", Thu, 09 Oct 2014 02:52:14 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" = 712 AND "notify_user_user_hashes"."target_type" = 'User' 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" = 'zTeDQCklx8pKv5gJaf6MKw1blHsAQKI32LeXxoG9wHMw' LIMIT 1
+ [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["target_id", 712], ["target_type", "User"], ["token", "zTeDQCklx8pKv5gJaf6MKw1blHsAQKI32LeXxoG9wHMw"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Exists (0.6ms)[0m [1mSELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 713) LIMIT 1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["target_id", 713], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 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.7ms)[0m [1mSELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 168 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 713) 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" = 713 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.3ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.5ms)[0m SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 714) LIMIT 1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["target_id", 714], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 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" != 169 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 714) LIMIT 1
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 714 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 [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Exists (0.6ms)[0m [1mSELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 715) LIMIT 1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["target_id", 715], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:14 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Exists (0.5ms)[0m [1mSELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 170 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 715) 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.4ms)[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" = 715) LIMIT 1
+ [1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Load (0.4ms)[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", Thu, 09 Oct 2014 02:52:14 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:14 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" = 716) LIMIT 1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:15 UTC +00:00], ["target_id", 716], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:15 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Exists (0.5ms)[0m [1mSELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 171 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 716) LIMIT 1[0m
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.5ms)[0m SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 716) LIMIT 1
+ [1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 716 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mNotifyUser::Unsubscribe Load (0.5ms)[0m [1mSELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 716 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.4ms)[0m [1mDELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1[0m [["id", 171]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Load (0.4ms)[0m [1mSELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 716 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:52:15 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:15 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" = 717 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:52:15 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 717], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:15 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:15 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:15 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" = 'gTdZsiJxAdHzLx-dMgJSxg7G7PTfnZzsZtTFOEyQ92Eg' LIMIT 1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:15 UTC +00:00], ["target_id", 718], ["target_type", "User"], ["token", "gTdZsiJxAdHzLx-dMgJSxg7G7PTfnZzsZtTFOEyQ92Eg"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:15 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.6ms)[0m SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'gTdZsiJxAdHzLx-dMgJSxg7G7PTfnZzsZtTFOEyQ92Eg' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' 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", Thu, 09 Oct 2014 02:52:15 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:15 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Exists (0.5ms)[0m [1mSELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'HPeDYZLMXJWAlyMq68BLiQB_i24iJEXut-3hEW1TZ1Ug' LIMIT 1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Thu, 09 Oct 2014 02:52:15 UTC +00:00], ["target_id", 719], ["target_type", "User"], ["token", "HPeDYZLMXJWAlyMq68BLiQB_i24iJEXut-3hEW1TZ1Ug"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:15 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.9ms)[0m [1mUPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 209[0m [["active", false], ["updated_at", Thu, 09 Oct 2014 02:52:15 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Exists (0.6ms)[0m [1mSELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'HPeDYZLMXJWAlyMq68BLiQB_i24iJEXut-3hEW1TZ1Ug' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:52:15 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:15 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Exists (0.5ms)[0m SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'tvV2w9Fk91wU2oM24GvfdQSka-OBC4HkCcKeC2QpgKDg' LIMIT 1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:52:15 UTC +00:00], ["target_id", 720], ["target_type", "User"], ["token", "tvV2w9Fk91wU2oM24GvfdQSka-OBC4HkCcKeC2QpgKDg"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:15 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.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" = 210 [["active", false], ["updated_at", Thu, 09 Oct 2014 02:52:15 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:52:15 UTC +00:00], ["email", "user@example.com"], ["updated_at", Thu, 09 Oct 2014 02:52:15 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Exists (0.5ms)[0m SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '1uhUvoRo3PqccyJy3jyuYQyBL1rBFsVmzmUpfdhqlZmA' LIMIT 1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Thu, 09 Oct 2014 02:52:15 UTC +00:00], ["target_id", 721], ["target_type", "User"], ["token", "1uhUvoRo3PqccyJy3jyuYQyBL1rBFsVmzmUpfdhqlZmA"], ["type", "NewPostNotification"], ["updated_at", Thu, 09 Oct 2014 02:52:15 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m