spec/dummy/rails-4.0.4/log/test.log in notify_user-0.0.12 vs spec/dummy/rails-4.0.4/log/test.log in notify_user-0.0.14
- old
+ new
@@ -13093,5 +13093,4461 @@
[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 (1.3ms)[0m [1mBEGIN[0m
+ [1m[35m (1.0ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (10.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Tue, 20 May 2014 09:27:53 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:27:53 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+Processing by NotifyUser::NotificationsController#index as HTML
+ Rendered /Users/william/Papercloud/notify_user/app/views/notify_user/base_notifications/index.html.erb within layouts/application (0.3ms)
+Completed 200 OK in 14ms (Views: 10.7ms | ActiveRecord: 0.0ms)
+ [1m[36m (0.4ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 20 May 2014 09:27:53 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:27:53 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (1.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 524 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (1.6ms)[0m INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Tue, 20 May 2014 09:27:53 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 524], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:27:53 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+Processing by NotifyUser::NotificationsController#index as JSON
+ [1m[35m (0.7ms)[0m SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 524 AND "notify_user_notifications"."target_type" = 'User'
+ [1m[36mNotifyUser::BaseNotification Load (2.5ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 524 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0[0m
+Completed 200 OK in 21ms (Views: 11.4ms | ActiveRecord: 3.2ms)
+ [1m[35m (0.4ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Tue, 20 May 2014 09:27:53 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:27:53 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" = 525 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", Tue, 20 May 2014 09:27:53 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 525], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:27:53 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" = 525 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", Tue, 20 May 2014 09:27:53 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 525], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:27:53 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" = 525 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", Tue, 20 May 2014 09:27:53 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 525], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:27:53 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" = 525 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0[0m
+Completed 200 OK in 43ms (Views: 41.3ms | ActiveRecord: 0.7ms)
+ [1m[35m (0.4ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Tue, 20 May 2014 09:27:53 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:27:53 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" = 526 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", Tue, 20 May 2014 09:27:53 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 526], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:27:53 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" = 526 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", Tue, 20 May 2014 09:27:53 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 526], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:27:53 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" = 526 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", Tue, 20 May 2014 09:27:53 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 526], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:27:53 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+Processing by NotifyUser::NotificationsController#read as HTML
+ Parameters: {"id"=>"525"}
+ [1m[36mNotifyUser::BaseNotification Load (1.0ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 526 AND "notify_user_notifications"."target_type" = 'User' AND (id = '525') 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", 526]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 526 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (2.0ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 525[0m [["state", "read"], ["updated_at", Tue, 20 May 2014 09:27:53 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+Completed 200 OK in 22ms (Views: 2.1ms | ActiveRecord: 4.9ms)
+ [1m[36mNotifyUser::BaseNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 525 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.7ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Tue, 20 May 2014 09:27:53 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:27:53 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" = 527 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", Tue, 20 May 2014 09:27:53 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 527], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:27:53 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" = 527 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", Tue, 20 May 2014 09:27:54 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 527], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 527 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", Tue, 20 May 2014 09:27:54 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 527], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+Processing by NotifyUser::NotificationsController#read as HTML
+ Parameters: {"id"=>"528"}
+ [1m[36mNotifyUser::BaseNotification Load (0.7ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 527 AND "notify_user_notifications"."target_type" = 'User' AND (id = '528') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mUser Load (0.5ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 527]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 527 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" = 528[0m [["state", "read"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+Completed 200 OK in 8ms (Views: 0.3ms | ActiveRecord: 3.0ms)
+Processing by NotifyUser::NotificationsController#read as HTML
+ Parameters: {"id"=>"528"}
+ [1m[36mNotifyUser::BaseNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 527 AND "notify_user_notifications"."target_type" = 'User' AND (id = '528') 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.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", Tue, 20 May 2014 09:27:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 528 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", Tue, 20 May 2014 09:27:54 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 528], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 528 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", Tue, 20 May 2014 09:27:54 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 528], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (1.0ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 528 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", Tue, 20 May 2014 09:27:54 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 528], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+Processing by NotifyUser::NotificationsController#mark_all as HTML
+ [1m[36mSQL (0.9ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 528 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 2ms (ActiveRecord: 0.9ms)
+ [1m[35mNotifyUser::BaseNotification Load (0.5ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 528 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('["pending","sent"]'))
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.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", Tue, 20 May 2014 09:27:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 529 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", Tue, 20 May 2014 09:27:54 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 529], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+Processing by NotifyUser::NotificationsController#mark_read as HTML
+ Parameters: {"ids"=>["534"]}
+ [1m[35mSQL (0.6ms)[0m UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 529 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('534'))
+ [1m[36mNotifyUser::BaseNotification Load (0.5ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 529 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('534'))[0m
+Completed 200 OK in 4ms (Views: 1.7ms | ActiveRecord: 1.1ms)
+ [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", 534]]
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.7ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 20 May 2014 09:27:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 530 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", Tue, 20 May 2014 09:27:54 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 530], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+Processing by NotifyUser::NotificationsController#mark_read as HTML
+ Parameters: {"ids"=>["535"]}
+ [1m[35mSQL (0.6ms)[0m UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 530 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('535'))
+ [1m[36mNotifyUser::BaseNotification Load (0.5ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 530 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('535'))[0m
+Completed 200 OK in 4ms (Views: 1.9ms | ActiveRecord: 1.1ms)
+ [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", Tue, 20 May 2014 09:27:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 531 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", Tue, 20 May 2014 09:27:54 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 531], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:27:54 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" = 531 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+Processing by NotifyUser::NotificationsController#subscriptions as HTML
+ Parameters: {"types"=>[{"type"=>"NewPostNotification", "status"=>"0"}]}
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 531 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.6ms)[0m SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 531) LIMIT 1
+ [1m[36mSQL (1.0ms)[0m [1mINSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Tue, 20 May 2014 09:27:54 UTC +00:00], ["target_id", 531], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:27:54 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" = 531 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" = 531 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+Completed 200 OK in 21ms (Views: 0.5ms | ActiveRecord: 3.6ms)
+ [1m[36mNotifyUser::Unsubscribe Load (0.4ms)[0m [1mSELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 531 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.4ms)[0m ROLLBACK
+ [1m[36m (0.3ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Tue, 20 May 2014 09:27:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 532 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", Tue, 20 May 2014 09:27:54 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 532], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:27:54 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" = 532 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" = 532 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.7ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 532 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" = 532 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+Completed 200 OK in 5ms (Views: 0.3ms | ActiveRecord: 1.7ms)
+ [1m[36mNotifyUser::Unsubscribe Load (0.5ms)[0m [1mSELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 532 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", Tue, 20 May 2014 09:27:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 533 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", Tue, 20 May 2014 09:27:54 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 533], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:27:54 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.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" = 533) 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", Tue, 20 May 2014 09:27:54 UTC +00:00], ["target_id", 533], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+Redirected to http://test.host/notify_user/notifications/unsubscribe
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 533 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" = 533 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.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", Tue, 20 May 2014 09:27:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 534 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", Tue, 20 May 2014 09:27:54 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 534], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[35m (0.6ms)[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" = 534) 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", Tue, 20 May 2014 09:27:54 UTC +00:00], ["target_id", 534], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[35m (0.3ms)[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" = 534 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.6ms)[0m [1mDELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1[0m [["id", 135]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+Redirected to http://test.host/notify_user/notifications/unsubscribe
+Completed 302 Found in 4ms (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.3ms)[0m [1mBEGIN[0m
+ [1m[35m (0.4ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Tue, 20 May 2014 09:27:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 535 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", Tue, 20 May 2014 09:27:54 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 535], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Load (0.8ms)[0m [1mSELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 535 AND "notify_user_user_hashes"."target_type" = 'User' 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" = 'q8DTGLSQj2Cw5gfN9zE4NA1zyaclzyrx6VdMfQ7VpVqw' LIMIT 1[0m
+ [1m[35mSQL (1.2ms)[0m INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 20 May 2014 09:27:54 UTC +00:00], ["target_id", 535], ["target_type", "User"], ["token", "q8DTGLSQj2Cw5gfN9zE4NA1zyaclzyrx6VdMfQ7VpVqw"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+Processing by NotifyUser::NotificationsController#unauth_unsubscribe as HTML
+ Parameters: {"type"=>"NewPostNotification", "token"=>"q8DTGLSQj2Cw5gfN9zE4NA1zyaclzyrx6VdMfQ7VpVqw"}
+ [1m[35mNotifyUser::UserHash Exists (0.5ms)[0m SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'q8DTGLSQj2Cw5gfN9zE4NA1zyaclzyrx6VdMfQ7VpVqw' 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" = 'q8DTGLSQj2Cw5gfN9zE4NA1zyaclzyrx6VdMfQ7VpVqw' AND "notify_user_user_hashes"."type" = 'NewPostNotification' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1[0m
+ [1m[35mUser Load (0.5ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 535]]
+ [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" = 535) LIMIT 1
+ [1m[36mSQL (1.0ms)[0m [1mINSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Tue, 20 May 2014 09:27:54 UTC +00:00], ["target_id", 535], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.9ms)[0m UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 157 [["active", false], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+Completed 200 OK in 13ms (Views: 0.5ms | ActiveRecord: 5.1ms)
+ [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.3ms)[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.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36m (0.4ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36mNotifyUser::UserHash Load (0.7ms)[0m [1mSELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Load (0.7ms)[0m SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36mNotifyUser::UserHash Load (0.8ms)[0m [1mSELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.4ms)[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.4ms)[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.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 20 May 2014 09:27:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 536 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (1.0ms)[0m INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 20 May 2014 09:27:54 UTC +00:00], ["state", "pending"], ["target_id", 536], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 536 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('sent'))
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 20 May 2014 09:27:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 537 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", Tue, 20 May 2014 09:27:54 UTC +00:00], ["state", "pending"], ["target_id", 537], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Tue, 20 May 2014 09:27:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 538 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", Tue, 20 May 2014 09:27:54 UTC +00:00], ["state", "pending"], ["target_id", 538], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 20 May 2014 09:27:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 539 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", Tue, 20 May 2014 09:27:54 UTC +00:00], ["state", "pending"], ["target_id", 539], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 539 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (1.2ms)[0m UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 544 [["params", {"listing_id"=>1}], ["updated_at", Tue, 20 May 2014 09:27:54 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.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 20 May 2014 09:27:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 540 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", Tue, 20 May 2014 09:27:54 UTC +00:00], ["state", "pending"], ["target_id", 540], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 540 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" = 545 [["params", {"listing_id"=>1}], ["updated_at", Tue, 20 May 2014 09:27:54 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.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", Tue, 20 May 2014 09:27:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 541 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", Tue, 20 May 2014 09:27:54 UTC +00:00], ["state", "pending"], ["target_id", 541], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 541 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" = 546 [["params", {:listing_id=>1}], ["updated_at", Tue, 20 May 2014 09:27:54 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') 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", Tue, 20 May 2014 09:27:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.7ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 542 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", Tue, 20 May 2014 09:27:54 UTC +00:00], ["state", "pending"], ["target_id", 542], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 542 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" = 547 [["params", {:listing_id=>1}], ["updated_at", Tue, 20 May 2014 09:27:54 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.7ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 20 May 2014 09:27:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 543 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 20 May 2014 09:27:54 UTC +00:00], ["state", "pending"], ["target_id", 543], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Tue, 20 May 2014 09:27:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 544 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", Tue, 20 May 2014 09:27:54 UTC +00:00], ["state", "pending"], ["target_id", 544], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 544 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" = 544 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 549)
+ [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", 549]]
+ [1m[35mUser Load (0.6ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 544]]
+ [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" = 544 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mUser Load (0.5ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 544]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 544 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" = 549[0m [["state", "sent"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::BaseNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 549 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", 544]]
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 544 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'[0m
+ [1m[35mNewPostNotification Load (0.5ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 549 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", 544]]
+ [1m[35m (0.7ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 544 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'
+ [1m[36m (0.4ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.3ms)[0m BEGIN
+ [1m[36m (0.4ms)[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", Tue, 20 May 2014 09:27:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[36m (0.4ms)[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" = 545 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", Tue, 20 May 2014 09:27:54 UTC +00:00], ["state", "pending"], ["target_id", 545], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 545 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 545 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 550)[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", 550]]
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 545]]
+ [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" = 545 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 545]]
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 545 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" = 550 [["state", "sent"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::BaseNotification Load (0.6ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 550 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
+ [1m[36mUser Load (0.6ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 545]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 545 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
+ [1m[36mNewPostNotification Load (0.7ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 550 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", 545]]
+ [1m[36m (0.9ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 545 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.4ms)[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", Tue, 20 May 2014 09:27:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 546 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", Tue, 20 May 2014 09:27:54 UTC +00:00], ["state", "pending"], ["target_id", 546], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 546 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" = 546 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 551)
+ [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" = 546 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", Tue, 20 May 2014 09:27:54 UTC +00:00], ["state", "pending"], ["target_id", 546], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:27:54 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" = 546 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 552)[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", Tue, 20 May 2014 09:27:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 547 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", Tue, 20 May 2014 09:27:54 UTC +00:00], ["state", "pending"], ["target_id", 547], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 547 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", Tue, 20 May 2014 09:27:54 UTC +00:00], ["state", "pending"], ["target_id", 547], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::BaseNotification Load (0.5ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1[0m [["id", 554]]
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 547]]
+ [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" = 547 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 547]]
+ [1m[35m (0.7ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 547 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (1.1ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 553[0m [["state", "sent"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 547]]
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 547 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" = 554 [["state", "sent"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [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" = 547 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" = 547 AND "notify_user_user_hashes"."target_type" = 'User' 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" = 'GEbi2AZh_URQr0Hpr0AfNAZWYIwZMLghEtbsmWBFWMHg' 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", Tue, 20 May 2014 09:27:54 UTC +00:00], ["target_id", 547], ["target_type", "User"], ["token", "GEbi2AZh_URQr0Hpr0AfNAZWYIwZMLghEtbsmWBFWMHg"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+
+Sent mail to user@example.com (14.5ms)
+Date: Tue, 20 May 2014 19:27:54 +1000
+From: please-change-me-at-config-initializers-notify-user@example.com
+To: user@example.com
+Message-ID: <537b201a95d69_71f93fc9fe02dbec8796@wp.local.mail>
+Subject: Rails404: You have new Newpostnotification notifications.
+Mime-Version: 1.0
+Content-Type: text/html;
+ charset=UTF-8
+Content-Transfer-Encoding: quoted-printable
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/h=
+tml4/strict.dtd">
+<html>
+<head>
+ <meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type=
+"/>
+ <title></title>
+</head>
+
+<body marginheight=3D"0" topmargin=3D"0" marginwidth=3D"0" leftmargin=3D"=
+0" style=3D"margin: 0px; -webkit-font-smoothing: antialiased; text-render=
+ing: optimizeLegibility;">
+<div style=3D"width: 100%; height: 70px; margin: 0; padding: 0;">
+ <div style=3D"width: 600px; margin: 0 auto; padding: 15px 0;">
+ Logo
+ </div>
+</div>
+<div style=3D"width: 100%; background-color: #fff; margin: 0; padding: 0;=
+">
+ <div style=3D"width: 500px; margin: 0 auto; padding: 40px 0; ">
+ =
+
+<div>
+ New Post Notification happened. =
+
+</div>
+<div>
+ New Post Notification happened. =
+
+</div>
+
+ </div>
+</div>
+<div style=3D"width: 100%; min-height: 80px; margin: 0; padding: 0;">
+ <div style=3D"width: 600px; margin: 0 auto; padding: 0;">
+ <p style=3D"text-align: center;">
+ <a href=3D"http://localhost:5000/notify_user/notifications/unauth=
+_unsubscribe?token=3DGEbi2AZh_URQr0Hpr0AfNAZWYIwZMLghEtbsmWBFWMHg&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", Tue, 20 May 2014 09:27:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 548 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", Tue, 20 May 2014 09:27:54 UTC +00:00], ["state", "pending"], ["target_id", 548], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:27:54 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", 555]]
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 548]]
+ [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" = 548 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 548]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 548 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" = 555[0m [["state", "sent"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::BaseNotification Load (0.5ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 555 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", 548]]
+ [1m[36m (0.7ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 548 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" = 548 AND "notify_user_user_hashes"."target_type" = 'User' 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" = 'zxHvXiKPKKzbB9UtUlAsZgADsWlu2sVUcWUwKtvUeAnw' 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", Tue, 20 May 2014 09:27:54 UTC +00:00], ["target_id", 548], ["target_type", "User"], ["token", "zxHvXiKPKKzbB9UtUlAsZgADsWlu2sVUcWUwKtvUeAnw"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+
+Sent mail to user@example.com (6.3ms)
+Date: Tue, 20 May 2014 19:27:54 +1000
+From: please-change-me-at-config-initializers-notify-user@example.com
+To: user@example.com
+Message-ID: <537b201aa1bae_71f93fc9fe02dbec88d9@wp.local.mail>
+Subject: Rails404: You have a new Newpostnotification notification.
+Mime-Version: 1.0
+Content-Type: text/html;
+ charset=UTF-8
+Content-Transfer-Encoding: quoted-printable
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/h=
+tml4/strict.dtd">
+<html>
+<head>
+ <meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type=
+"/>
+ <title></title>
+</head>
+
+<body marginheight=3D"0" topmargin=3D"0" marginwidth=3D"0" leftmargin=3D"=
+0" style=3D"margin: 0px; -webkit-font-smoothing: antialiased; text-render=
+ing: optimizeLegibility;">
+<div style=3D"width: 100%; height: 70px; margin: 0; padding: 0;">
+ <div style=3D"width: 600px; margin: 0 auto; padding: 15px 0;">
+ Logo
+ </div>
+</div>
+<div style=3D"width: 100%; background-color: #fff; margin: 0; padding: 0;=
+">
+ <div style=3D"width: 500px; margin: 0 auto; padding: 40px 0; ">
+ New Post Notification happened.
+
+ </div>
+</div>
+<div style=3D"width: 100%; min-height: 80px; margin: 0; padding: 0;">
+ <div style=3D"width: 600px; margin: 0 auto; padding: 0;">
+ <p style=3D"text-align: center;">
+ <a href=3D"http://localhost:5000/notify_user/notifications/unauth=
+_unsubscribe?token=3DzxHvXiKPKKzbB9UtUlAsZgADsWlu2sVUcWUwKtvUeAnw&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" = 548 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'[0m
+ [1m[35m (0.4ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.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", Tue, 20 May 2014 09:27:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[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" = 549) 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", Tue, 20 May 2014 09:27:54 UTC +00:00], ["target_id", 549], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 549 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.4ms)[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.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 20 May 2014 09:27:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:27:54 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" = 550 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", Tue, 20 May 2014 09:27:54 UTC +00:00], ["state", "pending"], ["target_id", 550], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:27:54 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" = 556 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", 550]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 550 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.3ms)[0m BEGIN
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 20 May 2014 09:27:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.7ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 551 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", Tue, 20 May 2014 09:27:54 UTC +00:00], ["state", "pending"], ["target_id", 551], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 551 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 20 May 2014 09:27:54 UTC +00:00], ["state", "pending"], ["target_id", 551], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:27:54 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", 558]]
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 551]]
+ [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" = 551 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[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", 551]]
+ [1m[36m (0.7ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 551 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" = 557 [["state", "sent"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 551]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 551 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" = 558[0m [["state", "sent"], ["updated_at", Tue, 20 May 2014 09:27:54 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" = 551 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" = 551 AND "notify_user_user_hashes"."target_type" = 'User' 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" = 'srilhClOb31ppJDKmIKp6AuboMpJR1SGikCvPSxOvbbg' 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", Tue, 20 May 2014 09:27:54 UTC +00:00], ["target_id", 551], ["target_type", "User"], ["token", "srilhClOb31ppJDKmIKp6AuboMpJR1SGikCvPSxOvbbg"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+
+Sent mail to user@example.com (5.6ms)
+Date: Tue, 20 May 2014 19:27:54 +1000
+From: please-change-me-at-config-initializers-notify-user@example.com
+To: user@example.com
+Message-ID: <537b201ab5882_71f93fc9fe02dbec8965@wp.local.mail>
+Subject: Rails404: You have new Newpostnotification notifications.
+Mime-Version: 1.0
+Content-Type: text/html;
+ charset=UTF-8
+Content-Transfer-Encoding: quoted-printable
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/h=
+tml4/strict.dtd">
+<html>
+<head>
+ <meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type=
+"/>
+ <title></title>
+</head>
+
+<body marginheight=3D"0" topmargin=3D"0" marginwidth=3D"0" leftmargin=3D"=
+0" style=3D"margin: 0px; -webkit-font-smoothing: antialiased; text-render=
+ing: optimizeLegibility;">
+<div style=3D"width: 100%; height: 70px; margin: 0; padding: 0;">
+ <div style=3D"width: 600px; margin: 0 auto; padding: 15px 0;">
+ Logo
+ </div>
+</div>
+<div style=3D"width: 100%; background-color: #fff; margin: 0; padding: 0;=
+">
+ <div style=3D"width: 500px; margin: 0 auto; padding: 40px 0; ">
+ =
+
+<div>
+ New Post Notification happened. =
+
+</div>
+<div>
+ New Post Notification happened. =
+
+</div>
+
+ </div>
+</div>
+<div style=3D"width: 100%; min-height: 80px; margin: 0; padding: 0;">
+ <div style=3D"width: 600px; margin: 0 auto; padding: 0;">
+ <p style=3D"text-align: center;">
+ <a href=3D"http://localhost:5000/notify_user/notifications/unauth=
+_unsubscribe?token=3DsrilhClOb31ppJDKmIKp6AuboMpJR1SGikCvPSxOvbbg&typ=
+e=3DNewPostNotification">Unsubscribe</a>
+ </p>
+ <p style=3D"text-align: center;">
+ This is the default generated layout. A privacy declaration could g=
+o here.
+ </p>
+ <p style=3D"text-align: center; margin-bottom: 0px;">
+ =C2=A9 MyCompany Pty Ltd
+ </p>
+ <p style=3D"text-align: center; margin-top: 0px; padding-top: 0px;">
+ ABN 123 456 789
+ </p>
+ </div>
+</div>
+</body>
+</html>=
+
+ [1m[36m (0.4ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 20 May 2014 09:27:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 552 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", Tue, 20 May 2014 09:27:54 UTC +00:00], ["state", "pending"], ["target_id", 552], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::BaseNotification Load (0.6ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 559]]
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 552]]
+ [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" = 552 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 552]]
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 552 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" = 559 [["state", "sent"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::BaseNotification Load (0.6ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 559 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", 552]]
+ [1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 552 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" = 552 AND "notify_user_user_hashes"."target_type" = 'User' 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" = '0Mnu8vXlgAre4VyZARzkKg8YCrgrCvkVCid9mLfTYySQ' 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", Tue, 20 May 2014 09:27:54 UTC +00:00], ["target_id", 552], ["target_type", "User"], ["token", "0Mnu8vXlgAre4VyZARzkKg8YCrgrCvkVCid9mLfTYySQ"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+
+Sent mail to user@example.com (7.1ms)
+Date: Tue, 20 May 2014 19:27:54 +1000
+From: please-change-me-at-config-initializers-notify-user@example.com
+To: user@example.com
+Message-ID: <537b201abf6d3_71f93fc9fe02dbec9099@wp.local.mail>
+Subject: Rails404: You have a new Newpostnotification notification.
+Mime-Version: 1.0
+Content-Type: text/html;
+ charset=UTF-8
+Content-Transfer-Encoding: quoted-printable
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/h=
+tml4/strict.dtd">
+<html>
+<head>
+ <meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type=
+"/>
+ <title></title>
+</head>
+
+<body marginheight=3D"0" topmargin=3D"0" marginwidth=3D"0" leftmargin=3D"=
+0" style=3D"margin: 0px; -webkit-font-smoothing: antialiased; text-render=
+ing: optimizeLegibility;">
+<div style=3D"width: 100%; height: 70px; margin: 0; padding: 0;">
+ <div style=3D"width: 600px; margin: 0 auto; padding: 15px 0;">
+ Logo
+ </div>
+</div>
+<div style=3D"width: 100%; background-color: #fff; margin: 0; padding: 0;=
+">
+ <div style=3D"width: 500px; margin: 0 auto; padding: 40px 0; ">
+ New Post Notification happened.
+
+ </div>
+</div>
+<div style=3D"width: 100%; min-height: 80px; margin: 0; padding: 0;">
+ <div style=3D"width: 600px; margin: 0 auto; padding: 0;">
+ <p style=3D"text-align: center;">
+ <a href=3D"http://localhost:5000/notify_user/notifications/unauth=
+_unsubscribe?token=3D0Mnu8vXlgAre4VyZARzkKg8YCrgrCvkVCid9mLfTYySQ&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", Tue, 20 May 2014 09:27:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 553 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", Tue, 20 May 2014 09:27:54 UTC +00:00], ["state", "pending"], ["target_id", 553], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 553 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" = 553 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 553 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (1.1ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 560[0m [["state", "sent"], ["updated_at", Tue, 20 May 2014 09:27:54 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" = 560 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", 553]]
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 553 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" = 553 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", Tue, 20 May 2014 09:27:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Exists (0.6ms)[0m [1mSELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 554) 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", Tue, 20 May 2014 09:27:54 UTC +00:00], ["target_id", 554], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 554 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.3ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 554 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" = 554 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 20 May 2014 09:27:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Exists (0.6ms)[0m [1mSELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'action_mailer' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 555) LIMIT 1[0m
+ [1m[35mSQL (0.8ms)[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", Tue, 20 May 2014 09:27:54 UTC +00:00], ["target_id", 555], ["target_type", "User"], ["type", "action_mailer"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 555 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", Tue, 20 May 2014 09:27:54 UTC +00:00], ["state", "pending"], ["target_id", 555], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 555 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 555 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 555 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" = 561 [["state", "sent"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNewPostNotification Load (0.5ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 561 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", 555]]
+ [1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 555 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
+ [1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 555 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", Tue, 20 May 2014 09:27:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 556 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", Tue, 20 May 2014 09:27:54 UTC +00:00], ["state", "pending"], ["target_id", 556], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:27:54 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" = 556 AND "notify_user_user_hashes"."target_type" = 'User' 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.7ms)[0m [1mSELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'AElnXHo3iZJ7LU2md2-umASszdkGaDXSofA16eKgnM_A' LIMIT 1[0m
+ [1m[35mSQL (0.9ms)[0m INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 20 May 2014 09:27:54 UTC +00:00], ["target_id", 556], ["target_type", "User"], ["token", "AElnXHo3iZJ7LU2md2-umASszdkGaDXSofA16eKgnM_A"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.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", Tue, 20 May 2014 09:27:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 557 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", Tue, 20 May 2014 09:27:54 UTC +00:00], ["state", "pending"], ["target_id", 557], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:27:54 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" = 557 AND "notify_user_user_hashes"."target_type" = 'User' 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" = 'AwkJSwth2pcfiDGmGHPhOw2cBshudrQv20jD25VYTufg' LIMIT 1[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 20 May 2014 09:27:54 UTC +00:00], ["target_id", 557], ["target_type", "User"], ["token", "AwkJSwth2pcfiDGmGHPhOw2cBshudrQv20jD25VYTufg"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:27:54 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" = 557 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 20 May 2014 09:27:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 558 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", Tue, 20 May 2014 09:27:54 UTC +00:00], ["state", "pending"], ["target_id", 558], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Load (0.6ms)[0m SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 558 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Exists (0.6ms)[0m SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '6qw5DpKzyCJYNVNCmGVUuAgkUnyG1MxCbqYxI0KVs_tQ' 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", Tue, 20 May 2014 09:27:54 UTC +00:00], ["target_id", 558], ["target_type", "User"], ["token", "6qw5DpKzyCJYNVNCmGVUuAgkUnyG1MxCbqYxI0KVs_tQ"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.9ms)[0m UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 164 [["active", false], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Load (0.7ms)[0m SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 558 AND "notify_user_user_hashes"."target_type" = 'User' 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" = 'y0y26TavBqyPNowUF5Tz_w7q_MUDJjH9QTwP2Fs0Kv5A' 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", Tue, 20 May 2014 09:27:54 UTC +00:00], ["target_id", 558], ["target_type", "User"], ["token", "y0y26TavBqyPNowUF5Tz_w7q_MUDJjH9QTwP2Fs0Kv5A"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:27:54 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", Tue, 20 May 2014 09:27:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[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" = 559) LIMIT 1[0m
+ [1m[35mSQL (0.4ms)[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", Tue, 20 May 2014 09:27:54 UTC +00:00], ["target_id", 559], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[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" != 140 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 559) LIMIT 1[0m
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 559 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Tue, 20 May 2014 09:27:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[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" = 560) 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", Tue, 20 May 2014 09:27:54 UTC +00:00], ["target_id", 560], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.7ms)[0m SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 141 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 560) LIMIT 1
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 560 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.3ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 20 May 2014 09:27:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[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" = 561) 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", Tue, 20 May 2014 09:27:54 UTC +00:00], ["target_id", 561], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[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" != 142 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 561) 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.9ms)[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" = 561) 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.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", Tue, 20 May 2014 09:27:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[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" = 562) 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", Tue, 20 May 2014 09:27:54 UTC +00:00], ["target_id", 562], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Exists (0.5ms)[0m [1mSELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 143 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 562) 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" = 562) 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" = 562 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mNotifyUser::Unsubscribe Load (0.6ms)[0m [1mSELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 562 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", 143]]
+ [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" = 562 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", Tue, 20 May 2014 09:27:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 563 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", Tue, 20 May 2014 09:27:54 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 563], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:27:54 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", Tue, 20 May 2014 09:27:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Exists (0.5ms)[0m [1mSELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'CXPkJ0haLkq47HPBKSpqow-J-3MMWue6LLdXdPzJwXiA' 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", Tue, 20 May 2014 09:27:54 UTC +00:00], ["target_id", 564], ["target_type", "User"], ["token", "CXPkJ0haLkq47HPBKSpqow-J-3MMWue6LLdXdPzJwXiA"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.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" = 'CXPkJ0haLkq47HPBKSpqow-J-3MMWue6LLdXdPzJwXiA' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 20 May 2014 09:27:54 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:27:54 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Exists (0.5ms)[0m [1mSELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'Wa7QUfEpLRyfEPgB3D0N8A6d_IU_cwkzkGqDDhoqIXOQ' LIMIT 1[0m
+ [1m[35mSQL (1.0ms)[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", Tue, 20 May 2014 09:27:55 UTC +00:00], ["target_id", 565], ["target_type", "User"], ["token", "Wa7QUfEpLRyfEPgB3D0N8A6d_IU_cwkzkGqDDhoqIXOQ"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:27:55 UTC +00:00]]
+ [1m[36m (0.4ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[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" = 167[0m [["active", false], ["updated_at", Tue, 20 May 2014 09:27:55 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Exists (0.5ms)[0m [1mSELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'Wa7QUfEpLRyfEPgB3D0N8A6d_IU_cwkzkGqDDhoqIXOQ' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Tue, 20 May 2014 09:27:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:27:55 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Exists (0.5ms)[0m SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'TMZZMRekZ53ZKMB6O98ynQ9dwiiOfYMBjYX0c09UL3rA' 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", Tue, 20 May 2014 09:27:55 UTC +00:00], ["target_id", 566], ["target_type", "User"], ["token", "TMZZMRekZ53ZKMB6O98ynQ9dwiiOfYMBjYX0c09UL3rA"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:27:55 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.7ms)[0m UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 168 [["active", false], ["updated_at", Tue, 20 May 2014 09:27:55 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Tue, 20 May 2014 09:27:55 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:27:55 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Exists (0.4ms)[0m SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'YwsX3AVRlz9-cDuOaM5DfABjjoqZgtvsr8fVKllVAS8w' 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", Tue, 20 May 2014 09:27:55 UTC +00:00], ["target_id", 567], ["target_type", "User"], ["token", "YwsX3AVRlz9-cDuOaM5DfABjjoqZgtvsr8fVKllVAS8w"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:27:55 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.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.3ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.3ms)[0m BEGIN
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (4.2ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Tue, 20 May 2014 09:28:17 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:28:17 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.5ms)
+Completed 200 OK in 10ms (Views: 7.7ms | ActiveRecord: 0.0ms)
+ [1m[36m (0.4ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 20 May 2014 09:28:17 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:28:17 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.0ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 569 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (1.3ms)[0m INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Tue, 20 May 2014 09:28:17 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 569], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:28:17 UTC +00:00]]
+ [1m[36m (0.2ms)[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" = 569 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" = 569 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0[0m
+Completed 200 OK in 15ms (Views: 8.4ms | ActiveRecord: 2.0ms)
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Tue, 20 May 2014 09:28:17 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:28:17 UTC +00:00]]
+ [1m[35m (0.1ms)[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" = 570 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", Tue, 20 May 2014 09:28:17 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 570], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:28:17 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" = 570 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", Tue, 20 May 2014 09:28:17 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 570], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:28:17 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" = 570 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", Tue, 20 May 2014 09:28:17 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 570], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:28:17 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+Processing by NotifyUser::NotificationsController#index as HTML
+ [1m[36mNotifyUser::BaseNotification Load (0.7ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 570 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0[0m
+Completed 200 OK in 22ms (Views: 20.9ms | ActiveRecord: 0.7ms)
+ [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", Tue, 20 May 2014 09:28:17 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:28:17 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" = 571 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", Tue, 20 May 2014 09:28:17 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 571], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:28:17 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" = 571 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", Tue, 20 May 2014 09:28:17 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 571], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:28:17 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" = 571 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", Tue, 20 May 2014 09:28:17 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 571], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:28:17 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+Processing by NotifyUser::NotificationsController#read as HTML
+ Parameters: {"id"=>"570"}
+ [1m[36mNotifyUser::BaseNotification Load (0.9ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 571 AND "notify_user_notifications"."target_type" = 'User' AND (id = '570') 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", 571]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 571 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (1.4ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 570[0m [["state", "read"], ["updated_at", Tue, 20 May 2014 09:28:17 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+Completed 200 OK in 18ms (Views: 1.9ms | ActiveRecord: 4.2ms)
+ [1m[36mNotifyUser::BaseNotification Load (0.7ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 570 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", Tue, 20 May 2014 09:28:17 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:28:17 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" = 572 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", Tue, 20 May 2014 09:28:17 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 572], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:28:17 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" = 572 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", Tue, 20 May 2014 09:28:17 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 572], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:28:17 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" = 572 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", Tue, 20 May 2014 09:28:17 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 572], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:28:17 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+Processing by NotifyUser::NotificationsController#read as HTML
+ Parameters: {"id"=>"573"}
+ [1m[36mNotifyUser::BaseNotification Load (0.7ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 572 AND "notify_user_notifications"."target_type" = 'User' AND (id = '573') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mUser Load (0.5ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 572]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 572 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" = 573[0m [["state", "read"], ["updated_at", Tue, 20 May 2014 09:28:17 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+Completed 200 OK in 9ms (Views: 0.4ms | ActiveRecord: 3.1ms)
+Processing by NotifyUser::NotificationsController#read as HTML
+ Parameters: {"id"=>"573"}
+ [1m[36mNotifyUser::BaseNotification Load (0.7ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 572 AND "notify_user_notifications"."target_type" = 'User' AND (id = '573') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+Completed 200 OK in 2ms (Views: 0.5ms | ActiveRecord: 3.8ms)
+ [1m[35m (0.4ms)[0m ROLLBACK
+ [1m[36m (0.3ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Tue, 20 May 2014 09:28:17 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:28:17 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" = 573 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", Tue, 20 May 2014 09:28:17 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 573], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:28:17 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" = 573 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", Tue, 20 May 2014 09:28:17 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 573], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:28:17 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" = 573 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", Tue, 20 May 2014 09:28:17 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 573], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:28:17 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+Processing by NotifyUser::NotificationsController#mark_all as HTML
+ [1m[36mSQL (1.1ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 573 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" = 573 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('["pending","sent"]'))
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 20 May 2014 09:28:17 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:28:17 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" = 574 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", Tue, 20 May 2014 09:28:17 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 574], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:28:17 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+Processing by NotifyUser::NotificationsController#mark_read as HTML
+ Parameters: {"ids"=>["579"]}
+ [1m[35mSQL (0.7ms)[0m UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 574 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('579'))
+ [1m[36mNotifyUser::BaseNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 574 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('579'))[0m
+Completed 200 OK in 4ms (Views: 2.0ms | ActiveRecord: 1.2ms)
+ [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", 579]]
+ [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 (1.0ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 20 May 2014 09:28:17 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:28:17 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" = 575 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", Tue, 20 May 2014 09:28:17 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 575], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:28:17 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+Processing by NotifyUser::NotificationsController#mark_read as HTML
+ Parameters: {"ids"=>["580"]}
+ [1m[35mSQL (0.7ms)[0m UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 575 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('580'))
+ [1m[36mNotifyUser::BaseNotification Load (0.7ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 575 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('580'))[0m
+Completed 200 OK in 5ms (Views: 2.2ms | 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.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Tue, 20 May 2014 09:28:17 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:28:17 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" = 576 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", Tue, 20 May 2014 09:28:17 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 576], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:28:17 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" = 576 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+Processing by NotifyUser::NotificationsController#subscriptions as HTML
+ Parameters: {"types"=>[{"type"=>"NewPostNotification", "status"=>"0"}]}
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 576 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.7ms)[0m SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 576) LIMIT 1
+ [1m[36mSQL (1.0ms)[0m [1mINSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Tue, 20 May 2014 09:28:17 UTC +00:00], ["target_id", 576], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:28:17 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" = 576 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" = 576 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+Completed 200 OK in 19ms (Views: 0.5ms | ActiveRecord: 3.8ms)
+ [1m[36mNotifyUser::Unsubscribe Load (0.6ms)[0m [1mSELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 576 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.4ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Tue, 20 May 2014 09:28:17 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:28:17 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" = 577 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", Tue, 20 May 2014 09:28:17 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 577], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:28:17 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Load (0.4ms)[0m [1mSELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 577 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+Processing by NotifyUser::NotificationsController#subscriptions as HTML
+ Parameters: {"types"=>[{"type"=>"NewPostNotification", "status"=>"1"}]}
+ [1m[35mNotifyUser::Unsubscribe Load (0.5ms)[0m SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 577 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" = 577 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" = 577 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 1.4ms)
+ [1m[36mNotifyUser::Unsubscribe Load (0.5ms)[0m [1mSELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 577 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Tue, 20 May 2014 09:28:17 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:28:17 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" = 578 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", Tue, 20 May 2014 09:28:17 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 578], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:28:17 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" = 578) 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", Tue, 20 May 2014 09:28:17 UTC +00:00], ["target_id", 578], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:28:17 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+Redirected to http://test.host/notify_user/notifications/unsubscribe
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 578 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" = 578 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+Completed 302 Found in 8ms (ActiveRecord: 2.6ms)
+ [1m[36mNotifyUser::Unsubscribe Load (0.5ms)[0m [1mSELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" ORDER BY "notify_user_unsubscribes"."id" DESC LIMIT 1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.3ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Tue, 20 May 2014 09:28:17 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:28:17 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.7ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 579 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", Tue, 20 May 2014 09:28:18 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 579], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:28:18 UTC +00:00]]
+ [1m[35m (0.4ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.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" = 579) 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", Tue, 20 May 2014 09:28:18 UTC +00:00], ["target_id", 579], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:28:18 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.7ms)[0m [1mSELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 579 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.6ms)[0m [1mDELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1[0m [["id", 146]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+Redirected to http://test.host/notify_user/notifications/unsubscribe
+Completed 302 Found in 4ms (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", Tue, 20 May 2014 09:28:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:28:18 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" = 580 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", Tue, 20 May 2014 09:28:18 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 580], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:28:18 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Load (0.9ms)[0m [1mSELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 580 AND "notify_user_user_hashes"."target_type" = 'User' 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" = '4Tvmk-xO6LPb1GAqAWPx8Q0_hdJ460fijxLQv2FSY_2g' LIMIT 1[0m
+ [1m[35mSQL (1.1ms)[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", Tue, 20 May 2014 09:28:18 UTC +00:00], ["target_id", 580], ["target_type", "User"], ["token", "4Tvmk-xO6LPb1GAqAWPx8Q0_hdJ460fijxLQv2FSY_2g"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:28:18 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"=>"4Tvmk-xO6LPb1GAqAWPx8Q0_hdJ460fijxLQv2FSY_2g"}
+ [1m[35mNotifyUser::UserHash Exists (0.5ms)[0m SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '4Tvmk-xO6LPb1GAqAWPx8Q0_hdJ460fijxLQv2FSY_2g' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1
+ [1m[36mNotifyUser::UserHash Load (0.6ms)[0m [1mSELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '4Tvmk-xO6LPb1GAqAWPx8Q0_hdJ460fijxLQv2FSY_2g' AND "notify_user_user_hashes"."type" = 'NewPostNotification' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1[0m
+ [1m[35mUser Load (0.5ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 580]]
+ [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" = 580) 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", Tue, 20 May 2014 09:28:18 UTC +00:00], ["target_id", 580], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:28:18 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 (1.1ms)[0m UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 170 [["active", false], ["updated_at", Tue, 20 May 2014 09:28:18 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+Completed 200 OK in 11ms (Views: 0.4ms | ActiveRecord: 4.4ms)
+ [1m[35mNotifyUser::UserHash Load (0.6ms)[0m SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" ORDER BY "notify_user_user_hashes"."id" DESC LIMIT 1
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.3ms)[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.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36mNotifyUser::UserHash Load (0.7ms)[0m [1mSELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Load (0.7ms)[0m SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.3ms)[0m BEGIN
+ [1m[36mNotifyUser::UserHash Load (0.7ms)[0m [1mSELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Load (0.7ms)[0m SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36m (0.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", Tue, 20 May 2014 09:28:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:28:18 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" = 581 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", Tue, 20 May 2014 09:28:18 UTC +00:00], ["state", "pending"], ["target_id", 581], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:28:18 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" = 581 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" = 586 [["state", "sent"], ["updated_at", Tue, 20 May 2014 09:28:18 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 581 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('sent'))
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36m (0.4ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 20 May 2014 09:28:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:28:18 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" = 582 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", Tue, 20 May 2014 09:28:18 UTC +00:00], ["state", "pending"], ["target_id", 582], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:28:18 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Tue, 20 May 2014 09:28:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:28:18 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" = 583 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", Tue, 20 May 2014 09:28:18 UTC +00:00], ["state", "pending"], ["target_id", 583], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:28:18 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.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", Tue, 20 May 2014 09:28:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:28:18 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" = 584 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", Tue, 20 May 2014 09:28:18 UTC +00:00], ["state", "pending"], ["target_id", 584], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:28:18 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" = 584 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" = 589 [["params", {"listing_id"=>1}], ["updated_at", Tue, 20 May 2014 09:28:18 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", Tue, 20 May 2014 09:28:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:28:18 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" = 585 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", Tue, 20 May 2014 09:28:18 UTC +00:00], ["state", "pending"], ["target_id", 585], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:28:18 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" = 585 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" = 590 [["params", {"listing_id"=>1}], ["updated_at", Tue, 20 May 2014 09:28:18 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNewPostNotification Load (0.7ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1
+ [1m[36m (0.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", Tue, 20 May 2014 09:28:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:28:18 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.8ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 586 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", Tue, 20 May 2014 09:28:18 UTC +00:00], ["state", "pending"], ["target_id", 586], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:28:18 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" = 586 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.8ms)[0m UPDATE "notify_user_notifications" SET "params" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 591 [["params", {:listing_id=>1}], ["updated_at", Tue, 20 May 2014 09:28:18 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", Tue, 20 May 2014 09:28:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:28:18 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" = 587 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", Tue, 20 May 2014 09:28:18 UTC +00:00], ["state", "pending"], ["target_id", 587], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:28:18 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" = 587 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" = 592 [["params", {:listing_id=>1}], ["updated_at", Tue, 20 May 2014 09:28:18 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.4ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 20 May 2014 09:28:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:28:18 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" = 588 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", Tue, 20 May 2014 09:28:18 UTC +00:00], ["state", "pending"], ["target_id", 588], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:28:18 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.3ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.4ms)[0m ROLLBACK
+ [1m[36m (0.3ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Tue, 20 May 2014 09:28:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:28:18 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" = 589 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", Tue, 20 May 2014 09:28:18 UTC +00:00], ["state", "pending"], ["target_id", 589], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:28:18 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 589 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 589 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 594)
+ [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", 594]]
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 589]]
+ [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" = 589 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mUser Load (0.5ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 589]]
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 589 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.8ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 594[0m [["state", "sent"], ["updated_at", Tue, 20 May 2014 09:28:18 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::BaseNotification Load (0.5ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 594 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", 589]]
+ [1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 589 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'[0m
+ [1m[35mNewPostNotification Load (0.7ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 594 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", 589]]
+ [1m[35m (0.7ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 589 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'
+ [1m[36m (0.4ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 20 May 2014 09:28:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:28:18 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" = 590 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", Tue, 20 May 2014 09:28:18 UTC +00:00], ["state", "pending"], ["target_id", 590], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:28:18 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" = 590 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.9ms)[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" = 590 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 595)[0m
+ [1m[35mNotifyUser::BaseNotification Load (0.7ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 595]]
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 590]]
+ [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" = 590 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
+ [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 590]]
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 590 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[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" = 595 [["state", "sent"], ["updated_at", Tue, 20 May 2014 09:28:18 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::BaseNotification Load (0.4ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 595 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
+ [1m[36mUser Load (0.6ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 590]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 590 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = '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" = 595 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", 590]]
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 590 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.4ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Tue, 20 May 2014 09:28:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:28:18 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 591 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.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", Tue, 20 May 2014 09:28:18 UTC +00:00], ["state", "pending"], ["target_id", 591], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:28:18 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 591 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[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" = 591 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 596)
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 591 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Tue, 20 May 2014 09:28:18 UTC +00:00], ["state", "pending"], ["target_id", 591], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:28:18 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" = 591 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 597)[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.3ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.7ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Tue, 20 May 2014 09:28:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:28:18 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 592 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.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", Tue, 20 May 2014 09:28:18 UTC +00:00], ["state", "pending"], ["target_id", 592], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:28:18 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" = 592 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", Tue, 20 May 2014 09:28:18 UTC +00:00], ["state", "pending"], ["target_id", 592], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:28:18 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::BaseNotification Load (0.5ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1[0m [["id", 599]]
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 592]]
+ [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" = 592 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'[0m
+ [1m[35m (0.3ms)[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[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 592]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 592 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.9ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 598[0m [["state", "sent"], ["updated_at", Tue, 20 May 2014 09:28:18 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 592]]
+ [1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 592 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.7ms)[0m UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 599 [["state", "sent"], ["updated_at", Tue, 20 May 2014 09:28:18 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 592 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" = 592 AND "notify_user_user_hashes"."target_type" = 'User' 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" = 'mayC39zbIItsdLCTmqg14Q7nF0XZ8rYxVdVKjOxIN3-A' LIMIT 1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 20 May 2014 09:28:18 UTC +00:00], ["target_id", 592], ["target_type", "User"], ["token", "mayC39zbIItsdLCTmqg14Q7nF0XZ8rYxVdVKjOxIN3-A"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:28:18 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+
+Sent mail to user@example.com (7.1ms)
+Date: Tue, 20 May 2014 19:28:18 +1000
+From: please-change-me-at-config-initializers-notify-user@example.com
+To: user@example.com
+Message-ID: <537b20326333e_72073fe94202dbe85543e@wp.local.mail>
+Subject: Rails404: You have new Newpostnotification notifications.
+Mime-Version: 1.0
+Content-Type: text/html;
+ charset=UTF-8
+Content-Transfer-Encoding: quoted-printable
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/h=
+tml4/strict.dtd">
+<html>
+<head>
+ <meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type=
+"/>
+ <title></title>
+</head>
+
+<body marginheight=3D"0" topmargin=3D"0" marginwidth=3D"0" leftmargin=3D"=
+0" style=3D"margin: 0px; -webkit-font-smoothing: antialiased; text-render=
+ing: optimizeLegibility;">
+<div style=3D"width: 100%; height: 70px; margin: 0; padding: 0;">
+ <div style=3D"width: 600px; margin: 0 auto; padding: 15px 0;">
+ Logo
+ </div>
+</div>
+<div style=3D"width: 100%; background-color: #fff; margin: 0; padding: 0;=
+">
+ <div style=3D"width: 500px; margin: 0 auto; padding: 40px 0; ">
+ =
+
+<div>
+ New Post Notification happened. =
+
+</div>
+<div>
+ New Post Notification happened. =
+
+</div>
+
+ </div>
+</div>
+<div style=3D"width: 100%; min-height: 80px; margin: 0; padding: 0;">
+ <div style=3D"width: 600px; margin: 0 auto; padding: 0;">
+ <p style=3D"text-align: center;">
+ <a href=3D"http://localhost:5000/notify_user/notifications/unauth=
+_unsubscribe?token=3DmayC39zbIItsdLCTmqg14Q7nF0XZ8rYxVdVKjOxIN3-A&typ=
+e=3DNewPostNotification">Unsubscribe</a>
+ </p>
+ <p style=3D"text-align: center;">
+ This is the default generated layout. A privacy declaration could g=
+o here.
+ </p>
+ <p style=3D"text-align: center; margin-bottom: 0px;">
+ =C2=A9 MyCompany Pty Ltd
+ </p>
+ <p style=3D"text-align: center; margin-top: 0px; padding-top: 0px;">
+ ABN 123 456 789
+ </p>
+ </div>
+</div>
+</body>
+</html>=
+
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.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", Tue, 20 May 2014 09:28:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:28:18 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" = 593 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", Tue, 20 May 2014 09:28:18 UTC +00:00], ["state", "pending"], ["target_id", 593], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:28:18 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", 600]]
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 593]]
+ [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" = 593 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 593]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 593 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [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" = 600[0m [["state", "sent"], ["updated_at", Tue, 20 May 2014 09:28:18 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" = 600 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", 593]]
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 593 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = '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" = 593 AND "notify_user_user_hashes"."target_type" = 'User' 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" = 'eSGr4CC8PB3i2PJnWUiixQUAA--SMLMdZ-6Qn_LvIz_w' 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", Tue, 20 May 2014 09:28:18 UTC +00:00], ["target_id", 593], ["target_type", "User"], ["token", "eSGr4CC8PB3i2PJnWUiixQUAA--SMLMdZ-6Qn_LvIz_w"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:28:18 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+
+Sent mail to user@example.com (5.7ms)
+Date: Tue, 20 May 2014 19:28:18 +1000
+From: please-change-me-at-config-initializers-notify-user@example.com
+To: user@example.com
+Message-ID: <537b20326d672_72073fe94202dbe85556a@wp.local.mail>
+Subject: Rails404: You have a new Newpostnotification notification.
+Mime-Version: 1.0
+Content-Type: text/html;
+ charset=UTF-8
+Content-Transfer-Encoding: quoted-printable
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/h=
+tml4/strict.dtd">
+<html>
+<head>
+ <meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type=
+"/>
+ <title></title>
+</head>
+
+<body marginheight=3D"0" topmargin=3D"0" marginwidth=3D"0" leftmargin=3D"=
+0" style=3D"margin: 0px; -webkit-font-smoothing: antialiased; text-render=
+ing: optimizeLegibility;">
+<div style=3D"width: 100%; height: 70px; margin: 0; padding: 0;">
+ <div style=3D"width: 600px; margin: 0 auto; padding: 15px 0;">
+ Logo
+ </div>
+</div>
+<div style=3D"width: 100%; background-color: #fff; margin: 0; padding: 0;=
+">
+ <div style=3D"width: 500px; margin: 0 auto; padding: 40px 0; ">
+ New Post Notification happened.
+
+ </div>
+</div>
+<div style=3D"width: 100%; min-height: 80px; margin: 0; padding: 0;">
+ <div style=3D"width: 600px; margin: 0 auto; padding: 0;">
+ <p style=3D"text-align: center;">
+ <a href=3D"http://localhost:5000/notify_user/notifications/unauth=
+_unsubscribe?token=3DeSGr4CC8PB3i2PJnWUiixQUAA--SMLMdZ-6Qn_LvIz_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[36m (1.0ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 593 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'[0m
+ [1m[35m (0.4ms)[0m ROLLBACK
+ [1m[36m (0.3ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Tue, 20 May 2014 09:28:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:28:18 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" = 594) 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", Tue, 20 May 2014 09:28:18 UTC +00:00], ["target_id", 594], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:28:18 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" = 594 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::BaseNotification Load (0.4ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" IS NULL ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
+ [1m[36m (0.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", Tue, 20 May 2014 09:28:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:28:18 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" = 595 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", Tue, 20 May 2014 09:28:18 UTC +00:00], ["state", "pending"], ["target_id", 595], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:28:18 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::BaseNotification Load (0.7ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 601 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", 595]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 595 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 20 May 2014 09:28:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:28:18 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" = 596 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", Tue, 20 May 2014 09:28:18 UTC +00:00], ["state", "pending"], ["target_id", 596], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:28:18 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" = 596 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", Tue, 20 May 2014 09:28:18 UTC +00:00], ["state", "pending"], ["target_id", 596], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:28:18 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", 603]]
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 596]]
+ [1m[35mNotifyUser::BaseNotification Load (0.5ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 596 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[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", 596]]
+ [1m[36m (1.1ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 596 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = '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" = 602 [["state", "sent"], ["updated_at", Tue, 20 May 2014 09:28:18 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 596]]
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 596 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.8ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 603[0m [["state", "sent"], ["updated_at", Tue, 20 May 2014 09:28:18 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" = 596 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" = 596 AND "notify_user_user_hashes"."target_type" = 'User' 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" = 'NLem4yPpkxkM_sj638CyBQDStmyqhEgwFubdn5poUC_Q' 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", Tue, 20 May 2014 09:28:18 UTC +00:00], ["target_id", 596], ["target_type", "User"], ["token", "NLem4yPpkxkM_sj638CyBQDStmyqhEgwFubdn5poUC_Q"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:28:18 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+
+Sent mail to user@example.com (5.6ms)
+Date: Tue, 20 May 2014 19:28:18 +1000
+From: please-change-me-at-config-initializers-notify-user@example.com
+To: user@example.com
+Message-ID: <537b203280f98_72073fe94202dbe855624@wp.local.mail>
+Subject: Rails404: You have new Newpostnotification notifications.
+Mime-Version: 1.0
+Content-Type: text/html;
+ charset=UTF-8
+Content-Transfer-Encoding: quoted-printable
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/h=
+tml4/strict.dtd">
+<html>
+<head>
+ <meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type=
+"/>
+ <title></title>
+</head>
+
+<body marginheight=3D"0" topmargin=3D"0" marginwidth=3D"0" leftmargin=3D"=
+0" style=3D"margin: 0px; -webkit-font-smoothing: antialiased; text-render=
+ing: optimizeLegibility;">
+<div style=3D"width: 100%; height: 70px; margin: 0; padding: 0;">
+ <div style=3D"width: 600px; margin: 0 auto; padding: 15px 0;">
+ Logo
+ </div>
+</div>
+<div style=3D"width: 100%; background-color: #fff; margin: 0; padding: 0;=
+">
+ <div style=3D"width: 500px; margin: 0 auto; padding: 40px 0; ">
+ =
+
+<div>
+ New Post Notification happened. =
+
+</div>
+<div>
+ New Post Notification happened. =
+
+</div>
+
+ </div>
+</div>
+<div style=3D"width: 100%; min-height: 80px; margin: 0; padding: 0;">
+ <div style=3D"width: 600px; margin: 0 auto; padding: 0;">
+ <p style=3D"text-align: center;">
+ <a href=3D"http://localhost:5000/notify_user/notifications/unauth=
+_unsubscribe?token=3DNLem4yPpkxkM_sj638CyBQDStmyqhEgwFubdn5poUC_Q&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.7ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 20 May 2014 09:28:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:28:18 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" = 597 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", Tue, 20 May 2014 09:28:18 UTC +00:00], ["state", "pending"], ["target_id", 597], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:28:18 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", 604]]
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 597]]
+ [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" = 597 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
+ [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[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 597]]
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 597 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = '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" = 604 [["state", "sent"], ["updated_at", Tue, 20 May 2014 09:28:18 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::BaseNotification Load (0.6ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 604 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", 597]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 597 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = '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" = 597 AND "notify_user_user_hashes"."target_type" = 'User' 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" = '3Jng_imtN1ZfRRXD6jCNjwISvqoZy82cHxdki1FxFlyA' LIMIT 1[0m
+ [1m[35mSQL (0.8ms)[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", Tue, 20 May 2014 09:28:18 UTC +00:00], ["target_id", 597], ["target_type", "User"], ["token", "3Jng_imtN1ZfRRXD6jCNjwISvqoZy82cHxdki1FxFlyA"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:28:18 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+
+Sent mail to user@example.com (6.9ms)
+Date: Tue, 20 May 2014 19:28:18 +1000
+From: please-change-me-at-config-initializers-notify-user@example.com
+To: user@example.com
+Message-ID: <537b20328b1b6_72073fe94202dbe8557c0@wp.local.mail>
+Subject: Rails404: You have a new Newpostnotification notification.
+Mime-Version: 1.0
+Content-Type: text/html;
+ charset=UTF-8
+Content-Transfer-Encoding: quoted-printable
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/h=
+tml4/strict.dtd">
+<html>
+<head>
+ <meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type=
+"/>
+ <title></title>
+</head>
+
+<body marginheight=3D"0" topmargin=3D"0" marginwidth=3D"0" leftmargin=3D"=
+0" style=3D"margin: 0px; -webkit-font-smoothing: antialiased; text-render=
+ing: optimizeLegibility;">
+<div style=3D"width: 100%; height: 70px; margin: 0; padding: 0;">
+ <div style=3D"width: 600px; margin: 0 auto; padding: 15px 0;">
+ Logo
+ </div>
+</div>
+<div style=3D"width: 100%; background-color: #fff; margin: 0; padding: 0;=
+">
+ <div style=3D"width: 500px; margin: 0 auto; padding: 40px 0; ">
+ New Post Notification happened.
+
+ </div>
+</div>
+<div style=3D"width: 100%; min-height: 80px; margin: 0; padding: 0;">
+ <div style=3D"width: 600px; margin: 0 auto; padding: 0;">
+ <p style=3D"text-align: center;">
+ <a href=3D"http://localhost:5000/notify_user/notifications/unauth=
+_unsubscribe?token=3D3Jng_imtN1ZfRRXD6jCNjwISvqoZy82cHxdki1FxFlyA&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", Tue, 20 May 2014 09:28:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:28:18 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" = 598 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", Tue, 20 May 2014 09:28:18 UTC +00:00], ["state", "pending"], ["target_id", 598], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:28:18 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" = 598 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.5ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.8ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 598 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_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" = 598 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" = 605[0m [["state", "sent"], ["updated_at", Tue, 20 May 2014 09:28:18 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNewPostNotification Load (0.5ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 605 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", 598]]
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 598 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" = 598 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 20 May 2014 09:28:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:28:18 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" = 599) 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", Tue, 20 May 2014 09:28:18 UTC +00:00], ["target_id", 599], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:28:18 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" = 599 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 599 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" = 599 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.4ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 20 May 2014 09:28:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:28:18 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" = 'action_mailer' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 600) 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", Tue, 20 May 2014 09:28:18 UTC +00:00], ["target_id", 600], ["target_type", "User"], ["type", "action_mailer"], ["updated_at", Tue, 20 May 2014 09:28:18 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" = 600 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", Tue, 20 May 2014 09:28:18 UTC +00:00], ["state", "pending"], ["target_id", 600], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:28:18 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 600 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[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" = 600 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.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" = 600 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" = 606 [["state", "sent"], ["updated_at", Tue, 20 May 2014 09:28:18 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNewPostNotification Load (0.5ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 606 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
+ [1m[36mUser Load (0.9ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 600]]
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 600 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" = 600 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", Tue, 20 May 2014 09:28:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:28:18 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" = 601 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", Tue, 20 May 2014 09:28:18 UTC +00:00], ["state", "pending"], ["target_id", 601], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:28:18 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" = 601 AND "notify_user_user_hashes"."target_type" = 'User' 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" = 'H2GylHBFjXHbNg42yTj6EQZ8n0SZCA1Rcmx_QoGzupnA' 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", Tue, 20 May 2014 09:28:18 UTC +00:00], ["target_id", 601], ["target_type", "User"], ["token", "H2GylHBFjXHbNg42yTj6EQZ8n0SZCA1Rcmx_QoGzupnA"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:28:18 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Tue, 20 May 2014 09:28:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:28:18 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" = 602 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", Tue, 20 May 2014 09:28:18 UTC +00:00], ["state", "pending"], ["target_id", 602], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:28:18 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" = 602 AND "notify_user_user_hashes"."target_type" = 'User' 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" = 'gyqANj1I7wisrHqsXD0NWQVGeuExVb0fbMeYbgIURamw' 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", Tue, 20 May 2014 09:28:18 UTC +00:00], ["target_id", 602], ["target_type", "User"], ["token", "gyqANj1I7wisrHqsXD0NWQVGeuExVb0fbMeYbgIURamw"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:28:18 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" = 602 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 20 May 2014 09:28:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:28:18 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 603 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.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", Tue, 20 May 2014 09:28:18 UTC +00:00], ["state", "pending"], ["target_id", 603], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:28:18 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Load (0.6ms)[0m SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 603 AND "notify_user_user_hashes"."target_type" = 'User' 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" = '2wwQ1cg7NIi8K_j49SJmrAxWCVJST2LNOjO6CsBwWXnQ' 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", Tue, 20 May 2014 09:28:18 UTC +00:00], ["target_id", 603], ["target_type", "User"], ["token", "2wwQ1cg7NIi8K_j49SJmrAxWCVJST2LNOjO6CsBwWXnQ"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:28:18 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 (1.2ms)[0m UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 177 [["active", false], ["updated_at", Tue, 20 May 2014 09:28:18 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" = 603 AND "notify_user_user_hashes"."target_type" = 'User' 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" = '_uIL_FeEHb19_zi1RnT3gwtXXU7ipHeyGpdetz8EYJvw' 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", Tue, 20 May 2014 09:28:18 UTC +00:00], ["target_id", 603], ["target_type", "User"], ["token", "_uIL_FeEHb19_zi1RnT3gwtXXU7ipHeyGpdetz8EYJvw"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:28:18 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.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", Tue, 20 May 2014 09:28:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:28:18 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" = 604) LIMIT 1[0m
+ [1m[35mSQL (0.4ms)[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", Tue, 20 May 2014 09:28:18 UTC +00:00], ["target_id", 604], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:28:18 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Exists (0.7ms)[0m [1mSELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 151 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 604) LIMIT 1[0m
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 604 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Tue, 20 May 2014 09:28:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:28:18 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" = 605) 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", Tue, 20 May 2014 09:28:18 UTC +00:00], ["target_id", 605], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:28:18 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" != 152 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 605) LIMIT 1
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 605 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.3ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 20 May 2014 09:28:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:28:18 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" = 606) 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", Tue, 20 May 2014 09:28:18 UTC +00:00], ["target_id", 606], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:28:18 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" != 153 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 606) LIMIT 1[0m
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.5ms)[0m SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'UnsubscribableNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 606) LIMIT 1
+ [1m[36m (0.2ms)[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.4ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.3ms)[0m BEGIN
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 20 May 2014 09:28:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:28:18 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" = 607) LIMIT 1[0m
+ [1m[35mSQL (0.4ms)[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", Tue, 20 May 2014 09:28:18 UTC +00:00], ["target_id", 607], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:28:18 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" != 154 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 607) 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" = 'NewPostNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 607) LIMIT 1
+ [1m[36m (0.3ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 607 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mNotifyUser::Unsubscribe Load (0.7ms)[0m [1mSELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 607 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", 154]]
+ [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" = 607 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", Tue, 20 May 2014 09:28:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:28:18 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" = 608 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", Tue, 20 May 2014 09:28:18 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 608], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:28:18 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.1ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 20 May 2014 09:28:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:28:18 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.1ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Exists (0.6ms)[0m [1mSELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '1BZs9Za395U19UrXwoYKxQhL95r0K8NcleOnC5BNBcpA' 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", Tue, 20 May 2014 09:28:18 UTC +00:00], ["target_id", 609], ["target_type", "User"], ["token", "1BZs9Za395U19UrXwoYKxQhL95r0K8NcleOnC5BNBcpA"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:28:18 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.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Exists (0.6ms)[0m SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '1BZs9Za395U19UrXwoYKxQhL95r0K8NcleOnC5BNBcpA' 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.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", Tue, 20 May 2014 09:28:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:28:18 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" = 'kiqk8GBSdvFUNWzxtZYKqQx6ueXEN9qWjNknuJqI1aUw' 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", Tue, 20 May 2014 09:28:18 UTC +00:00], ["target_id", 610], ["target_type", "User"], ["token", "kiqk8GBSdvFUNWzxtZYKqQx6ueXEN9qWjNknuJqI1aUw"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:28:18 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (1.5ms)[0m [1mUPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 180[0m [["active", false], ["updated_at", Tue, 20 May 2014 09:28:18 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" = 'kiqk8GBSdvFUNWzxtZYKqQx6ueXEN9qWjNknuJqI1aUw' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Tue, 20 May 2014 09:28:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:28:18 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" = 'almy-npdSFS9eCmMl3y02gP-ih8yYDX74fe2-pyG1s-g' LIMIT 1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Tue, 20 May 2014 09:28:18 UTC +00:00], ["target_id", 611], ["target_type", "User"], ["token", "almy-npdSFS9eCmMl3y02gP-ih8yYDX74fe2-pyG1s-g"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:28:18 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [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" = 181 [["active", false], ["updated_at", Tue, 20 May 2014 09:28:18 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", Tue, 20 May 2014 09:28:18 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:28:18 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" = 'Ogffr9BzdCSXhGT9Kvtasw1U2gngvEOcwoM-rpez6DHg' 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", Tue, 20 May 2014 09:28:18 UTC +00:00], ["target_id", 612], ["target_type", "User"], ["token", "Ogffr9BzdCSXhGT9Kvtasw1U2gngvEOcwoM-rpez6DHg"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:28:18 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.4ms)[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[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (5.1ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Tue, 20 May 2014 09:31:51 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:31:51 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+Processing by NotifyUser::NotificationsController#index as HTML
+ Rendered /Users/william/Papercloud/notify_user/app/views/notify_user/base_notifications/index.html.erb within layouts/application (0.2ms)
+Completed 200 OK in 10ms (Views: 7.5ms | ActiveRecord: 0.0ms)
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 20 May 2014 09:31:51 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:31:51 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (1.9ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 614 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (1.3ms)[0m INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Tue, 20 May 2014 09:31:51 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 614], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:31:51 UTC +00:00]]
+ [1m[36m (0.2ms)[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" = 614 AND "notify_user_notifications"."target_type" = 'User'
+ [1m[36mNotifyUser::BaseNotification Load (1.2ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 614 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0[0m
+Completed 200 OK in 13ms (Views: 6.5ms | ActiveRecord: 1.9ms)
+ [1m[35m (0.4ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Tue, 20 May 2014 09:31:51 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:31:51 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 615 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", Tue, 20 May 2014 09:31:51 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 615], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:31:51 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 615 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", Tue, 20 May 2014 09:31:51 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 615], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:31:51 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 615 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", Tue, 20 May 2014 09:31:51 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 615], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:31:51 UTC +00:00]]
+ [1m[35m (0.6ms)[0m RELEASE SAVEPOINT active_record_1
+Processing by NotifyUser::NotificationsController#index as HTML
+ [1m[36mNotifyUser::BaseNotification Load (0.8ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 615 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0[0m
+Completed 200 OK in 23ms (Views: 21.1ms | ActiveRecord: 0.8ms)
+ [1m[35m (0.4ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Tue, 20 May 2014 09:31:51 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:31:51 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.4ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 616 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", Tue, 20 May 2014 09:31:51 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 616], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:31:51 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 616 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", Tue, 20 May 2014 09:31:51 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 616], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:31:51 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 616 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", Tue, 20 May 2014 09:31:51 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 616], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:31:51 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+Processing by NotifyUser::NotificationsController#read as HTML
+ Parameters: {"id"=>"615"}
+ [1m[36mNotifyUser::BaseNotification Load (0.9ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 616 AND "notify_user_notifications"."target_type" = 'User' AND (id = '615') 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", 616]]
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 616 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (1.1ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 615[0m [["state", "read"], ["updated_at", Tue, 20 May 2014 09:31:51 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+Completed 200 OK in 18ms (Views: 1.9ms | ActiveRecord: 3.8ms)
+ [1m[36mNotifyUser::BaseNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 615 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.1ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Tue, 20 May 2014 09:31:51 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:31:51 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 617 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", Tue, 20 May 2014 09:31:51 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 617], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:31:51 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 617 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", Tue, 20 May 2014 09:31:51 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 617], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:31:51 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 617 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Tue, 20 May 2014 09:31:51 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 617], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:31:51 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+Processing by NotifyUser::NotificationsController#read as HTML
+ Parameters: {"id"=>"618"}
+ [1m[36mNotifyUser::BaseNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 617 AND "notify_user_notifications"."target_type" = 'User' AND (id = '618') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[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", 617]]
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 617 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = '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" = 618[0m [["state", "read"], ["updated_at", Tue, 20 May 2014 09:31:51 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+Completed 200 OK in 9ms (Views: 0.4ms | ActiveRecord: 3.1ms)
+Processing by NotifyUser::NotificationsController#read as HTML
+ Parameters: {"id"=>"618"}
+ [1m[36mNotifyUser::BaseNotification Load (0.7ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 617 AND "notify_user_notifications"."target_type" = 'User' AND (id = '618') ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+Completed 200 OK in 2ms (Views: 0.2ms | ActiveRecord: 3.7ms)
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Tue, 20 May 2014 09:31:51 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:31:51 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 618 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", Tue, 20 May 2014 09:31:51 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 618], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:31:51 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 618 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[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", Tue, 20 May 2014 09:31:51 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 618], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:31:51 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 618 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", Tue, 20 May 2014 09:31:51 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 618], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:31:51 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" = 618 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" = 618 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('["pending","sent"]'))
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 20 May 2014 09:31:51 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:31:51 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 619 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Tue, 20 May 2014 09:31:51 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 619], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:31:51 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+Processing by NotifyUser::NotificationsController#mark_read as HTML
+ Parameters: {"ids"=>["624"]}
+ [1m[35mSQL (0.8ms)[0m UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 619 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('624'))
+ [1m[36mNotifyUser::BaseNotification Load (0.5ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 619 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('624'))[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", 624]]
+ [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", Tue, 20 May 2014 09:31:51 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:31:51 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 620 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", Tue, 20 May 2014 09:31:51 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 620], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:31:51 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+Processing by NotifyUser::NotificationsController#mark_read as HTML
+ Parameters: {"ids"=>["625"]}
+ [1m[35mSQL (0.6ms)[0m UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 620 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('625'))
+ [1m[36mNotifyUser::BaseNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 620 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('625'))[0m
+Completed 200 OK in 5ms (Views: 2.2ms | 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.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Tue, 20 May 2014 09:31:51 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:31:51 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 621 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", Tue, 20 May 2014 09:31:51 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 621], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:31:51 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" = 621 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+Processing by NotifyUser::NotificationsController#subscriptions as HTML
+ Parameters: {"types"=>[{"type"=>"NewPostNotification", "status"=>"0"}]}
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 621 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.6ms)[0m SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 621) LIMIT 1
+ [1m[36mSQL (1.0ms)[0m [1mINSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Tue, 20 May 2014 09:31:51 UTC +00:00], ["target_id", 621], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:31:51 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 621 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" = 621 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+Completed 200 OK in 18ms (Views: 0.4ms | ActiveRecord: 3.6ms)
+ [1m[36mNotifyUser::Unsubscribe Load (0.5ms)[0m [1mSELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 621 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", Tue, 20 May 2014 09:31:51 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:31:51 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 622 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", Tue, 20 May 2014 09:31:51 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 622], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:31:51 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" = 622 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+Processing by NotifyUser::NotificationsController#subscriptions as HTML
+ Parameters: {"types"=>[{"type"=>"NewPostNotification", "status"=>"1"}]}
+ [1m[35mNotifyUser::Unsubscribe Load (0.5ms)[0m SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 622 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 622 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 622 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+Completed 200 OK in 5ms (Views: 0.8ms | ActiveRecord: 1.6ms)
+ [1m[36mNotifyUser::Unsubscribe Load (0.6ms)[0m [1mSELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 622 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[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", Tue, 20 May 2014 09:31:51 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:31:51 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 623 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", Tue, 20 May 2014 09:31:51 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 623], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:31:51 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+Processing by NotifyUser::NotificationsController#unsubscribe as HTML
+ Parameters: {"type"=>"NewPostNotification"}
+ [1m[36m (0.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" = 623) 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", Tue, 20 May 2014 09:31:51 UTC +00:00], ["target_id", 623], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:31:51 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" = 623 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" = 623 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+Completed 302 Found in 8ms (ActiveRecord: 2.6ms)
+ [1m[36mNotifyUser::Unsubscribe Load (0.5ms)[0m [1mSELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" ORDER BY "notify_user_unsubscribes"."id" DESC LIMIT 1[0m
+ [1m[35m (0.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", Tue, 20 May 2014 09:31:51 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:31:51 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 624 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", Tue, 20 May 2014 09:31:51 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 624], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:31:51 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[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" = 624) LIMIT 1
+ [1m[36mSQL (0.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", Tue, 20 May 2014 09:31:51 UTC +00:00], ["target_id", 624], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:31:51 UTC +00:00]]
+ [1m[35m (0.3ms)[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" = 624 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.9ms)[0m [1mDELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1[0m [["id", 157]]
+ [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: 2.0ms)
+ [1m[36mNotifyUser::Unsubscribe Load (0.4ms)[0m [1mSELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes"[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (1.2ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Tue, 20 May 2014 09:31:51 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:31:51 UTC +00:00]]
+ [1m[35m (0.4ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 625 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", Tue, 20 May 2014 09:31:52 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 625], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Load (0.9ms)[0m [1mSELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 625 AND "notify_user_user_hashes"."target_type" = 'User' 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" = 'TGdMRyt0HsLf74Im62pWNgEsLN9iK4gareWdzQyR8TCg' LIMIT 1[0m
+ [1m[35mSQL (1.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", Tue, 20 May 2014 09:31:52 UTC +00:00], ["target_id", 625], ["target_type", "User"], ["token", "TGdMRyt0HsLf74Im62pWNgEsLN9iK4gareWdzQyR8TCg"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:31:52 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"=>"TGdMRyt0HsLf74Im62pWNgEsLN9iK4gareWdzQyR8TCg"}
+ [1m[35mNotifyUser::UserHash Exists (0.6ms)[0m SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'TGdMRyt0HsLf74Im62pWNgEsLN9iK4gareWdzQyR8TCg' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1
+ [1m[36mNotifyUser::UserHash Load (0.6ms)[0m [1mSELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'TGdMRyt0HsLf74Im62pWNgEsLN9iK4gareWdzQyR8TCg' AND "notify_user_user_hashes"."type" = 'NewPostNotification' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1[0m
+ [1m[35mUser Load (0.5ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 625]]
+ [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" = 625) LIMIT 1
+ [1m[36mSQL (0.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", Tue, 20 May 2014 09:31:52 UTC +00:00], ["target_id", 625], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.9ms)[0m UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 183 [["active", false], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+Completed 200 OK in 12ms (Views: 0.5ms | ActiveRecord: 4.8ms)
+ [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.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.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.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.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Load (0.7ms)[0m SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.3ms)[0m BEGIN
+ [1m[36mNotifyUser::UserHash Load (0.7ms)[0m [1mSELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Load (0.7ms)[0m SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.4ms)[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", Tue, 20 May 2014 09:31:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 626 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", Tue, 20 May 2014 09:31:52 UTC +00:00], ["state", "pending"], ["target_id", 626], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 626 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", Tue, 20 May 2014 09:31:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 627 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", Tue, 20 May 2014 09:31:52 UTC +00:00], ["state", "pending"], ["target_id", 627], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Tue, 20 May 2014 09:31:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 628 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", Tue, 20 May 2014 09:31:52 UTC +00:00], ["state", "pending"], ["target_id", 628], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 20 May 2014 09:31:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 629 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", Tue, 20 May 2014 09:31:52 UTC +00:00], ["state", "pending"], ["target_id", 629], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 629 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" = 634 [["params", {"listing_id"=>1}], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNewPostNotification Load (0.5ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') 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.8ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 20 May 2014 09:31:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 630 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", Tue, 20 May 2014 09:31:52 UTC +00:00], ["state", "pending"], ["target_id", 630], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 630 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" = 635 [["params", {"listing_id"=>1}], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNewPostNotification Load (0.7ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1
+ [1m[36m (0.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", Tue, 20 May 2014 09:31:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 631 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", Tue, 20 May 2014 09:31:52 UTC +00:00], ["state", "pending"], ["target_id", 631], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 631 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" = 636 [["params", {:listing_id=>1}], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNewPostNotification Load (0.5ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') 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.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 20 May 2014 09:31:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 632 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", Tue, 20 May 2014 09:31:52 UTC +00:00], ["state", "pending"], ["target_id", 632], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 632 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" = 637 [["params", {:listing_id=>1}], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNewPostNotification Load (0.5ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 20 May 2014 09:31:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.9ms)[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 (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", Tue, 20 May 2014 09:31:52 UTC +00:00], ["state", "pending"], ["target_id", 633], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Tue, 20 May 2014 09:31:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 634 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", Tue, 20 May 2014 09:31:52 UTC +00:00], ["state", "pending"], ["target_id", 634], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 634 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.7ms)[0m SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 634 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 639)
+ [1m[36mNotifyUser::BaseNotification Load (0.8ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1[0m [["id", 639]]
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 634]]
+ [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" = 634 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mUser Load (0.6ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 634]]
+ [1m[35m (0.4ms)[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 (1.1ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 639[0m [["state", "sent"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::BaseNotification Load (1.2ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 639 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1[0m
+ [1m[35mUser Load (0.7ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 634]]
+ [1m[36m (0.7ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 634 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'[0m
+ [1m[35mNewPostNotification Load (0.5ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 639 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", 634]]
+ [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" = '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", Tue, 20 May 2014 09:31:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 635 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", Tue, 20 May 2014 09:31:52 UTC +00:00], ["state", "pending"], ["target_id", 635], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 635 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 635 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 640)[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", 640]]
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 635]]
+ [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" = 635 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
+ [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[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 635]]
+ [1m[36m (0.5ms)[0m [1mSELECT 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'[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" = 640 [["state", "sent"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::BaseNotification Load (0.5ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 640 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", 635]]
+ [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" = '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" = 640 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", 635]]
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 635 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", Tue, 20 May 2014 09:31:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 636 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", Tue, 20 May 2014 09:31:52 UTC +00:00], ["state", "pending"], ["target_id", 636], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.7ms)[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[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" = 636 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 641)
+ [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.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", Tue, 20 May 2014 09:31:52 UTC +00:00], ["state", "pending"], ["target_id", 636], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 636 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 642)[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Tue, 20 May 2014 09:31:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 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", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Tue, 20 May 2014 09:31:52 UTC +00:00], ["state", "pending"], ["target_id", 637], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 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", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Tue, 20 May 2014 09:31:52 UTC +00:00], ["state", "pending"], ["target_id", 637], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::BaseNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1[0m [["id", 644]]
+ [1m[35mUser Load (0.5ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 637]]
+ [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" = 637 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'[0m
+ [1m[35m (0.5ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.4ms)[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.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 637]]
+ [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.9ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 643[0m [["state", "sent"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 637]]
+ [1m[36m (0.5ms)[0m [1mSELECT 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'[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" = 644 [["state", "sent"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.8ms)[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" = '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" = 637 AND "notify_user_user_hashes"."target_type" = 'User' 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" = 'r9pL1eUVSpnssHb0o0u35QC9FA8q9F0edSR_7Bo9NBVA' 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", Tue, 20 May 2014 09:31:52 UTC +00:00], ["target_id", 637], ["target_type", "User"], ["token", "r9pL1eUVSpnssHb0o0u35QC9FA8q9F0edSR_7Bo9NBVA"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+
+Sent mail to user@example.com (7.5ms)
+Date: Tue, 20 May 2014 19:31:52 +1000
+From: please-change-me-at-config-initializers-notify-user@example.com
+To: user@example.com
+Message-ID: <537b21085fc09_722b3fd90202dbe817314@wp.local.mail>
+Subject: Rails404: You have new Newpostnotification notifications.
+Mime-Version: 1.0
+Content-Type: text/html;
+ charset=UTF-8
+Content-Transfer-Encoding: quoted-printable
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/h=
+tml4/strict.dtd">
+<html>
+<head>
+ <meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type=
+"/>
+ <title></title>
+</head>
+
+<body marginheight=3D"0" topmargin=3D"0" marginwidth=3D"0" leftmargin=3D"=
+0" style=3D"margin: 0px; -webkit-font-smoothing: antialiased; text-render=
+ing: optimizeLegibility;">
+<div style=3D"width: 100%; height: 70px; margin: 0; padding: 0;">
+ <div style=3D"width: 600px; margin: 0 auto; padding: 15px 0;">
+ Logo
+ </div>
+</div>
+<div style=3D"width: 100%; background-color: #fff; margin: 0; padding: 0;=
+">
+ <div style=3D"width: 500px; margin: 0 auto; padding: 40px 0; ">
+ =
+
+<div>
+ New Post Notification happened. =
+
+</div>
+<div>
+ New Post Notification happened. =
+
+</div>
+
+ </div>
+</div>
+<div style=3D"width: 100%; min-height: 80px; margin: 0; padding: 0;">
+ <div style=3D"width: 600px; margin: 0 auto; padding: 0;">
+ <p style=3D"text-align: center;">
+ <a href=3D"http://localhost:5000/notify_user/notifications/unauth=
+_unsubscribe?token=3Dr9pL1eUVSpnssHb0o0u35QC9FA8q9F0edSR_7Bo9NBVA&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.3ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Tue, 20 May 2014 09:31:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT 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'
+ [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", Tue, 20 May 2014 09:31:52 UTC +00:00], ["state", "pending"], ["target_id", 638], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:31:52 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", 645]]
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 638]]
+ [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" = 638 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 638]]
+ [1m[35m (0.5ms)[0m SELECT 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'
+ [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" = 645[0m [["state", "sent"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::BaseNotification Load (0.5ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 645 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", 638]]
+ [1m[36m (0.6ms)[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" = '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" = 638 AND "notify_user_user_hashes"."target_type" = 'User' 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.4ms)[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" = 'wMeMG7CASm3x5778tntlzAVkJppl1Q6wFRJDYYk9ePiA' 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", Tue, 20 May 2014 09:31:52 UTC +00:00], ["target_id", 638], ["target_type", "User"], ["token", "wMeMG7CASm3x5778tntlzAVkJppl1Q6wFRJDYYk9ePiA"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+
+Sent mail to user@example.com (6.0ms)
+Date: Tue, 20 May 2014 19:31:52 +1000
+From: please-change-me-at-config-initializers-notify-user@example.com
+To: user@example.com
+Message-ID: <537b21086b1f7_722b3fd90202dbe817413@wp.local.mail>
+Subject: Rails404: You have a new Newpostnotification notification.
+Mime-Version: 1.0
+Content-Type: text/html;
+ charset=UTF-8
+Content-Transfer-Encoding: quoted-printable
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/h=
+tml4/strict.dtd">
+<html>
+<head>
+ <meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type=
+"/>
+ <title></title>
+</head>
+
+<body marginheight=3D"0" topmargin=3D"0" marginwidth=3D"0" leftmargin=3D"=
+0" style=3D"margin: 0px; -webkit-font-smoothing: antialiased; text-render=
+ing: optimizeLegibility;">
+<div style=3D"width: 100%; height: 70px; margin: 0; padding: 0;">
+ <div style=3D"width: 600px; margin: 0 auto; padding: 15px 0;">
+ Logo
+ </div>
+</div>
+<div style=3D"width: 100%; background-color: #fff; margin: 0; padding: 0;=
+">
+ <div style=3D"width: 500px; margin: 0 auto; padding: 40px 0; ">
+ New Post Notification happened.
+
+ </div>
+</div>
+<div style=3D"width: 100%; min-height: 80px; margin: 0; padding: 0;">
+ <div style=3D"width: 600px; margin: 0 auto; padding: 0;">
+ <p style=3D"text-align: center;">
+ <a href=3D"http://localhost:5000/notify_user/notifications/unauth=
+_unsubscribe?token=3DwMeMG7CASm3x5778tntlzAVkJppl1Q6wFRJDYYk9ePiA&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" = 638 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Tue, 20 May 2014 09:31:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.5ms)[0m SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 639) 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", Tue, 20 May 2014 09:31:52 UTC +00:00], ["target_id", 639], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 639 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::BaseNotification Load (0.7ms)[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.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", Tue, 20 May 2014 09:31:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 640 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", Tue, 20 May 2014 09:31:52 UTC +00:00], ["state", "pending"], ["target_id", 640], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::BaseNotification Load (0.6ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 646 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", 640]]
+ [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" = 'action_mailer'
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 20 May 2014 09:31:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 641 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", Tue, 20 May 2014 09:31:52 UTC +00:00], ["state", "pending"], ["target_id", 641], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 641 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", Tue, 20 May 2014 09:31:52 UTC +00:00], ["state", "pending"], ["target_id", 641], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:31:52 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", 648]]
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 641]]
+ [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" = 641 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[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", 641]]
+ [1m[36m (0.5ms)[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" = 'NewPostNotification'[0m
+ [1m[35mSQL (1.4ms)[0m UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 647 [["state", "sent"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 641]]
+ [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'
+ [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" = 648[0m [["state", "sent"], ["updated_at", Tue, 20 May 2014 09:31:52 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" = 641 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" = 641 AND "notify_user_user_hashes"."target_type" = 'User' 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" = 'htF-NnwjlxknP-T1GiwRRQw8ro5RdApF8xcsqfmBxGqQ' LIMIT 1
+ [1m[36mSQL (0.8ms)[0m [1mINSERT INTO "notify_user_user_hashes" ("created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Tue, 20 May 2014 09:31:52 UTC +00:00], ["target_id", 641], ["target_type", "User"], ["token", "htF-NnwjlxknP-T1GiwRRQw8ro5RdApF8xcsqfmBxGqQ"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+
+Sent mail to user@example.com (5.5ms)
+Date: Tue, 20 May 2014 19:31:52 +1000
+From: please-change-me-at-config-initializers-notify-user@example.com
+To: user@example.com
+Message-ID: <537b21087e961_722b3fd90202dbe8175ad@wp.local.mail>
+Subject: Rails404: You have new Newpostnotification notifications.
+Mime-Version: 1.0
+Content-Type: text/html;
+ charset=UTF-8
+Content-Transfer-Encoding: quoted-printable
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/h=
+tml4/strict.dtd">
+<html>
+<head>
+ <meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type=
+"/>
+ <title></title>
+</head>
+
+<body marginheight=3D"0" topmargin=3D"0" marginwidth=3D"0" leftmargin=3D"=
+0" style=3D"margin: 0px; -webkit-font-smoothing: antialiased; text-render=
+ing: optimizeLegibility;">
+<div style=3D"width: 100%; height: 70px; margin: 0; padding: 0;">
+ <div style=3D"width: 600px; margin: 0 auto; padding: 15px 0;">
+ Logo
+ </div>
+</div>
+<div style=3D"width: 100%; background-color: #fff; margin: 0; padding: 0;=
+">
+ <div style=3D"width: 500px; margin: 0 auto; padding: 40px 0; ">
+ =
+
+<div>
+ New Post Notification happened. =
+
+</div>
+<div>
+ New Post Notification happened. =
+
+</div>
+
+ </div>
+</div>
+<div style=3D"width: 100%; min-height: 80px; margin: 0; padding: 0;">
+ <div style=3D"width: 600px; margin: 0 auto; padding: 0;">
+ <p style=3D"text-align: center;">
+ <a href=3D"http://localhost:5000/notify_user/notifications/unauth=
+_unsubscribe?token=3DhtF-NnwjlxknP-T1GiwRRQw8ro5RdApF8xcsqfmBxGqQ&typ=
+e=3DNewPostNotification">Unsubscribe</a>
+ </p>
+ <p style=3D"text-align: center;">
+ This is the default generated layout. A privacy declaration could g=
+o here.
+ </p>
+ <p style=3D"text-align: center; margin-bottom: 0px;">
+ =C2=A9 MyCompany Pty Ltd
+ </p>
+ <p style=3D"text-align: center; margin-top: 0px; padding-top: 0px;">
+ ABN 123 456 789
+ </p>
+ </div>
+</div>
+</body>
+</html>=
+
+ [1m[36m (0.4ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 20 May 2014 09:31:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[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" = '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", Tue, 20 May 2014 09:31:52 UTC +00:00], ["state", "pending"], ["target_id", 642], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::BaseNotification Load (0.5ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 649]]
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 642]]
+ [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" = 642 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [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", 642]]
+ [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" = '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" = 649 [["state", "sent"], ["updated_at", Tue, 20 May 2014 09:31:52 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" = 649 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", 642]]
+ [1m[35m (0.5ms)[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" = '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" = 642 AND "notify_user_user_hashes"."target_type" = 'User' 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" = 'PGOa1bSXgmZeMjeYaYB2mgYBPOp-vTikNdScm39YJesw' 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", Tue, 20 May 2014 09:31:52 UTC +00:00], ["target_id", 642], ["target_type", "User"], ["token", "PGOa1bSXgmZeMjeYaYB2mgYBPOp-vTikNdScm39YJesw"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+
+Sent mail to user@example.com (6.4ms)
+Date: Tue, 20 May 2014 19:31:52 +1000
+From: please-change-me-at-config-initializers-notify-user@example.com
+To: user@example.com
+Message-ID: <537b210888962_722b3fd90202dbe817687@wp.local.mail>
+Subject: Rails404: You have a new Newpostnotification notification.
+Mime-Version: 1.0
+Content-Type: text/html;
+ charset=UTF-8
+Content-Transfer-Encoding: quoted-printable
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/h=
+tml4/strict.dtd">
+<html>
+<head>
+ <meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type=
+"/>
+ <title></title>
+</head>
+
+<body marginheight=3D"0" topmargin=3D"0" marginwidth=3D"0" leftmargin=3D"=
+0" style=3D"margin: 0px; -webkit-font-smoothing: antialiased; text-render=
+ing: optimizeLegibility;">
+<div style=3D"width: 100%; height: 70px; margin: 0; padding: 0;">
+ <div style=3D"width: 600px; margin: 0 auto; padding: 15px 0;">
+ Logo
+ </div>
+</div>
+<div style=3D"width: 100%; background-color: #fff; margin: 0; padding: 0;=
+">
+ <div style=3D"width: 500px; margin: 0 auto; padding: 40px 0; ">
+ New Post Notification happened.
+
+ </div>
+</div>
+<div style=3D"width: 100%; min-height: 80px; margin: 0; padding: 0;">
+ <div style=3D"width: 600px; margin: 0 auto; padding: 0;">
+ <p style=3D"text-align: center;">
+ <a href=3D"http://localhost:5000/notify_user/notifications/unauth=
+_unsubscribe?token=3DPGOa1bSXgmZeMjeYaYB2mgYBPOp-vTikNdScm39YJesw&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", Tue, 20 May 2014 09:31:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 643 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", Tue, 20 May 2014 09:31:52 UTC +00:00], ["state", "pending"], ["target_id", 643], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 643 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 643 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.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" = 643 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" = 650[0m [["state", "sent"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNewPostNotification Load (0.5ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 650 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", 643]]
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 643 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" = 643 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", Tue, 20 May 2014 09:31:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[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" = 644) 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", Tue, 20 May 2014 09:31:52 UTC +00:00], ["target_id", 644], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[36m (1.4ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 644 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 644 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" = 644 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.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", Tue, 20 May 2014 09:31:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Exists (0.5ms)[0m [1mSELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'action_mailer' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 645) LIMIT 1[0m
+ [1m[35mSQL (1.0ms)[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", Tue, 20 May 2014 09:31:52 UTC +00:00], ["target_id", 645], ["target_type", "User"], ["type", "action_mailer"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[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.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", Tue, 20 May 2014 09:31:52 UTC +00:00], ["state", "pending"], ["target_id", 645], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 645 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" = 645 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.4ms)[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.9ms)[0m UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 651 [["state", "sent"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNewPostNotification Load (0.6ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 651 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", 645]]
+ [1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 645 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
+ [1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 645 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", Tue, 20 May 2014 09:31:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.7ms)[0m SELECT 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'
+ [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", Tue, 20 May 2014 09:31:52 UTC +00:00], ["state", "pending"], ["target_id", 646], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Load (0.7ms)[0m [1mSELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 646 AND "notify_user_user_hashes"."target_type" = 'User' 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" = 'KVJEgnjn5W7asnTgPxNMbwam_GsxYJuoEY91iipEdKdA' 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", Tue, 20 May 2014 09:31:52 UTC +00:00], ["target_id", 646], ["target_type", "User"], ["token", "KVJEgnjn5W7asnTgPxNMbwam_GsxYJuoEY91iipEdKdA"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Tue, 20 May 2014 09:31:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 647 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", Tue, 20 May 2014 09:31:52 UTC +00:00], ["state", "pending"], ["target_id", 647], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Load (0.6ms)[0m [1mSELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 647 AND "notify_user_user_hashes"."target_type" = 'User' 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" = 'BQ0nSSs8l47COQNvzYkwLASvsIEDadMPeuqBrAs0MFsA' 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", Tue, 20 May 2014 09:31:52 UTC +00:00], ["target_id", 647], ["target_type", "User"], ["token", "BQ0nSSs8l47COQNvzYkwLASvsIEDadMPeuqBrAs0MFsA"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:31:52 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" = 647 AND "notify_user_user_hashes"."target_type" = 'User' 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.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", Tue, 20 May 2014 09:31:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 648 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (0.4ms)[0m INSERT INTO "notify_user_notifications" ("created_at", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" [["created_at", Tue, 20 May 2014 09:31:52 UTC +00:00], ["state", "pending"], ["target_id", 648], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:31:52 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" = 648 AND "notify_user_user_hashes"."target_type" = 'User' 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" = '0Ygu4AujEONLn84nfRGvHgBkJKYHlLfWC2Nw7y0fpvug' 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", Tue, 20 May 2014 09:31:52 UTC +00:00], ["target_id", 648], ["target_type", "User"], ["token", "0Ygu4AujEONLn84nfRGvHgBkJKYHlLfWC2Nw7y0fpvug"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.7ms)[0m UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 190 [["active", false], ["updated_at", Tue, 20 May 2014 09:31:52 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" = 648 AND "notify_user_user_hashes"."target_type" = 'User' 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" = 'NsfkdW6aAtMUJ1GW6dWbbwrlihW7xJ1jyMnUKLnxfRxQ' 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", Tue, 20 May 2014 09:31:52 UTC +00:00], ["target_id", 648], ["target_type", "User"], ["token", "NsfkdW6aAtMUJ1GW6dWbbwrlihW7xJ1jyMnUKLnxfRxQ"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 20 May 2014 09:31:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Exists (0.5ms)[0m [1mSELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 649) 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", Tue, 20 May 2014 09:31:52 UTC +00:00], ["target_id", 649], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Exists (0.7ms)[0m [1mSELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 162 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 649) LIMIT 1[0m
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 649 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Tue, 20 May 2014 09:31:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.5ms)[0m SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 650) 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", Tue, 20 May 2014 09:31:52 UTC +00:00], ["target_id", 650], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.5ms)[0m SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 163 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 650) LIMIT 1
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 650 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 20 May 2014 09:31:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Exists (0.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" = 651) LIMIT 1[0m
+ [1m[35mSQL (0.4ms)[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", Tue, 20 May 2014 09:31:52 UTC +00:00], ["target_id", 651], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Exists (0.5ms)[0m [1mSELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 164 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 651) LIMIT 1[0m
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.5ms)[0m SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'UnsubscribableNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 651) 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.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", Tue, 20 May 2014 09:31:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::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" = 652) 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", Tue, 20 May 2014 09:31:52 UTC +00:00], ["target_id", 652], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::Unsubscribe Exists (0.4ms)[0m [1mSELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 165 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 652) 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" = 652) 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" = 652 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" = 652 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", 165]]
+ [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" = 652 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", Tue, 20 May 2014 09:31:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 653 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", Tue, 20 May 2014 09:31:52 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 653], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:31:52 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", Tue, 20 May 2014 09:31:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Exists (0.5ms)[0m [1mSELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'BbPLeLZ5VEwcFP5QvpCqmAexeFmRHOoMtj6IQZcAHbfQ' 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", Tue, 20 May 2014 09:31:52 UTC +00:00], ["target_id", 654], ["target_type", "User"], ["token", "BbPLeLZ5VEwcFP5QvpCqmAexeFmRHOoMtj6IQZcAHbfQ"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Exists (0.4ms)[0m SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'BbPLeLZ5VEwcFP5QvpCqmAexeFmRHOoMtj6IQZcAHbfQ' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.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", Tue, 20 May 2014 09:31:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Exists (0.4ms)[0m [1mSELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'V72zULEZTyX81b8yDPjUpQJKq_GsoLTRmz87OZd6fjaA' 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", Tue, 20 May 2014 09:31:52 UTC +00:00], ["target_id", 655], ["target_type", "User"], ["token", "V72zULEZTyX81b8yDPjUpQJKq_GsoLTRmz87OZd6fjaA"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.7ms)[0m [1mUPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 193[0m [["active", false], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Exists (0.4ms)[0m [1mSELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'V72zULEZTyX81b8yDPjUpQJKq_GsoLTRmz87OZd6fjaA' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Tue, 20 May 2014 09:31:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Exists (0.5ms)[0m SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'qbzecWsMuyAn9Zyi6W8IgQxIl-47yJjq0vSz-fI4m9yQ' 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", Tue, 20 May 2014 09:31:52 UTC +00:00], ["target_id", 656], ["target_type", "User"], ["token", "qbzecWsMuyAn9Zyi6W8IgQxIl-47yJjq0vSz-fI4m9yQ"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.8ms)[0m UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 194 [["active", false], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.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", Tue, 20 May 2014 09:31:52 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Exists (0.4ms)[0m SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'uG2Eujjzkkj3-lUDPlvruw7_Cf7WdvlslWpOkFbr9QaQ' 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", Tue, 20 May 2014 09:31:52 UTC +00:00], ["target_id", 657], ["target_type", "User"], ["token", "uG2Eujjzkkj3-lUDPlvruw7_Cf7WdvlslWpOkFbr9QaQ"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:31:52 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [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[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.4ms)[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.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (4.4ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Tue, 20 May 2014 09:32:08 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:32:08 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+Processing by NotifyUser::NotificationsController#index as HTML
+ Rendered /Users/william/Papercloud/notify_user/app/views/notify_user/base_notifications/index.html.erb within layouts/application (0.3ms)
+Completed 200 OK in 10ms (Views: 7.5ms | ActiveRecord: 0.0ms)
+ [1m[36m (0.4ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 20 May 2014 09:32:08 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:32:08 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" = 659 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (1.2ms)[0m INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Tue, 20 May 2014 09:32:08 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 659], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:32:08 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+Processing by NotifyUser::NotificationsController#index as JSON
+ [1m[35m (0.8ms)[0m SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 659 AND "notify_user_notifications"."target_type" = 'User'
+ [1m[36mNotifyUser::BaseNotification Load (1.1ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 659 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0[0m
+Completed 200 OK in 13ms (Views: 6.4ms | ActiveRecord: 1.9ms)
+ [1m[35m (0.4ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Tue, 20 May 2014 09:32:08 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:32:08 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" = 660 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", Tue, 20 May 2014 09:32:08 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 660], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:32:08 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" = 660 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", Tue, 20 May 2014 09:32:08 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 660], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:32:08 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" = 660 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", Tue, 20 May 2014 09:32:08 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 660], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:32:08 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+Processing by NotifyUser::NotificationsController#index as HTML
+ [1m[36mNotifyUser::BaseNotification Load (0.7ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 660 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0[0m
+Completed 200 OK in 24ms (Views: 22.2ms | ActiveRecord: 0.7ms)
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.7ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Tue, 20 May 2014 09:32:08 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:32:08 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" = 661 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", Tue, 20 May 2014 09:32:08 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 661], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:32:08 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" = 661 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", Tue, 20 May 2014 09:32:08 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 661], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:32:08 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" = 661 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", Tue, 20 May 2014 09:32:08 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 661], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:32:08 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+Processing by NotifyUser::NotificationsController#read as HTML
+ Parameters: {"id"=>"660"}
+ [1m[36mNotifyUser::BaseNotification Load (1.0ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 661 AND "notify_user_notifications"."target_type" = 'User' AND (id = '660') 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", 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" = 'NewPostNotification'
+ [1m[36mSQL (1.1ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 660[0m [["state", "read"], ["updated_at", Tue, 20 May 2014 09:32:08 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+Completed 200 OK in 17ms (Views: 1.4ms | ActiveRecord: 4.0ms)
+ [1m[36mNotifyUser::BaseNotification Load (0.7ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 660 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", Tue, 20 May 2014 09:32:08 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:32:08 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", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Tue, 20 May 2014 09:32:08 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 662], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:32:08 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" = 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", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Tue, 20 May 2014 09:32:08 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 662], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:32:08 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.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", Tue, 20 May 2014 09:32:08 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 662], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:32:08 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+Processing by NotifyUser::NotificationsController#read as HTML
+ Parameters: {"id"=>"663"}
+ [1m[36mNotifyUser::BaseNotification Load (0.7ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 662 AND "notify_user_notifications"."target_type" = 'User' AND (id = '663') 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", 662]]
+ [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 (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" = 663[0m [["state", "read"], ["updated_at", Tue, 20 May 2014 09:32:08 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+Completed 200 OK in 8ms (Views: 0.3ms | ActiveRecord: 3.1ms)
+Processing by NotifyUser::NotificationsController#read as HTML
+ Parameters: {"id"=>"663"}
+ [1m[36mNotifyUser::BaseNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 662 AND "notify_user_notifications"."target_type" = 'User' AND (id = '663') 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.7ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Tue, 20 May 2014 09:32:08 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:32:08 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" = 663 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", Tue, 20 May 2014 09:32:08 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 663], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:32:08 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" = 663 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", Tue, 20 May 2014 09:32:08 UTC +00:00], ["params", {:name=>"Mr. Adams"}], ["state", "pending"], ["target_id", 663], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:32:08 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" = 663 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", Tue, 20 May 2014 09:32:08 UTC +00:00], ["params", {:name=>"Mrs. James"}], ["state", "pending"], ["target_id", 663], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:32:08 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+Processing by NotifyUser::NotificationsController#mark_all as HTML
+ [1m[36mSQL (1.0ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 663 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 2ms (ActiveRecord: 1.0ms)
+ [1m[35mNotifyUser::BaseNotification Load (0.6ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 663 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.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 20 May 2014 09:32:08 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:32:08 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" = 664 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", Tue, 20 May 2014 09:32:08 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 664], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:32:08 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+Processing by NotifyUser::NotificationsController#mark_read as HTML
+ Parameters: {"ids"=>["669"]}
+ [1m[35mSQL (0.6ms)[0m UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 664 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('669'))
+ [1m[36mNotifyUser::BaseNotification Load (0.7ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 664 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('669'))[0m
+Completed 200 OK in 5ms (Views: 2.6ms | ActiveRecord: 1.3ms)
+ [1m[35mNewPostNotification Load (1.0ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 669]]
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 20 May 2014 09:32:08 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:32:08 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" = 665 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", Tue, 20 May 2014 09:32:08 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 665], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:32:08 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+Processing by NotifyUser::NotificationsController#mark_read as HTML
+ Parameters: {"ids"=>["670"]}
+ [1m[35mSQL (0.6ms)[0m UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 665 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('670'))
+ [1m[36mNotifyUser::BaseNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 665 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('670'))[0m
+Completed 200 OK in 4ms (Views: 2.0ms | ActiveRecord: 1.2ms)
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.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", Tue, 20 May 2014 09:32:08 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:32:08 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" = 666 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", Tue, 20 May 2014 09:32:08 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 666], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:32:08 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" = 666 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+Processing by NotifyUser::NotificationsController#subscriptions as HTML
+ Parameters: {"types"=>[{"type"=>"NewPostNotification", "status"=>"0"}]}
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 666 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.6ms)[0m SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 666) LIMIT 1
+ [1m[36mSQL (1.0ms)[0m [1mINSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Tue, 20 May 2014 09:32:08 UTC +00:00], ["target_id", 666], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:32:08 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" = 666 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" = 666 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+Completed 200 OK in 19ms (Views: 0.3ms | ActiveRecord: 3.7ms)
+ [1m[36mNotifyUser::Unsubscribe Load (0.5ms)[0m [1mSELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 666 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", Tue, 20 May 2014 09:32:08 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:32:08 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" = 667 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", Tue, 20 May 2014 09:32:08 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 667], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:32:08 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" = 667 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+Processing by NotifyUser::NotificationsController#subscriptions as HTML
+ Parameters: {"types"=>[{"type"=>"NewPostNotification", "status"=>"1"}]}
+ [1m[35mNotifyUser::Unsubscribe Load (0.5ms)[0m SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 667 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" = 667 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" = 667 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+Completed 200 OK in 4ms (Views: 0.3ms | ActiveRecord: 1.5ms)
+ [1m[36mNotifyUser::Unsubscribe Load (0.5ms)[0m [1mSELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 667 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Tue, 20 May 2014 09:32:08 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:32:08 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" = 668 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", Tue, 20 May 2014 09:32:08 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 668], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:32:08 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.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" = 668) 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", Tue, 20 May 2014 09:32:08 UTC +00:00], ["target_id", 668], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:32:08 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+Redirected to http://test.host/notify_user/notifications/unsubscribe
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 668 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" = 668 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.5ms)[0m [1mSELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" ORDER BY "notify_user_unsubscribes"."id" DESC LIMIT 1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Tue, 20 May 2014 09:32:08 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:32:08 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" = 669 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", Tue, 20 May 2014 09:32:08 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 669], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:32:08 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", Tue, 20 May 2014 09:32:08 UTC +00:00], ["target_id", 669], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:32:08 UTC +00:00]]
+ [1m[35m (0.3ms)[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" = 669 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", 168]]
+ [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.9ms)
+ [1m[36mNotifyUser::Unsubscribe Load (0.3ms)[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", Tue, 20 May 2014 09:32:08 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:32:08 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" = 670 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", Tue, 20 May 2014 09:32:08 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 670], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:32:08 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Load (1.2ms)[0m [1mSELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 670 AND "notify_user_user_hashes"."target_type" = 'User' 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" = 'I_BhSlalZeE9wp7lzk8uMg264xA8WZaupmIrVtaP_Ucw' LIMIT 1[0m
+ [1m[35mSQL (1.0ms)[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", Tue, 20 May 2014 09:32:08 UTC +00:00], ["target_id", 670], ["target_type", "User"], ["token", "I_BhSlalZeE9wp7lzk8uMg264xA8WZaupmIrVtaP_Ucw"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:32:08 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+Processing by NotifyUser::NotificationsController#unauth_unsubscribe as HTML
+ Parameters: {"type"=>"NewPostNotification", "token"=>"I_BhSlalZeE9wp7lzk8uMg264xA8WZaupmIrVtaP_Ucw"}
+ [1m[35mNotifyUser::UserHash Exists (0.6ms)[0m SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'I_BhSlalZeE9wp7lzk8uMg264xA8WZaupmIrVtaP_Ucw' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1
+ [1m[36mNotifyUser::UserHash Load (0.6ms)[0m [1mSELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'I_BhSlalZeE9wp7lzk8uMg264xA8WZaupmIrVtaP_Ucw' AND "notify_user_user_hashes"."type" = 'NewPostNotification' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1[0m
+ [1m[35mUser Load (0.5ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 670]]
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.4ms)[0m SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 670) 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", Tue, 20 May 2014 09:32:08 UTC +00:00], ["target_id", 670], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:32:08 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" = 196 [["active", false], ["updated_at", Tue, 20 May 2014 09:32:08 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+Completed 200 OK in 12ms (Views: 0.5ms | ActiveRecord: 4.3ms)
+ [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.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Load (0.7ms)[0m SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36mNotifyUser::UserHash Load (0.7ms)[0m [1mSELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Load (0.7ms)[0m SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36mNotifyUser::UserHash Load (0.7ms)[0m [1mSELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Load (0.7ms)[0m SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' ORDER BY "notify_user_user_hashes"."id" ASC LIMIT 1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 20 May 2014 09:32:08 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:32:08 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" = 671 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", Tue, 20 May 2014 09:32:08 UTC +00:00], ["state", "pending"], ["target_id", 671], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:32:08 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 671 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", Tue, 20 May 2014 09:32:08 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:32:08 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" = 672 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", Tue, 20 May 2014 09:32:08 UTC +00:00], ["state", "pending"], ["target_id", 672], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:32:08 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", Tue, 20 May 2014 09:32:08 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:32:08 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" = 673 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", Tue, 20 May 2014 09:32:08 UTC +00:00], ["state", "pending"], ["target_id", 673], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:32:08 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.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", Tue, 20 May 2014 09:32:08 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:32:08 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" = 674 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", Tue, 20 May 2014 09:32:08 UTC +00:00], ["state", "pending"], ["target_id", 674], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:32:08 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" = 674 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" = 679 [["params", {"listing_id"=>1}], ["updated_at", Tue, 20 May 2014 09:32:08 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNewPostNotification Load (0.7ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1
+ [1m[36m (0.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", Tue, 20 May 2014 09:32:08 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:32:08 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" = 675 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", Tue, 20 May 2014 09:32:08 UTC +00:00], ["state", "pending"], ["target_id", 675], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:32:08 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" = 675 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" = 680 [["params", {"listing_id"=>1}], ["updated_at", Tue, 20 May 2014 09:32:08 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNewPostNotification Load (0.7ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1
+ [1m[36m (0.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", Tue, 20 May 2014 09:32:08 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:32:08 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" = 676 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", Tue, 20 May 2014 09:32:08 UTC +00:00], ["state", "pending"], ["target_id", 676], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:32:08 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" = 676 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" = 681 [["params", {:listing_id=>1}], ["updated_at", Tue, 20 May 2014 09:32:08 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", Tue, 20 May 2014 09:32:08 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:32:08 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" = 677 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", Tue, 20 May 2014 09:32:08 UTC +00:00], ["state", "pending"], ["target_id", 677], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:32:08 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" = 677 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" = 682 [["params", {:listing_id=>1}], ["updated_at", Tue, 20 May 2014 09:32:08 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNewPostNotification Load (0.6ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') 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", Tue, 20 May 2014 09:32:08 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:32:08 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" = 678 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", Tue, 20 May 2014 09:32:08 UTC +00:00], ["state", "pending"], ["target_id", 678], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:32:08 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.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Tue, 20 May 2014 09:32:08 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:32:08 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" = 679 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", Tue, 20 May 2014 09:32:08 UTC +00:00], ["state", "pending"], ["target_id", 679], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:32:08 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" = 679 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" = 679 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 684)
+ [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", 684]]
+ [1m[35mUser Load (0.5ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 679]]
+ [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" = 679 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'[0m
+ [1m[35m (0.3ms)[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[36mUser Load (0.5ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 679]]
+ [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 (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" = 684[0m [["state", "sent"], ["updated_at", Tue, 20 May 2014 09:32:08 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" = 684 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", 679]]
+ [1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 679 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" = 684 ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
+ [1m[36mUser Load (0.5ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 679]]
+ [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" = '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", Tue, 20 May 2014 09:32:08 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:32:08 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" = 680 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", Tue, 20 May 2014 09:32:08 UTC +00:00], ["state", "pending"], ["target_id", 680], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:32:08 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" = 680 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" = 680 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 685)[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", 685]]
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 680]]
+ [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" = 680 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 680]]
+ [1m[36m (0.6ms)[0m [1mSELECT 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'[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" = 685 [["state", "sent"], ["updated_at", Tue, 20 May 2014 09:32:08 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::BaseNotification Load (0.6ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 685 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", 680]]
+ [1m[35m (0.6ms)[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" = '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" = 685 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", 680]]
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 680 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", Tue, 20 May 2014 09:32:09 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:32:09 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[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", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Tue, 20 May 2014 09:32:09 UTC +00:00], ["state", "pending"], ["target_id", 681], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:32:09 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[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[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" = 681 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 686)
+ [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" = 681 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", Tue, 20 May 2014 09:32:09 UTC +00:00], ["state", "pending"], ["target_id", 681], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:32:09 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" = 681 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 687)[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", Tue, 20 May 2014 09:32:09 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:32:09 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" = 682 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", Tue, 20 May 2014 09:32:09 UTC +00:00], ["state", "pending"], ["target_id", 682], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:32:09 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[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", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id"[0m [["created_at", Tue, 20 May 2014 09:32:09 UTC +00:00], ["state", "pending"], ["target_id", 682], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:32:09 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::BaseNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = $1 LIMIT 1[0m [["id", 689]]
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 682]]
+ [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" = 682 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 682]]
+ [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.9ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 688[0m [["state", "sent"], ["updated_at", Tue, 20 May 2014 09:32:09 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 682]]
+ [1m[36m (0.7ms)[0m [1mSELECT 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'[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" = 689 [["state", "sent"], ["updated_at", Tue, 20 May 2014 09:32:09 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 682 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" = 682 AND "notify_user_user_hashes"."target_type" = 'User' 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" = '3PcPsFjsEYbMLtYSLlw8TAmGMO8eYwEqa7I98e1ay8mQ' 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", Tue, 20 May 2014 09:32:09 UTC +00:00], ["target_id", 682], ["target_type", "User"], ["token", "3PcPsFjsEYbMLtYSLlw8TAmGMO8eYwEqa7I98e1ay8mQ"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:32:09 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+
+Sent mail to user@example.com (7.8ms)
+Date: Tue, 20 May 2014 19:32:09 +1000
+From: please-change-me-at-config-initializers-notify-user@example.com
+To: user@example.com
+Message-ID: <537b211916f78_72383fcfb442dbdc2270@wp.local.mail>
+Subject: Rails404: You have new Newpostnotification notifications.
+Mime-Version: 1.0
+Content-Type: text/html;
+ charset=UTF-8
+Content-Transfer-Encoding: quoted-printable
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/h=
+tml4/strict.dtd">
+<html>
+<head>
+ <meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type=
+"/>
+ <title></title>
+</head>
+
+<body marginheight=3D"0" topmargin=3D"0" marginwidth=3D"0" leftmargin=3D"=
+0" style=3D"margin: 0px; -webkit-font-smoothing: antialiased; text-render=
+ing: optimizeLegibility;">
+<div style=3D"width: 100%; height: 70px; margin: 0; padding: 0;">
+ <div style=3D"width: 600px; margin: 0 auto; padding: 15px 0;">
+ Logo
+ </div>
+</div>
+<div style=3D"width: 100%; background-color: #fff; margin: 0; padding: 0;=
+">
+ <div style=3D"width: 500px; margin: 0 auto; padding: 40px 0; ">
+ =
+
+<div>
+ New Post Notification happened. =
+
+</div>
+<div>
+ New Post Notification happened. =
+
+</div>
+
+ </div>
+</div>
+<div style=3D"width: 100%; min-height: 80px; margin: 0; padding: 0;">
+ <div style=3D"width: 600px; margin: 0 auto; padding: 0;">
+ <p style=3D"text-align: center;">
+ <a href=3D"http://localhost:5000/notify_user/notifications/unauth=
+_unsubscribe?token=3D3PcPsFjsEYbMLtYSLlw8TAmGMO8eYwEqa7I98e1ay8mQ&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", Tue, 20 May 2014 09:32:09 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:32:09 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[0m SELECT 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'
+ [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", Tue, 20 May 2014 09:32:09 UTC +00:00], ["state", "pending"], ["target_id", 683], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:32:09 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", 690]]
+ [1m[35mUser Load (0.4ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 683]]
+ [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" = 683 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 683]]
+ [1m[35m (0.5ms)[0m SELECT 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'
+ [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" = 690[0m [["state", "sent"], ["updated_at", Tue, 20 May 2014 09:32:09 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::BaseNotification Load (0.5ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 690 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", 683]]
+ [1m[36m (0.4ms)[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" = '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" = 683 AND "notify_user_user_hashes"."target_type" = 'User' 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" = 'g2KWxR2E5vKPNExvQyyoEweGcQmvyvEioqWo6nFU4Tgw' 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", Tue, 20 May 2014 09:32:09 UTC +00:00], ["target_id", 683], ["target_type", "User"], ["token", "g2KWxR2E5vKPNExvQyyoEweGcQmvyvEioqWo6nFU4Tgw"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:32:09 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+
+Sent mail to user@example.com (5.4ms)
+Date: Tue, 20 May 2014 19:32:09 +1000
+From: please-change-me-at-config-initializers-notify-user@example.com
+To: user@example.com
+Message-ID: <537b2119217bb_72383fcfb442dbdc228da@wp.local.mail>
+Subject: Rails404: You have a new Newpostnotification notification.
+Mime-Version: 1.0
+Content-Type: text/html;
+ charset=UTF-8
+Content-Transfer-Encoding: quoted-printable
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/h=
+tml4/strict.dtd">
+<html>
+<head>
+ <meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type=
+"/>
+ <title></title>
+</head>
+
+<body marginheight=3D"0" topmargin=3D"0" marginwidth=3D"0" leftmargin=3D"=
+0" style=3D"margin: 0px; -webkit-font-smoothing: antialiased; text-render=
+ing: optimizeLegibility;">
+<div style=3D"width: 100%; height: 70px; margin: 0; padding: 0;">
+ <div style=3D"width: 600px; margin: 0 auto; padding: 15px 0;">
+ Logo
+ </div>
+</div>
+<div style=3D"width: 100%; background-color: #fff; margin: 0; padding: 0;=
+">
+ <div style=3D"width: 500px; margin: 0 auto; padding: 40px 0; ">
+ New Post Notification happened.
+
+ </div>
+</div>
+<div style=3D"width: 100%; min-height: 80px; margin: 0; padding: 0;">
+ <div style=3D"width: 600px; margin: 0 auto; padding: 0;">
+ <p style=3D"text-align: center;">
+ <a href=3D"http://localhost:5000/notify_user/notifications/unauth=
+_unsubscribe?token=3Dg2KWxR2E5vKPNExvQyyoEweGcQmvyvEioqWo6nFU4Tgw&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" = 683 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", Tue, 20 May 2014 09:32:09 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:32:09 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (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" = 684) 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", Tue, 20 May 2014 09:32:09 UTC +00:00], ["target_id", 684], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:32:09 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT 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'
+ [1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::BaseNotification Load (0.5ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" IS NULL ORDER BY "notify_user_notifications"."id" ASC LIMIT 1
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.3ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 20 May 2014 09:32:09 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:32:09 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" = 685 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", Tue, 20 May 2014 09:32:09 UTC +00:00], ["state", "pending"], ["target_id", 685], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:32:09 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::BaseNotification Load (0.7ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 691 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", 685]]
+ [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" = 'action_mailer'
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 20 May 2014 09:32:09 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:32:09 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" = 686 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", Tue, 20 May 2014 09:32:09 UTC +00:00], ["state", "pending"], ["target_id", 686], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:32:09 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" = 686 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", Tue, 20 May 2014 09:32:09 UTC +00:00], ["state", "pending"], ["target_id", 686], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:32:09 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", 693]]
+ [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 686]]
+ [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" = 686 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
+ [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[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", 686]]
+ [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" = '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" = 692 [["state", "sent"], ["updated_at", Tue, 20 May 2014 09:32:09 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 686]]
+ [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.9ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 693[0m [["state", "sent"], ["updated_at", Tue, 20 May 2014 09:32:09 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" = 686 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" = 686 AND "notify_user_user_hashes"."target_type" = 'User' 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" = 'iWa4bAeSwndMARaPGEeyBAK1DEFBq3-UJ3Q19dZKbCpQ' 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", Tue, 20 May 2014 09:32:09 UTC +00:00], ["target_id", 686], ["target_type", "User"], ["token", "iWa4bAeSwndMARaPGEeyBAK1DEFBq3-UJ3Q19dZKbCpQ"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:32:09 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+
+Sent mail to user@example.com (6.7ms)
+Date: Tue, 20 May 2014 19:32:09 +1000
+From: please-change-me-at-config-initializers-notify-user@example.com
+To: user@example.com
+Message-ID: <537b211934787_72383fcfb442dbdc229bc@wp.local.mail>
+Subject: Rails404: You have new Newpostnotification notifications.
+Mime-Version: 1.0
+Content-Type: text/html;
+ charset=UTF-8
+Content-Transfer-Encoding: quoted-printable
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/h=
+tml4/strict.dtd">
+<html>
+<head>
+ <meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type=
+"/>
+ <title></title>
+</head>
+
+<body marginheight=3D"0" topmargin=3D"0" marginwidth=3D"0" leftmargin=3D"=
+0" style=3D"margin: 0px; -webkit-font-smoothing: antialiased; text-render=
+ing: optimizeLegibility;">
+<div style=3D"width: 100%; height: 70px; margin: 0; padding: 0;">
+ <div style=3D"width: 600px; margin: 0 auto; padding: 15px 0;">
+ Logo
+ </div>
+</div>
+<div style=3D"width: 100%; background-color: #fff; margin: 0; padding: 0;=
+">
+ <div style=3D"width: 500px; margin: 0 auto; padding: 40px 0; ">
+ =
+
+<div>
+ New Post Notification happened. =
+
+</div>
+<div>
+ New Post Notification happened. =
+
+</div>
+
+ </div>
+</div>
+<div style=3D"width: 100%; min-height: 80px; margin: 0; padding: 0;">
+ <div style=3D"width: 600px; margin: 0 auto; padding: 0;">
+ <p style=3D"text-align: center;">
+ <a href=3D"http://localhost:5000/notify_user/notifications/unauth=
+_unsubscribe?token=3DiWa4bAeSwndMARaPGEeyBAK1DEFBq3-UJ3Q19dZKbCpQ&typ=
+e=3DNewPostNotification">Unsubscribe</a>
+ </p>
+ <p style=3D"text-align: center;">
+ This is the default generated layout. A privacy declaration could g=
+o here.
+ </p>
+ <p style=3D"text-align: center; margin-bottom: 0px;">
+ =C2=A9 MyCompany Pty Ltd
+ </p>
+ <p style=3D"text-align: center; margin-top: 0px; padding-top: 0px;">
+ ABN 123 456 789
+ </p>
+ </div>
+</div>
+</body>
+</html>=
+
+ [1m[36m (0.4ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 20 May 2014 09:32:09 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:32:09 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" = 687 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", Tue, 20 May 2014 09:32:09 UTC +00:00], ["state", "pending"], ["target_id", 687], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:32:09 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", 694]]
+ [1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1[0m [["id", 687]]
+ [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" = 687 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 687]]
+ [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" = '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" = 694 [["state", "sent"], ["updated_at", Tue, 20 May 2014 09:32:09 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::BaseNotification Load (0.6ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 694 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", 687]]
+ [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" = 'action_mailer'
+ [1m[36mNotifyUser::UserHash Load (0.6ms)[0m [1mSELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 687 AND "notify_user_user_hashes"."target_type" = 'User' 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" = 'yQ3sswEaEHRdEyRNHIQ6ugQb8cAiI-A2lTU7RQm0xKpg' 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", Tue, 20 May 2014 09:32:09 UTC +00:00], ["target_id", 687], ["target_type", "User"], ["token", "yQ3sswEaEHRdEyRNHIQ6ugQb8cAiI-A2lTU7RQm0xKpg"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:32:09 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+
+Sent mail to user@example.com (5.5ms)
+Date: Tue, 20 May 2014 19:32:09 +1000
+From: please-change-me-at-config-initializers-notify-user@example.com
+To: user@example.com
+Message-ID: <537b21193ec67_72383fcfb442dbdc230d0@wp.local.mail>
+Subject: Rails404: You have a new Newpostnotification notification.
+Mime-Version: 1.0
+Content-Type: text/html;
+ charset=UTF-8
+Content-Transfer-Encoding: quoted-printable
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/h=
+tml4/strict.dtd">
+<html>
+<head>
+ <meta content=3D"text/html; charset=3Dutf-8" http-equiv=3D"Content-Type=
+"/>
+ <title></title>
+</head>
+
+<body marginheight=3D"0" topmargin=3D"0" marginwidth=3D"0" leftmargin=3D"=
+0" style=3D"margin: 0px; -webkit-font-smoothing: antialiased; text-render=
+ing: optimizeLegibility;">
+<div style=3D"width: 100%; height: 70px; margin: 0; padding: 0;">
+ <div style=3D"width: 600px; margin: 0 auto; padding: 15px 0;">
+ Logo
+ </div>
+</div>
+<div style=3D"width: 100%; background-color: #fff; margin: 0; padding: 0;=
+">
+ <div style=3D"width: 500px; margin: 0 auto; padding: 40px 0; ">
+ New Post Notification happened.
+
+ </div>
+</div>
+<div style=3D"width: 100%; min-height: 80px; margin: 0; padding: 0;">
+ <div style=3D"width: 600px; margin: 0 auto; padding: 0;">
+ <p style=3D"text-align: center;">
+ <a href=3D"http://localhost:5000/notify_user/notifications/unauth=
+_unsubscribe?token=3DyQ3sswEaEHRdEyRNHIQ6ugQb8cAiI-A2lTU7RQm0xKpg&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", Tue, 20 May 2014 09:32:09 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:32:09 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.6ms)[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.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", Tue, 20 May 2014 09:32:09 UTC +00:00], ["state", "pending"], ["target_id", 688], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:32:09 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[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[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" = 688 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 688 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" = 695[0m [["state", "sent"], ["updated_at", Tue, 20 May 2014 09:32:09 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNewPostNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 695 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", 688]]
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 688 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" = 688 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", Tue, 20 May 2014 09:32:09 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:32:09 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" = 689) 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", Tue, 20 May 2014 09:32:09 UTC +00:00], ["target_id", 689], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:32:09 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" = 689 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.3ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 689 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" = 689 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 20 May 2014 09:32:09 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:32:09 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" = 'action_mailer' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 690) 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", Tue, 20 May 2014 09:32:09 UTC +00:00], ["target_id", 690], ["target_type", "User"], ["type", "action_mailer"], ["updated_at", Tue, 20 May 2014 09:32:09 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" = 690 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", Tue, 20 May 2014 09:32:09 UTC +00:00], ["state", "pending"], ["target_id", 690], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:32:09 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[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" = 690 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.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" = 690 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35mSQL (1.1ms)[0m UPDATE "notify_user_notifications" SET "state" = $1, "updated_at" = $2 WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 696 [["state", "sent"], ["updated_at", Tue, 20 May 2014 09:32:09 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35mNewPostNotification Load (0.6ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 696 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", 690]]
+ [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 690 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'
+ [1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 690 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", Tue, 20 May 2014 09:32:09 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:32:09 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT 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'
+ [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", Tue, 20 May 2014 09:32:09 UTC +00:00], ["state", "pending"], ["target_id", 691], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:32:09 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" = 691 AND "notify_user_user_hashes"."target_type" = 'User' 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" = '9MdMPb2mUeU3BYz85SYMOgaywhpvsRwKmwKUpmTPcwbw' 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", Tue, 20 May 2014 09:32:09 UTC +00:00], ["target_id", 691], ["target_type", "User"], ["token", "9MdMPb2mUeU3BYz85SYMOgaywhpvsRwKmwKUpmTPcwbw"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:32:09 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.3ms)[0m [1mBEGIN[0m
+ [1m[35m (0.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", Tue, 20 May 2014 09:32:09 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:32:09 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[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.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", Tue, 20 May 2014 09:32:09 UTC +00:00], ["state", "pending"], ["target_id", 692], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:32:09 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" = 692 AND "notify_user_user_hashes"."target_type" = 'User' 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" = 'tA4OKFkI40X7n1j9rMk2OgEOGMWJMC9mIXIuy1xaQeIg' 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", Tue, 20 May 2014 09:32:09 UTC +00:00], ["target_id", 692], ["target_type", "User"], ["token", "tA4OKFkI40X7n1j9rMk2OgEOGMWJMC9mIXIuy1xaQeIg"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:32:09 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" = 692 AND "notify_user_user_hashes"."target_type" = 'User' 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.4ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.3ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 20 May 2014 09:32:09 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:32:09 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 693 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", Tue, 20 May 2014 09:32:09 UTC +00:00], ["state", "pending"], ["target_id", 693], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:32:09 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" = 693 AND "notify_user_user_hashes"."target_type" = 'User' 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" = 'lVPV_2hWC3TLrySzFTkL1Q0veKqKtRgOKYXVw7YFDi-Q' 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", Tue, 20 May 2014 09:32:09 UTC +00:00], ["target_id", 693], ["target_type", "User"], ["token", "lVPV_2hWC3TLrySzFTkL1Q0veKqKtRgOKYXVw7YFDi-Q"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:32:09 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.8ms)[0m UPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 203 [["active", false], ["updated_at", Tue, 20 May 2014 09:32:09 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" = 693 AND "notify_user_user_hashes"."target_type" = 'User' 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" = 'POp_Ak6GQUi-JNZEclETmAr8k2UTsdNg6VQEw2hUrSAQ' 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", Tue, 20 May 2014 09:32:09 UTC +00:00], ["target_id", 693], ["target_type", "User"], ["token", "POp_Ak6GQUi-JNZEclETmAr8k2UTsdNg6VQEw2hUrSAQ"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:32:09 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", Tue, 20 May 2014 09:32:09 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:32:09 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" = 694) 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", Tue, 20 May 2014 09:32:09 UTC +00:00], ["target_id", 694], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:32:09 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" != 173 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 694) LIMIT 1[0m
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 694 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'
+ [1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Tue, 20 May 2014 09:32:09 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:32:09 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.6ms)[0m SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 695) 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", Tue, 20 May 2014 09:32:09 UTC +00:00], ["target_id", 695], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:32:09 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.5ms)[0m SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."id" != 174 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 695) LIMIT 1
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 695 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m
+ [1m[35m (0.3ms)[0m ROLLBACK TO SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.3ms)[0m BEGIN
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mSQL (0.6ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 20 May 2014 09:32:09 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:32:09 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" = 696) 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", Tue, 20 May 2014 09:32:09 UTC +00:00], ["target_id", 696], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:32:09 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"."id" != 175 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 696) LIMIT 1[0m
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::Unsubscribe Exists (0.5ms)[0m SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'UnsubscribableNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 696) LIMIT 1
+ [1m[36m (0.2ms)[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.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", Tue, 20 May 2014 09:32:09 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:32:09 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" = 697) 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", Tue, 20 May 2014 09:32:09 UTC +00:00], ["target_id", 697], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:32:09 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[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" != 176 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 697) 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" = 697) LIMIT 1
+ [1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
+ [1m[35m (0.7ms)[0m SELECT 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'
+ [1m[36mNotifyUser::Unsubscribe Load (0.5ms)[0m [1mSELECT "notify_user_unsubscribes".* 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[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", 176]]
+ [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" = 697 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[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.7ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Tue, 20 May 2014 09:32:09 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:32:09 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", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Tue, 20 May 2014 09:32:09 UTC +00:00], ["params", {:name=>"Mr. Blobby"}], ["state", "pending"], ["target_id", 698], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:32:09 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", Tue, 20 May 2014 09:32:09 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:32:09 UTC +00:00]]
+ [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Exists (0.5ms)[0m [1mSELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'zc26113ISnXmwHpRgtc6JgZjcKOhFhKUhNFYAa5rI36A' 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", Tue, 20 May 2014 09:32:09 UTC +00:00], ["target_id", 699], ["target_type", "User"], ["token", "zc26113ISnXmwHpRgtc6JgZjcKOhFhKUhNFYAa5rI36A"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:32:09 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" = 'zc26113ISnXmwHpRgtc6JgZjcKOhFhKUhNFYAa5rI36A' 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.4ms)[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", Tue, 20 May 2014 09:32:09 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:32:09 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.4ms)[0m [1mSELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '99q4QiHrdKzJZ5NXbUghmArNISrWMibu_DQfM4qGYQog' 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", Tue, 20 May 2014 09:32:09 UTC +00:00], ["target_id", 700], ["target_type", "User"], ["token", "99q4QiHrdKzJZ5NXbUghmArNISrWMibu_DQfM4qGYQog"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:32:09 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.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.8ms)[0m [1mUPDATE "notify_user_user_hashes" SET "active" = $1, "updated_at" = $2 WHERE "notify_user_user_hashes"."id" = 206[0m [["active", false], ["updated_at", Tue, 20 May 2014 09:32:09 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36mNotifyUser::UserHash Exists (0.5ms)[0m [1mSELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '99q4QiHrdKzJZ5NXbUghmArNISrWMibu_DQfM4qGYQog' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1[0m
+ [1m[35m (0.4ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Tue, 20 May 2014 09:32:09 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:32:09 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Exists (0.4ms)[0m SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'AjH8oQJJt5GMqYw6r94kGA7OGlgHk9AxXixKb9A3Qy9w' 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", Tue, 20 May 2014 09:32:09 UTC +00:00], ["target_id", 701], ["target_type", "User"], ["token", "AjH8oQJJt5GMqYw6r94kGA7OGlgHk9AxXixKb9A3Qy9w"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:32:09 UTC +00:00]]
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.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" = 207 [["active", false], ["updated_at", Tue, 20 May 2014 09:32:09 UTC +00:00]]
+ [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
+ [1m[35m (0.2ms)[0m ROLLBACK
+ [1m[36m (0.2ms)[0m [1mBEGIN[0m
+ [1m[35m (0.3ms)[0m SAVEPOINT active_record_1
+ [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Tue, 20 May 2014 09:32:09 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 20 May 2014 09:32:09 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[35mNotifyUser::UserHash Exists (0.4ms)[0m SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 's615stTM5K1kj6qZn-mUHQ74sEPxeRKNFGTa2pZf-XBw' 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", Tue, 20 May 2014 09:32:09 UTC +00:00], ["target_id", 702], ["target_type", "User"], ["token", "s615stTM5K1kj6qZn-mUHQ74sEPxeRKNFGTa2pZf-XBw"], ["type", "NewPostNotification"], ["updated_at", Tue, 20 May 2014 09:32:09 UTC +00:00]]
+ [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1
+ [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
+ [1m[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.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m
+ [1m[35m (0.2ms)[0m BEGIN
+ [1m[36m (0.2ms)[0m [1mROLLBACK[0m