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 [1m[36m (15.8ms)[0m [1mCREATE TABLE "schema_migrations" ("version" character varying(255) NOT NULL) [0m [1m[35m (6.1ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") [1m[36m (0.7ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m Migrating to CreateUsers (20150106040852) [1m[35m (0.3ms)[0m BEGIN [1m[36m (10.0ms)[0m [1mCREATE TABLE "users" ("id" serial primary key, "email" character varying(255), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m [1m[35m (1.1ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ('20150106040852') [1m[36m (0.8ms)[0m [1mCOMMIT[0m Migrating to CreateNotifyUserNotifications (20150106040854857857604000) [1m[35m (0.4ms)[0m BEGIN [1m[36m (8.4ms)[0m [1mCREATE 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) [0m [1m[35m (1.2ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ('20150106040854857857604000') [1m[36m (1.2ms)[0m [1mCOMMIT[0m Migrating to CreateNotifyUserUnsubscribes (20150106040854860860323000) [1m[35m (0.7ms)[0m BEGIN [1m[36m (7.1ms)[0m [1mCREATE 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) [0m [1m[35m (0.4ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ('20150106040854860860323000') [1m[36m (0.6ms)[0m [1mCOMMIT[0m Migrating to CreateNotifyUserUserHashes (20150106040854862862248000) [1m[35m (0.4ms)[0m BEGIN [1m[36m (10.0ms)[0m [1mCREATE 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) [0m [1m[35m (0.6ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ('20150106040854862862248000') [1m[36m (0.9ms)[0m [1mCOMMIT[0m [1m[35m (0.5ms)[0m SELECT "schema_migrations"."version" FROM "schema_migrations" Connecting to database specified by database.yml [1m[36m (0.5ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m [1m[35m (128.2ms)[0m DROP DATABASE IF EXISTS "notify_user_test" [1m[36m (251.9ms)[0m [1mCREATE DATABASE "notify_user_test" ENCODING = 'unicode'[0m [1m[35m (20.6ms)[0m 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) [1m[36m (11.8ms)[0m [1mCREATE 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) [0m [1m[35m (9.8ms)[0m 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) [1m[36m (7.8ms)[0m [1mCREATE TABLE "users" ("id" serial primary key, "email" character varying(255), "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) [0m [1m[35m (2.7ms)[0m CREATE TABLE "schema_migrations" ("version" character varying(255) NOT NULL) [1m[36m (3.4ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m [1m[35m (0.9ms)[0m SELECT version FROM "schema_migrations" [1m[36m (1.3ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20150106040854862862248000')[0m [1m[35m (1.0ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20150106040852') [1m[36m (0.9ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20150106040854857857604000')[0m [1m[35m (0.9ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20150106040854860860323000') Connecting to database specified by database.yml [1m[36m (0.3ms)[0m [1mBEGIN[0m [1m[35m (0.2ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (4.9ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["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]] [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML Rendered /Users/william/Papercloud/notify_user/app/views/notify_user/base_notifications/index.html.erb within layouts/application (0.4ms) Completed 200 OK in 16.8ms (Views: 14.1ms | ActiveRecord: 0.0ms) [1m[36m (0.4ms)[0m [1mROLLBACK[0m [1m[35m (0.2ms)[0m BEGIN [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.6ms)[0m 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]] [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.3ms)[0m SAVEPOINT active_record_1 [1m[36m (1.3ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 2 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m [1m[35mSQL (1.2ms)[0m INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Tue, 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]] [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by NotifyUser::NotificationsController#index as JSON [1m[35m (0.8ms)[0m SELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 2 AND "notify_user_notifications"."target_type" = 'User' [1m[36mNotifyUser::BaseNotification Load (1.5ms)[0m [1mSELECT "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[0m Completed 200 OK in 12.8ms (Views: 6.6ms | ActiveRecord: 2.3ms) [1m[35m (0.4ms)[0m ROLLBACK [1m[36m (0.2ms)[0m [1mBEGIN[0m [1m[35m (0.2ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Tue, 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]] [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 3 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Tue, 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]] [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 3 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Tue, 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]] [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 3 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Tue, 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]] [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#index as HTML [1m[36mNotifyUser::BaseNotification Load (0.6ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 3 AND "notify_user_notifications"."target_type" = 'User' ORDER BY created_at DESC LIMIT 25 OFFSET 0[0m Completed 200 OK in 17.2ms (Views: 15.8ms | ActiveRecord: 0.6ms) [1m[35m (0.2ms)[0m ROLLBACK [1m[36m (0.1ms)[0m [1mBEGIN[0m [1m[35m (0.2ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Tue, 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]] [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 4 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Tue, 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]] [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 4 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' [1m[36mSQL (0.7ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Tue, 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]] [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 4 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' [1m[36mSQL (1.2ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Tue, 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]] [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"5"} [1m[36mNotifyUser::BaseNotification Load (0.6ms)[0m [1mSELECT "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[0m [1m[35m (0.2ms)[0m SAVEPOINT active_record_1 [1m[36mUser Load (0.7ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = 4 LIMIT 1[0m [1m[35m (0.5ms)[0m 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' [1m[36m (0.8ms)[0m [1mUPDATE "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[0m [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1 Completed 200 OK in 32.0ms (Views: 2.2ms | ActiveRecord: 3.0ms) [1m[36mNotifyUser::BaseNotification Load (0.7ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."id" = 5 LIMIT 1[0m [1m[35m (0.3ms)[0m ROLLBACK [1m[36m (0.3ms)[0m [1mBEGIN[0m [1m[35m (0.2ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["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]] [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35m (0.8ms)[0m 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' [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Tue, 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]] [1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 5 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["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]] [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 5 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["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]] [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#read as HTML Parameters: {"id"=>"8"} [1m[36mNotifyUser::BaseNotification Load (0.6ms)[0m [1mSELECT "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[0m [1m[35m (0.2ms)[0m SAVEPOINT active_record_1 [1m[36mUser Load (0.4ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = 5 LIMIT 1[0m [1m[35m (0.4ms)[0m 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' [1m[36m (0.5ms)[0m [1mUPDATE "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[0m [1m[35m (0.3ms)[0m 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"} [1m[36mNotifyUser::BaseNotification Load (0.7ms)[0m [1mSELECT "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[0m Completed 200 OK in 2.2ms (Views: 0.3ms | ActiveRecord: 0.7ms) [1m[35m (0.3ms)[0m ROLLBACK [1m[36m (0.2ms)[0m [1mBEGIN[0m [1m[35m (0.3ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["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]] [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 6 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Tue, 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]] [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 6 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Tue, 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]] [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 6 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Tue, 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]] [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#mark_all as HTML [1m[36mSQL (1.1ms)[0m [1mUPDATE "notify_user_notifications" SET "state" = 'read' WHERE "notify_user_notifications"."target_id" = 6 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('pending','sent'))[0m Redirected to http://test.host/notify_user/notifications Completed 302 Found in 3.1ms (ActiveRecord: 1.1ms) [1m[35mNotifyUser::BaseNotification Load (0.7ms)[0m 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"]')) [1m[36m (0.2ms)[0m [1mROLLBACK[0m [1m[35m (0.1ms)[0m BEGIN [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.5ms)[0m 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]] [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.2ms)[0m SAVEPOINT active_record_1 [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 7 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m [1m[35mSQL (0.4ms)[0m INSERT INTO "notify_user_notifications" ("created_at", "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]] [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["14"]} [1m[35mSQL (0.7ms)[0m 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')) [1m[36mNotifyUser::BaseNotification Load (0.5ms)[0m [1mSELECT "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'))[0m Completed 200 OK in 5.7ms (Views: 2.6ms | ActiveRecord: 1.3ms) [1m[35mNewPostNotification Load (0.8ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 14]] [1m[36m (0.3ms)[0m [1mROLLBACK[0m [1m[35m (0.2ms)[0m BEGIN [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 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]] [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.2ms)[0m SAVEPOINT active_record_1 [1m[36m (0.7ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 8 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m [1m[35mSQL (0.4ms)[0m INSERT INTO "notify_user_notifications" ("created_at", "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]] [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by NotifyUser::NotificationsController#mark_read as HTML Parameters: {"ids"=>["15"]} [1m[35mSQL (0.5ms)[0m 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')) [1m[36mNotifyUser::BaseNotification Load (0.4ms)[0m [1mSELECT "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'))[0m Completed 200 OK in 4.3ms (Views: 2.3ms | ActiveRecord: 1.0ms) [1m[35m (0.3ms)[0m ROLLBACK [1m[36m (0.2ms)[0m [1mBEGIN[0m [1m[35m (0.2ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Tue, 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]] [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 9 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Tue, 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]] [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mNotifyUser::Unsubscribe Load (0.4ms)[0m [1mSELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 9 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m Processing by NotifyUser::NotificationsController#subscriptions as HTML Parameters: {"types"=>[{"type"=>"NewPostNotification", "status"=>"0"}]} [1m[35m (0.7ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 9 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mNotifyUser::Unsubscribe Exists (0.7ms)[0m SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 9) LIMIT 1 [1m[36mSQL (1.2ms)[0m [1mINSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Tue, 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]] [1m[35m (0.3ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.7ms)[0m [1mSELECT 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'[0m Completed 200 OK in 28.8ms (Views: 0.4ms | ActiveRecord: 3.7ms) [1m[35mNotifyUser::Unsubscribe Load (0.4ms)[0m 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' [1m[36m (0.2ms)[0m [1mROLLBACK[0m [1m[35m (0.2ms)[0m BEGIN [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 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]] [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.3ms)[0m SAVEPOINT active_record_1 [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 10 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m [1m[35mSQL (0.6ms)[0m INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Tue, 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]] [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mNotifyUser::Unsubscribe Load (0.4ms)[0m 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"}]} [1m[36mNotifyUser::Unsubscribe Load (0.5ms)[0m [1mSELECT "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'[0m [1m[35m (0.5ms)[0m 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) [1m[36mNotifyUser::Unsubscribe Load (0.6ms)[0m [1mSELECT "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'[0m [1m[35m (0.2ms)[0m ROLLBACK [1m[36m (0.2ms)[0m [1mBEGIN[0m [1m[35m (0.2ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["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]] [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 11 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["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]] [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unsubscribe as HTML Parameters: {"type"=>"NewPostNotification"} [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mNotifyUser::Unsubscribe Exists (0.5ms)[0m SELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 11) LIMIT 1 [1m[36mSQL (0.7ms)[0m [1mINSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"[0m [["created_at", Tue, 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]] [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1 Redirected to http://test.host/notify_user/notifications/unsubscribe [1m[36m (0.4ms)[0m [1mSELECT 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'[0m Completed 302 Found in 7.1ms (ActiveRecord: 2.1ms) [1m[35mNotifyUser::Unsubscribe Load (0.9ms)[0m SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" ORDER BY "notify_user_unsubscribes"."id" DESC LIMIT 1 [1m[36m (0.3ms)[0m [1mROLLBACK[0m [1m[35m (0.2ms)[0m BEGIN [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.4ms)[0m 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]] [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.2ms)[0m SAVEPOINT active_record_1 [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 12 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m [1m[35mSQL (0.4ms)[0m INSERT INTO "notify_user_notifications" ("created_at", "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]] [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.2ms)[0m SAVEPOINT active_record_1 [1m[36mNotifyUser::Unsubscribe Exists (0.4ms)[0m [1mSELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 12) LIMIT 1[0m [1m[35mSQL (0.5ms)[0m INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Tue, 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]] [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Processing by NotifyUser::NotificationsController#subscribe as HTML Parameters: {"type"=>"NewPostNotification"} [1m[35mNotifyUser::Unsubscribe Load (0.5ms)[0m 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' [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.7ms)[0m DELETE FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."id" = $1 [["id", 3]] [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m Redirected to http://test.host/notify_user/notifications/unsubscribe Completed 302 Found in 4.5ms (ActiveRecord: 1.5ms) [1m[35mNotifyUser::Unsubscribe Load (0.3ms)[0m SELECT "notify_user_unsubscribes".* FROM "notify_user_unsubscribes" [1m[36m (0.2ms)[0m [1mROLLBACK[0m [1m[35m (0.1ms)[0m BEGIN [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.5ms)[0m 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]] [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.3ms)[0m SAVEPOINT active_record_1 [1m[36m (0.9ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 13 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m [1m[35mSQL (0.5ms)[0m INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Tue, 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]] [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mNotifyUser::UserHash Load (0.7ms)[0m SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" = 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 [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mNotifyUser::UserHash Exists (0.5ms)[0m SELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = '8r6km98pm_YIP71uH3_hVwuZqUKZElXbAqwJ00ATrhGw' LIMIT 1 [1m[36mSQL (1.3ms)[0m [1mINSERT 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"[0m [["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]] [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1 Processing by NotifyUser::NotificationsController#unauth_unsubscribe as HTML Parameters: {"type"=>"NewPostNotification", "token"=>"8r6km98pm_YIP71uH3_hVwuZqUKZElXbAqwJ00ATrhGw"} [1m[36mNotifyUser::UserHash Exists (0.5ms)[0m [1mSELECT 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[0m [1m[35mNotifyUser::UserHash Load (0.5ms)[0m 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 [1m[36mUser Load (0.5ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = 13 LIMIT 1[0m [1m[35m (0.2ms)[0m SAVEPOINT active_record_1 [1m[36mNotifyUser::Unsubscribe Exists (0.5ms)[0m [1mSELECT 1 AS one FROM "notify_user_unsubscribes" WHERE ("notify_user_unsubscribes"."type" = 'NewPostNotification' AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."target_id" = 13) LIMIT 1[0m [1m[35mSQL (0.5ms)[0m INSERT INTO "notify_user_unsubscribes" ("created_at", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Tue, 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]] [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.2ms)[0m SAVEPOINT active_record_1 [1m[36m (0.4ms)[0m [1mUPDATE "notify_user_user_hashes" SET "active" = 'f', "updated_at" = '2015-01-06 04:09:06.445842' WHERE "notify_user_user_hashes"."id" = 1[0m [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1 Completed 200 OK in 11.1ms (Views: 0.4ms | ActiveRecord: 3.6ms) [1m[36mNotifyUser::UserHash Load (0.5ms)[0m [1mSELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" ORDER BY "notify_user_user_hashes"."id" DESC LIMIT 1[0m [1m[35m (0.2ms)[0m ROLLBACK [1m[36m (0.2ms)[0m [1mBEGIN[0m [1m[35mNotifyUser::UserHash Load (1.0ms)[0m SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1 [1m[36m (0.4ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35m (0.3ms)[0m ROLLBACK TO SAVEPOINT active_record_1 [1m[36mNotifyUser::UserHash Load (0.6ms)[0m [1mSELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" 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[0m [1m[35m (0.2ms)[0m SAVEPOINT active_record_1 [1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m [1m[35m (0.2ms)[0m ROLLBACK [1m[36m (0.2ms)[0m [1mBEGIN[0m [1m[35mNotifyUser::UserHash Load (0.6ms)[0m SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1 [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35m (0.2ms)[0m ROLLBACK TO SAVEPOINT active_record_1 [1m[36mNotifyUser::UserHash Load (0.7ms)[0m [1mSELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" 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[0m [1m[35m (0.2ms)[0m SAVEPOINT active_record_1 [1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m [1m[35m (0.2ms)[0m ROLLBACK [1m[36m (0.2ms)[0m [1mBEGIN[0m [1m[35mNotifyUser::UserHash Load (0.6ms)[0m SELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1 [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35m (0.2ms)[0m ROLLBACK TO SAVEPOINT active_record_1 [1m[36mNotifyUser::UserHash Load (0.5ms)[0m [1mSELECT "notify_user_user_hashes".* FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."target_id" IS NULL AND "notify_user_user_hashes"."target_type" = 'User' AND "notify_user_user_hashes"."type" = 'NewPostNotification' AND "notify_user_user_hashes"."active" = 't' LIMIT 1[0m [1m[35m (0.2ms)[0m SAVEPOINT active_record_1 [1m[36m (0.2ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m [1m[35m (0.2ms)[0m ROLLBACK [1m[36m (0.2ms)[0m [1mBEGIN[0m [1m[35m (0.2ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Tue, 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]] [1m[35m (0.4ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 14 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["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]] [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."target_id" = 14 AND "notify_user_notifications"."target_type" = 'User' AND (state IN ('sent','pending'))[0m [1m[35m (0.3ms)[0m ROLLBACK [1m[36m (0.2ms)[0m [1mBEGIN[0m [1m[35m (0.2ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Tue, 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]] [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 15 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Tue, 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]] [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.2ms)[0m [1mROLLBACK[0m [1m[35m (0.1ms)[0m BEGIN [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.4ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 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]] [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.2ms)[0m SAVEPOINT active_record_1 [1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 16 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m [1m[35mSQL (0.4ms)[0m INSERT INTO "notify_user_notifications" ("created_at", "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]] [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.2ms)[0m ROLLBACK [1m[36m (0.2ms)[0m [1mBEGIN[0m [1m[35m (0.1ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Tue, 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]] [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.3ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 17 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["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]] [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 17 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' [1m[36m (0.6ms)[0m [1mUPDATE "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[0m [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mNewPostNotification Load (0.5ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1[0m [1m[35m (0.2ms)[0m ROLLBACK [1m[36m (0.2ms)[0m [1mBEGIN[0m [1m[35m (0.2ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Tue, 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]] [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 18 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' [1m[36mSQL (0.7ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Tue, 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]] [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 18 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' [1m[36m (0.4ms)[0m [1mUPDATE "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[0m [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mNewPostNotification Load (0.5ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1[0m [1m[35m (0.2ms)[0m ROLLBACK [1m[36m (0.1ms)[0m [1mBEGIN[0m [1m[35m (0.2ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["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]] [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35m (0.6ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 19 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Tue, 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]] [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 19 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' [1m[36m (0.5ms)[0m [1mUPDATE "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[0m [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mNewPostNotification Load (0.5ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1[0m [1m[35m (0.2ms)[0m ROLLBACK [1m[36m (0.2ms)[0m [1mBEGIN[0m [1m[35m (0.2ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Tue, 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]] [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 20 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["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]] [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 20 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' [1m[36m (0.5ms)[0m [1mUPDATE "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[0m [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36mNewPostNotification Load (0.4ms)[0m [1mSELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') ORDER BY "notify_user_notifications"."id" DESC LIMIT 1[0m [1m[35m (0.2ms)[0m ROLLBACK [1m[36m (0.1ms)[0m [1mBEGIN[0m [1m[35m (0.2ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.5ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["created_at", Tue, 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]] [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 21 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["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]] [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 21 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' [1m[36m (0.5ms)[0m [1mUPDATE "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[0m [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.2ms)[0m [1mROLLBACK[0m [1m[35m (0.2ms)[0m BEGIN [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 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]] [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.2ms)[0m SAVEPOINT active_record_1 [1m[36m (0.7ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 22 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m [1m[35mSQL (0.7ms)[0m INSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["created_at", Tue, 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]] [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 22 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35m (0.4ms)[0m 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' [1m[36m (0.5ms)[0m [1mUPDATE "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[0m [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 22 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 29)[0m [1m[35mNewPostNotification Load (0.6ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = $1 LIMIT 1 [["id", 29]] [1m[36mUser Load (0.6ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = 22 LIMIT 1[0m [1m[35mNewPostNotification Load (0.6ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 22 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' [1m[36m (0.3ms)[0m [1mROLLBACK[0m [1m[35m (0.2ms)[0m BEGIN [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35mSQL (0.5ms)[0m INSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id" [["created_at", Tue, 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]] [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.2ms)[0m SAVEPOINT active_record_1 [1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 23 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m [1m[35mSQL (0.4ms)[0m INSERT INTO "notify_user_notifications" ("created_at", "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]] [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.2ms)[0m SAVEPOINT active_record_1 [1m[36m (0.4ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 23 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m [1m[35mSQL (0.4ms)[0m INSERT INTO "notify_user_notifications" ("created_at", "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]] [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35m (0.6ms)[0m 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' [1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35m (0.5ms)[0m SELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 23 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification' [1m[36m (0.6ms)[0m [1mUPDATE "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[0m [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."type" = 'NewPostNotification' AND "notify_user_notifications"."target_id" = 23 AND "notify_user_notifications"."target_type" = 'User' AND "notify_user_notifications"."state" = 'pending' AND (id != 31)[0m [1m[35m (0.2ms)[0m ROLLBACK [1m[36m (0.1ms)[0m [1mBEGIN[0m [1m[35m (0.2ms)[0m SAVEPOINT active_record_1 [1m[36mSQL (0.4ms)[0m [1mINSERT INTO "users" ("created_at", "email", "updated_at") VALUES ($1, $2, $3) RETURNING "id"[0m [["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]] [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m [1m[35m (0.6ms)[0m 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' [1m[36mSQL (0.6ms)[0m [1mINSERT INTO "notify_user_notifications" ("created_at", "params", "state", "target_id", "target_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"[0m [["created_at", Tue, 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]] [1m[35m (0.2ms)[0m RELEASE SAVEPOINT active_record_1 [1m[36m (0.6ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 24 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m [1m[35m (0.2ms)[0m SAVEPOINT active_record_1 [1m[36m (0.5ms)[0m [1mSELECT COUNT(*) FROM "notify_user_unsubscribes" WHERE "notify_user_unsubscribes"."target_id" = 24 AND "notify_user_unsubscribes"."target_type" = 'User' AND "notify_user_unsubscribes"."type" = 'NewPostNotification'[0m [1m[35m (0.9ms)[0m 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 [1m[36m (0.3ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m [1m[35mNewPostNotification Load (0.9ms)[0m SELECT "notify_user_notifications".* FROM "notify_user_notifications" WHERE "notify_user_notifications"."type" IN ('NewPostNotification') AND "notify_user_notifications"."id" = 32 LIMIT 1 [1m[36mUser Load (0.8ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = 24 LIMIT 1[0m [1m[35m (0.4ms)[0m 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' [1m[36mNotifyUser::UserHash Load (0.7ms)[0m [1mSELECT "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[0m [1m[35m (0.2ms)[0m SAVEPOINT active_record_1 [1m[36mNotifyUser::UserHash Exists (0.4ms)[0m [1mSELECT 1 AS one FROM "notify_user_user_hashes" WHERE "notify_user_user_hashes"."token" = 'ALutk4xEuqkbjwqQKhOvUwrKLyk5pwXdhZRB3eGGZ5-Q' LIMIT 1[0m [1m[35mSQL (0.5ms)[0m 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]] [1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m 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
This is the default generated layout. A privacy declaration could g= o here.
=C2=A9 MyCompany Pty Ltd
ABN 123 456 789
This is the default generated layout. A privacy declaration could g= o here.
=C2=A9 MyCompany Pty Ltd
ABN 123 456 789