Connecting to database specified by database.yml Connecting to database specified by database.yml Connecting to database specified by database.yml Connecting to database specified by database.yml  (15.8ms) CREATE TABLE "schema_migrations" ("version" character varying(255) NOT NULL)   (6.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.7ms) SELECT "schema_migrations"."version" FROM "schema_migrations"  Migrating to CreateUsers (20150106040852)  (0.3ms) BEGIN  (10.0ms) CREATE TABLE "users" ("id" serial primary key, "email" character varying(255), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20150106040852')  (0.8ms) COMMIT Migrating to CreateNotifyUserNotifications (20150106040854857857604000)  (0.4ms) BEGIN  (8.4ms) CREATE TABLE "notify_user_notifications" ("id" serial primary key, "type" character varying(255), "target_id" integer, "target_type" character varying(255), "params" json, "state" character varying(255), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (1.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20150106040854857857604000')  (1.2ms) COMMIT Migrating to CreateNotifyUserUnsubscribes (20150106040854860860323000)  (0.7ms) BEGIN  (7.1ms) CREATE TABLE "notify_user_unsubscribes" ("id" serial primary key, "type" character varying(255), "target_id" integer, "target_type" character varying(255), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ('20150106040854860860323000')  (0.6ms) COMMIT Migrating to CreateNotifyUserUserHashes (20150106040854862862248000)  (0.4ms) BEGIN  (10.0ms) CREATE TABLE "notify_user_user_hashes" ("id" serial primary key, "type" character varying(255), "target_id" integer, "target_type" character varying(255), "token" character varying(255), "active" boolean DEFAULT 't', "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (0.6ms) INSERT INTO "schema_migrations" ("version") VALUES ('20150106040854862862248000')  (0.9ms) COMMIT  (0.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" Connecting to database specified by database.yml  (0.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations"   (128.2ms) DROP DATABASE IF EXISTS "notify_user_test"  (251.9ms) CREATE DATABASE "notify_user_test" ENCODING = 'unicode'  (20.6ms) CREATE TABLE "notify_user_notifications" ("id" serial primary key, "type" character varying(255), "target_id" integer, "target_type" character varying(255), "params" json, "state" character varying(255), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (11.8ms) CREATE TABLE "notify_user_unsubscribes" ("id" serial primary key, "type" character varying(255), "target_id" integer, "target_type" character varying(255), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (9.8ms) CREATE TABLE "notify_user_user_hashes" ("id" serial primary key, "type" character varying(255), "target_id" integer, "target_type" character varying(255), "token" character varying(255), "active" boolean DEFAULT 't', "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)  (7.8ms) CREATE TABLE "users" ("id" serial primary key, "email" character varying(255), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)   (2.7ms) CREATE TABLE "schema_migrations" ("version" character varying(255) NOT NULL)  (3.4ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.9ms) SELECT version FROM "schema_migrations"  (1.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20150106040854862862248000')  (1.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20150106040852')  (0.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20150106040854857857604000')  (0.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20150106040854860860323000') Connecting to database specified by database.yml  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (4.9ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 06 Jan 2015 04:09:06 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.4ms) Completed 200 OK in 16.8ms (Views: 14.1ms | ActiveRecord: 0.0ms)  (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", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 06 Jan 2015 04:09:06 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" = 2 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (1.2ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["params", "{\"name\":\"Mr. Blobby\"}"], ["state", "pending"], ["target_id", 2], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as JSON  (0.8ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 2 AND "notify_user_notifications"."target_type" = 'User' NotifyUser::BaseNotification Load (1.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 2 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 12.8ms (Views: 6.6ms | ActiveRecord: 2.3ms)  (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", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 06 Jan 2015 04:09:06 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" = 3 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", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["params", "{\"name\":\"Mr. Blobby\"}"], ["state", "pending"], ["target_id", 3], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 06 Jan 2015 04:09:06 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" = 3 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", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["params", "{\"name\":\"Mr. Adams\"}"], ["state", "pending"], ["target_id", 3], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 06 Jan 2015 04:09:06 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" = 3 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", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["params", "{\"name\":\"Mrs. James\"}"], ["state", "pending"], ["target_id", 3], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00]]  (0.2ms) 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" = 3 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0 Completed 200 OK in 17.2ms (Views: 15.8ms | ActiveRecord: 0.6ms)  (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", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 06 Jan 2015 04:09:06 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" = 4 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", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["params", "{\"name\":\"Mr. Blobby\"}"], ["state", "pending"], ["target_id", 4], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 06 Jan 2015 04:09:06 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" = 4 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", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["params", "{\"name\":\"Mr. Adams\"}"], ["state", "pending"], ["target_id", 4], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 06 Jan 2015 04:09:06 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" = 4 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (1.2ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["params", "{\"name\":\"Mrs. James\"}"], ["state", "pending"], ["target_id", 4], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"5"} NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 4 AND "notify_user_notifications"."target_type" = 'User' AND (id = '5') LIMIT 1  (0.2ms) SAVEPOINT active_record_1 User Load (0.7ms) SELECT "users".* FROM "users" WHERE "users"."id" = 4 LIMIT 1  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 4 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.8ms) UPDATE "notify_user_notifications" SET "state" = 'read', "updated_at" = '2015-01-06 04:09:06.193124', "params" = '{"name":"Mr. Blobby"}' WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 5  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 32.0ms (Views: 2.2ms | ActiveRecord: 3.0ms) NotifyUser::BaseNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 5 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", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.8ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 5 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["params", "{\"name\":\"Mr. Blobby\"}"], ["state", "pending"], ["target_id", 5], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00]]  (0.1ms) 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" = 5 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["params", "{\"name\":\"Mr. Adams\"}"], ["state", "pending"], ["target_id", 5], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 06 Jan 2015 04:09:06 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" = 5 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["params", "{\"name\":\"Mrs. James\"}"], ["state", "pending"], ["target_id", 5], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"8"} NotifyUser::BaseNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 5 AND "notify_user_notifications"."target_type" = 'User' AND (id = '8') LIMIT 1  (0.2ms) SAVEPOINT active_record_1 User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = 5 LIMIT 1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 5 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.5ms) UPDATE "notify_user_notifications" SET "state" = 'read', "updated_at" = '2015-01-06 04:09:06.230444', "params" = '{"name":"Mr. Blobby"}' WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 8  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8.0ms (Views: 0.4ms | ActiveRecord: 2.5ms) Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"8"} NotifyUser::BaseNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 5 AND "notify_user_notifications"."target_type" = 'User' AND (id = '8') LIMIT 1 Completed 200 OK in 2.2ms (Views: 0.3ms | ActiveRecord: 0.7ms)  (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", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 06 Jan 2015 04:09:06 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" = 6 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", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["params", "{\"name\":\"Mr. Blobby\"}"], ["state", "pending"], ["target_id", 6], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 06 Jan 2015 04:09:06 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" = 6 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", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["params", "{\"name\":\"Mr. Adams\"}"], ["state", "pending"], ["target_id", 6], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 06 Jan 2015 04:09:06 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" = 6 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", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["params", "{\"name\":\"Mrs. James\"}"], ["state", "pending"], ["target_id", 6], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 06 Jan 2015 04:09:06 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" = 6 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('pending','sent')) Redirected to http://test.host/notify_user/notifications Completed 302 Found in 3.1ms (ActiveRecord: 1.1ms) NotifyUser::BaseNotification Load (0.7ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 6 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('["pending","sent"]'))  (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", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 06 Jan 2015 04:09:06 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" = 7 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["params", "{\"name\":\"Mr. Blobby\"}"], ["state", "pending"], ["target_id", 7], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["14"]} SQL (0.7ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 7 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('14')) NotifyUser::BaseNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 7 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('14')) Completed 200 OK in 5.7ms (Views: 2.6ms | ActiveRecord: 1.3ms) 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", 14]]  (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", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 06 Jan 2015 04:09:06 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" = 8 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["params", "{\"name\":\"Mr. Blobby\"}"], ["state", "pending"], ["target_id", 8], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["15"]} SQL (0.5ms) UPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 8 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('15')) NotifyUser::BaseNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 8 AND "notify_user_notifications"."target_type" = 'User' AND (id IN ('15')) Completed 200 OK in 4.3ms (Views: 2.3ms | ActiveRecord: 1.0ms)  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 06 Jan 2015 04:09:06 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" = 9 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", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["params", "{\"name\":\"Mr. Blobby\"}"], ["state", "pending"], ["target_id", 9], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00]]  (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" = 9 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.7ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 9 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) 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"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 9) LIMIT 1 SQL (1.2ms) INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["target_id", 9], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.7ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 9 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 28.8ms (Views: 0.4ms | ActiveRecord: 3.7ms) NotifyUser::Unsubscribe Load (0.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 9 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.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 06 Jan 2015 04:09:06 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" = 10 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", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["params", "{\"name\":\"Mr. Blobby\"}"], ["state", "pending"], ["target_id", 10], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00]]  (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" = 10 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.5ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 10 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" = 10 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 200 OK in 3.4ms (Views: 0.4ms | ActiveRecord: 1.0ms) NotifyUser::Unsubscribe Load (0.6ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 10 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.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 06 Jan 2015 04:09:06 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" = 11 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["params", "{\"name\":\"Mr. Blobby\"}"], ["state", "pending"], ["target_id", 11], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 06 Jan 2015 04:09:06 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" = 11) 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", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["target_id", 11], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 11 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' Completed 302 Found in 7.1ms (ActiveRecord: 2.1ms) NotifyUser::Unsubscribe Load (0.9ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" ORDER BY "notify_user_unsubscribes"."id" DESC LIMIT 1  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 06 Jan 2015 04:09:06 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" = 12 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["params", "{\"name\":\"Mr. Blobby\"}"], ["state", "pending"], ["target_id", 12], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 06 Jan 2015 04:09:06 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" = 12) 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", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["target_id", 12], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#subscribe as HTML Parameters: {"type"=>"NewPostNotification"} NotifyUser::Unsubscribe Load (0.5ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 12 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 3]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe Completed 302 Found in 4.5ms (ActiveRecord: 1.5ms) NotifyUser::Unsubscribe Load (0.3ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes"  (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", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00]]  (0.2ms) 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" = 13 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", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["params", "{\"name\":\"Mr. Blobby\"}"], ["state", "pending"], ["target_id", 13], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 06 Jan 2015 04:09:06 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" = 13 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' 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" = '8r6km98pm_YIP71uH3_hVwuZqUKZElXbAqwJ00ATrhGw' LIMIT 1 SQL (1.3ms) INSERT INTO "notify_user_user_hashes" ("active", "created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["active", true], ["created_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["target_id", 13], ["target_type", "User"], ["token", "8r6km98pm_YIP71uH3_hVwuZqUKZElXbAqwJ00ATrhGw"], ["type", "NewPostNotification"], ["updated_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unauth_unsubscribe as HTML Parameters: {"type"=>"NewPostNotification", "token"=>"8r6km98pm_YIP71uH3_hVwuZqUKZElXbAqwJ00ATrhGw"} NotifyUser::UserHash Exists (0.5ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '8r6km98pm_YIP71uH3_hVwuZqUKZElXbAqwJ00ATrhGw' 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" = '8r6km98pm_YIP71uH3_hVwuZqUKZElXbAqwJ00ATrhGw' AND "notify_user_user_hashes"."type" = 'NewPostNotification' LIMIT 1 User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = 13 LIMIT 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" = 13) 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", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["target_id", 13], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "notify_user_user_hashes" SET "active" = 'f', "updated_at" = '2015-01-06 04:09:06.445842' WHERE "notify_user_user_hashes"."id" = 1  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 11.1ms (Views: 0.4ms | ActiveRecord: 3.6ms) 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.2ms) ROLLBACK  (0.2ms) 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' LIMIT 1  (0.4ms) SAVEPOINT active_record_1  (0.3ms) ROLLBACK TO 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" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN NotifyUser::UserHash Load (0.6ms) 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' LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) 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' LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN NotifyUser::UserHash Load (0.6ms) 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' LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.5ms) 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' LIMIT 1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO 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", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00]]  (0.4ms) 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" = 14 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["params", "null"], ["state", "pending"], ["target_id", 14], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 14 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('sent','pending'))  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 06 Jan 2015 04:09:06 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" = 15 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", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["params", "null"], ["state", "pending"], ["target_id", 15], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 06 Jan 2015 04:09:06 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" = 16 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["params", "null"], ["state", "pending"], ["target_id", 16], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 17 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["params", "null"], ["state", "pending"], ["target_id", 17], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 06 Jan 2015 04:09:06 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" = 17 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.6ms) UPDATE "notify_user_notifications" SET "params" = '{"listing_id":1}', "updated_at" = '2015-01-06 04:09:06.584584' WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 24  (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.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 06 Jan 2015 04:09:06 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" = 18 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", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["params", "null"], ["state", "pending"], ["target_id", 18], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 06 Jan 2015 04:09:06 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" = 18 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.4ms) UPDATE "notify_user_notifications" SET "params" = '{"listing_id":1}', "updated_at" = '2015-01-06 04:09:06.598888' WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 25  (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.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 06 Jan 2015 04:09:06 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" = 19 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", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["params", "null"], ["state", "pending"], ["target_id", 19], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 06 Jan 2015 04:09:06 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" = 19 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.5ms) UPDATE "notify_user_notifications" SET "params" = '{"listing_id":1}', "updated_at" = '2015-01-06 04:09:06.611365' WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 26  (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", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 06 Jan 2015 04:09:06 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" = 20 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["params", "null"], ["state", "pending"], ["target_id", 20], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 06 Jan 2015 04:09:06 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" = 20 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.5ms) UPDATE "notify_user_notifications" SET "params" = '{"listing_id":1}', "updated_at" = '2015-01-06 04:09:06.623490' WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 27  (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') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1  (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", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 06 Jan 2015 04:09:06 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" = 21 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["params", "null"], ["state", "pending"], ["target_id", 21], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 06 Jan 2015 04:09:06 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" = 21 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.5ms) UPDATE "notify_user_notifications" SET "updated_at" = '2015-01-06 04:09:06.636063', "params" = 'null' WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 28  (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", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 06 Jan 2015 04:09:06 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" = 22 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", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["params", "null"], ["state", "pending"], ["target_id", 22], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 22 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 22 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.5ms) UPDATE "notify_user_notifications" SET "state" = 'sent', "updated_at" = '2015-01-06 04:09:06.650535', "params" = 'null' WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 29  (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" = 22 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 29) NewPostNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 29]] User Load (0.6ms) SELECT "users".* FROM "users" WHERE "users"."id" = 22 LIMIT 1 NewPostNotification Load (0.6ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 22 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending'  (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", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 06 Jan 2015 04:09:06 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" = 23 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["params", "null"], ["state", "pending"], ["target_id", 23], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 06 Jan 2015 04:09:06 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" = 23 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["params", "null"], ["state", "pending"], ["target_id", 23], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 23 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" = 23 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.6ms) UPDATE "notify_user_notifications" SET "state" = 'sent', "updated_at" = '2015-01-06 04:09:06.676601', "params" = 'null' WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 31  (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" = 23 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 31)  (0.2ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 24 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", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["params", "null"], ["state", "pending"], ["target_id", 24], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 24 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" = 24 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.9ms) UPDATE "notify_user_notifications" SET "state" = 'sent', "updated_at" = '2015-01-06 04:09:06.693451', "params" = 'null' WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 32  (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" = 32 LIMIT 1 User Load (0.8ms) SELECT "users".* FROM "users" WHERE "users"."id" = 24 LIMIT 1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 24 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" = 24 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' 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" = 'ALutk4xEuqkbjwqQKhOvUwrKLyk5pwXdhZRB3eGGZ5-Q' LIMIT 1 SQL (0.5ms) INSERT INTO "notify_user_user_hashes" ("active", "created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["active", true], ["created_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["target_id", 24], ["target_type", "User"], ["token", "ALutk4xEuqkbjwqQKhOvUwrKLyk5pwXdhZRB3eGGZ5-Q"], ["type", "NewPostNotification"], ["updated_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (20.0ms) Date: Tue, 06 Jan 2015 15:09:06 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <54ab5fe2b1995_a2bb3fcf55865bf019645@wp.local.mail> Subject: New Notification Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Logo
New Post Notification happened.

Unsubscribe

This is the default generated layout. A privacy declaration could g= o here.

=C2=A9 MyCompany Pty Ltd

ABN 123 456 789

=  (0.3ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 25 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", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["params", "null"], ["state", "pending"], ["target_id", 25], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 06 Jan 2015 04:09:06 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" = 25 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.7ms) UPDATE "notify_user_notifications" SET "updated_at" = '2015-01-06 04:09:06.749755', "params" = 'null' WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 33  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 06 Jan 2015 04:09:06 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" = 26 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["params", "null"], ["state", "pending"], ["target_id", 26], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 26 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) SAVEPOINT active_record_1  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 26 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.5ms) UPDATE "notify_user_notifications" SET "state" = 'sent', "updated_at" = '2015-01-06 04:09:06.764344', "params" = 'null' WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 34  (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" = 34 LIMIT 1 User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = 26 LIMIT 1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 26 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NotifyUser::UserHash Load (0.6ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 26 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' 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" = 'SX0CcN9otl8401RTgUb00gUxDdviS6JYFwEAT4aQhfNg' LIMIT 1 SQL (0.5ms) INSERT INTO "notify_user_user_hashes" ("active", "created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["active", true], ["created_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["target_id", 26], ["target_type", "User"], ["token", "SX0CcN9otl8401RTgUb00gUxDdviS6JYFwEAT4aQhfNg"], ["type", "NewPostNotification"], ["updated_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Sent mail to user@example.com (5.4ms) Date: Tue, 06 Jan 2015 15:09:06 +1100 From: please-change-me-at-config-initializers-notify-user@example.com To: user@example.com Message-ID: <54ab5fe2bf1f2_a2bb3fcf55865bf01975b@wp.local.mail> Subject: New Notification Mime-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Logo
New Post Notification happened.

Unsubscribe

This is the default generated layout. A privacy declaration could g= o here.

=C2=A9 MyCompany Pty Ltd

ABN 123 456 789

=  (0.2ms) ROLLBACK  (0.5ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 06 Jan 2015 04:09:06 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" = 27 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", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["params", "null"], ["state", "pending"], ["target_id", 27], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 06 Jan 2015 04:09:06 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') AND "notify_user_notifications"."id" = 35 LIMIT 1 User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = 27 LIMIT 1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 27 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer'  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 06 Jan 2015 04:09:06 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" = 28 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["params", "null"], ["state", "pending"], ["target_id", 28], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 06 Jan 2015 04:09:06 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" = $1 LIMIT 1 [["id", 36]] User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = 28 LIMIT 1 NewPostNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 28 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" = 28 LIMIT 1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 28 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.4ms) UPDATE "notify_user_notifications" SET "state" = 'sent', "updated_at" = '2015-01-06 04:09:06.817299', "params" = 'null' WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 36  (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", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 06 Jan 2015 04:09:06 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" = 29 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", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["params", "null"], ["state", "pending"], ["target_id", 29], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 06 Jan 2015 04:09:06 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" = 29 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' SQL (0.4ms) INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["params", "null"], ["state", "pending"], ["target_id", 29], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 06 Jan 2015 04:09:06 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" = $1 LIMIT 1 [["id", 38]] User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = 29 LIMIT 1 NewPostNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 29 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" = 29 LIMIT 1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 29 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.4ms) UPDATE "notify_user_notifications" SET "state" = 'sent', "updated_at" = '2015-01-06 04:09:06.838474', "params" = 'null' WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 37  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = 29 LIMIT 1  (0.6ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 29 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.7ms) UPDATE "notify_user_notifications" SET "state" = 'sent', "updated_at" = '2015-01-06 04:09:06.844022', "params" = 'null' WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 38  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 06 Jan 2015 04:09:06 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" = 30 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", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["params", "null"], ["state", "pending"], ["target_id", 30], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 06 Jan 2015 04:09:06 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" = 30 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.5ms) UPDATE "notify_user_notifications" SET "updated_at" = '2015-01-06 04:09:06.857204', "params" = 'null' WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 39  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 30 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" = 30 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.4ms) UPDATE "notify_user_notifications" SET "state" = 'sent', "updated_at" = '2015-01-06 04:09:06.861888', "params" = 'null' WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 39  (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" = 39 LIMIT 1 User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = 30 LIMIT 1  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 30 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NewPostNotification Load (0.4ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 39 LIMIT 1 User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = 30 LIMIT 1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 30 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'  (0.2ms) 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", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 06 Jan 2015 04:09:06 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" = 31) LIMIT 1 SQL (0.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", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["target_id", 31], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 06 Jan 2015 04:09:06 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" = 31 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.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 31 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" = 31 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.5ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 06 Jan 2015 04:09:06 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" = 'action_mailer' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 32) 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", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["target_id", 32], ["target_type", "User"], ["type", "action_mailer"], ["updated_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::Unsubscribe Exists (0.9ms) SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'action_mailer' AND "notify_user_unsubscribes"."id" != 6 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 32) LIMIT 1  (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" = 32 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", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["params", "null"], ["state", "pending"], ["target_id", 32], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 06 Jan 2015 04:09:06 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" = 32 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.6ms) UPDATE "notify_user_notifications" SET "updated_at" = '2015-01-06 04:09:06.904971', "params" = 'null' WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 40  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 32 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" = 32 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.5ms) UPDATE "notify_user_notifications" SET "state" = 'sent', "updated_at" = '2015-01-06 04:09:06.910025', "params" = 'null' WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 40  (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') AND "notify_user_notifications"."id" = 40 LIMIT 1 User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = 32 LIMIT 1  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 32 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'action_mailer' NewPostNotification Load (0.5ms) SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 40 LIMIT 1 User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = 32 LIMIT 1  (0.4ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 32 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'apns'  (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", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 06 Jan 2015 04:09:06 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" = 33 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", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["params", "null"], ["state", "pending"], ["target_id", 33], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.5ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 33 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' 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" = 'Da9qkh9qu06UCun4ldLmwArRWU7356hBpWiykUkWz1Qg' LIMIT 1 SQL (0.5ms) INSERT INTO "notify_user_user_hashes" ("active", "created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["active", true], ["created_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["target_id", 33], ["target_type", "User"], ["token", "Da9qkh9qu06UCun4ldLmwArRWU7356hBpWiykUkWz1Qg"], ["type", "NewPostNotification"], ["updated_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 06 Jan 2015 04:09:06 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" = 34 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", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["params", "null"], ["state", "pending"], ["target_id", 34], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00]]  (0.3ms) 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" = 34 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' 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" = 'yoH7FI95IaKEzTP1rCAQBAhRum7_I5PkJ0kSdqc4sFEQ' LIMIT 1 SQL (0.7ms) INSERT INTO "notify_user_user_hashes" ("active", "created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["active", true], ["created_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["target_id", 34], ["target_type", "User"], ["token", "yoH7FI95IaKEzTP1rCAQBAhRum7_I5PkJ0kSdqc4sFEQ"], ["type", "NewPostNotification"], ["updated_at", Tue, 06 Jan 2015 04:09:06 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" = 34 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' 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", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 06 Jan 2015 04:09:06 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" = 35 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", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["params", "null"], ["state", "pending"], ["target_id", 35], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.5ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 35 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' 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" = '7uuvVT-xpiPPs9QvRf87GgnNUK62Oi_gtjQ-NxNTJLXQ' LIMIT 1 SQL (0.5ms) INSERT INTO "notify_user_user_hashes" ("active", "created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["active", true], ["created_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["target_id", 35], ["target_type", "User"], ["token", "7uuvVT-xpiPPs9QvRf87GgnNUK62Oi_gtjQ-NxNTJLXQ"], ["type", "NewPostNotification"], ["updated_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.4ms) UPDATE "notify_user_user_hashes" SET "active" = 'f', "updated_at" = '2015-01-06 04:09:06.964718' WHERE "notify_user_user_hashes"."id" = 6  (0.2ms) RELEASE SAVEPOINT active_record_1 NotifyUser::UserHash Load (0.5ms) SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 35 AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' 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" = 'aHGDmoh-oCE8P5LjgP78LQJEKpCTBy-83fJnhLCLNKaw' LIMIT 1 SQL (0.6ms) INSERT INTO "notify_user_user_hashes" ("active", "created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["active", true], ["created_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["target_id", 35], ["target_type", "User"], ["token", "aHGDmoh-oCE8P5LjgP78LQJEKpCTBy-83fJnhLCLNKaw"], ["type", "NewPostNotification"], ["updated_at", Tue, 06 Jan 2015 04:09:06 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", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 06 Jan 2015 04:09:06 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" = 36) LIMIT 1 SQL (0.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", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["target_id", 36], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00]]  (0.2ms) 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"."id" != 7 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 36) LIMIT 1  (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" = 36 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 06 Jan 2015 04:09:06 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" = 37) 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", Tue, 06 Jan 2015 04:09:06 UTC +00:00], ["target_id", 37], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 06 Jan 2015 04:09:06 UTC +00:00]]  (0.2ms) 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"."id" != 8 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 37) LIMIT 1  (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" = 37 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 37 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 06 Jan 2015 04:09:07 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 06 Jan 2015 04:09:07 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" = 38) 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", Tue, 06 Jan 2015 04:09:07 UTC +00:00], ["target_id", 38], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 06 Jan 2015 04:09:07 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) 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" != 9 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 38) LIMIT 1  (0.2ms) 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" = 38) LIMIT 1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 38 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' NotifyUser::Unsubscribe Load (0.4ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 38 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", 9]]  (0.3ms) RELEASE SAVEPOINT active_record_1 NotifyUser::Unsubscribe Load (0.6ms) SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 38 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'  (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", Tue, 06 Jan 2015 04:09:07 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 06 Jan 2015 04:09:07 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" = 39 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", Tue, 06 Jan 2015 04:09:07 UTC +00:00], ["params", "{\"name\":\"Mr. Blobby\"}"], ["state", "pending"], ["target_id", 39], ["target_type", "User"], ["type", "NewPostNotification"], ["updated_at", Tue, 06 Jan 2015 04:09:07 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", Tue, 06 Jan 2015 04:09:07 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 06 Jan 2015 04:09:07 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.4ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'QnqGE29ZCFpTiKdylEe_xwtA5dWVkIULNDjc1fvNlDig' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("active", "created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["active", true], ["created_at", Tue, 06 Jan 2015 04:09:07 UTC +00:00], ["target_id", 40], ["target_type", "User"], ["token", "QnqGE29ZCFpTiKdylEe_xwtA5dWVkIULNDjc1fvNlDig"], ["type", "NewPostNotification"], ["updated_at", Tue, 06 Jan 2015 04:09:07 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.5ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'QnqGE29ZCFpTiKdylEe_xwtA5dWVkIULNDjc1fvNlDig' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1  (0.2ms) ROLLBACK  (0.2ms) 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", Tue, 06 Jan 2015 04:09:07 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 06 Jan 2015 04:09:07 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (9.6ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '86MO4k9pdhU0vFQ9LKkdVwrjsWUjx_2Q6jlfePaoTe5Q' LIMIT 1 SQL (0.5ms) INSERT INTO "notify_user_user_hashes" ("active", "created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["active", true], ["created_at", Tue, 06 Jan 2015 04:09:07 UTC +00:00], ["target_id", 41], ["target_type", "User"], ["token", "86MO4k9pdhU0vFQ9LKkdVwrjsWUjx_2Q6jlfePaoTe5Q"], ["type", "NewPostNotification"], ["updated_at", Tue, 06 Jan 2015 04:09:07 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  (0.6ms) UPDATE "notify_user_user_hashes" SET "active" = 'f', "updated_at" = '2015-01-06 04:09:07.055904' WHERE "notify_user_user_hashes"."id" = 9  (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" = '86MO4k9pdhU0vFQ9LKkdVwrjsWUjx_2Q6jlfePaoTe5Q' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1  (0.3ms) ROLLBACK  (0.3ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 06 Jan 2015 04:09:07 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 06 Jan 2015 04:09:07 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 NotifyUser::UserHash Exists (0.3ms) SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'W3Uj_nFKnllsyANx2wOMTQ1HsN93Cl9BatmQo6rAozjg' LIMIT 1 SQL (0.4ms) INSERT INTO "notify_user_user_hashes" ("active", "created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["active", true], ["created_at", Tue, 06 Jan 2015 04:09:07 UTC +00:00], ["target_id", 42], ["target_type", "User"], ["token", "W3Uj_nFKnllsyANx2wOMTQ1HsN93Cl9BatmQo6rAozjg"], ["type", "NewPostNotification"], ["updated_at", Tue, 06 Jan 2015 04:09:07 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  (0.6ms) UPDATE "notify_user_user_hashes" SET "active" = 'f', "updated_at" = '2015-01-06 04:09:07.068096' WHERE "notify_user_user_hashes"."id" = 10  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) ROLLBACK  (0.2ms) BEGIN  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 06 Jan 2015 04:09:07 UTC +00:00], ["email", "user@example.com"], ["updated_at", Tue, 06 Jan 2015 04:09:07 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" = 'L50-z0BzqAdpwPMy814XqQ8YK3lmlNP3PO7plmdsZecw' LIMIT 1 SQL (0.5ms) INSERT INTO "notify_user_user_hashes" ("active", "created_at", "target_id", "target_type", "token", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["active", true], ["created_at", Tue, 06 Jan 2015 04:09:07 UTC +00:00], ["target_id", 43], ["target_type", "User"], ["token", "L50-z0BzqAdpwPMy814XqQ8YK3lmlNP3PO7plmdsZecw"], ["type", "NewPostNotification"], ["updated_at", Tue, 06 Jan 2015 04:09:07 UTC +00:00]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) 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.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.1ms) ROLLBACK  (0.1ms) BEGIN  (0.2ms) ROLLBACK