spec/dummy/rails-4.0.4/log/test.log in notify_user-0.0.19 vs spec/dummy/rails-4.0.4/log/test.log in notify_user-0.0.20

- old
+ new

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